Repository navigation
The coverage of a program in a traversal records no texture feedback - #84
Merged
Merged
Conversation
…feedback hit_alpha evaluates the alpha of a program with coverage inside every traversal (surface_coverage.slang). Each sample of a program writes the feedback of its texture in a stage with MIRAI_TEXTURE_FEEDBACK, an atomic the optimizer keeps, and with it every read and the code around it: the whole program, colors and normals too, in every traversal of the stage. On demo, Terrain_Layers made reflect.comp 3.37 MB, which amdvlk did not compile in 15 minutes with 19 GB, so a cold editor without ray queries never opened. texture_feedback_quiet keeps those samples from writing while the alpha is evaluated, and only what the alpha reads stays. On demo: reflect.comp 2.66 MB, 144 s and 5.4 GB to make on an RX 580; ddgi_trace and the hardware stages shrink too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #83.
Changes
hit_alphaevaluates the alpha of a program with coverage inside every traversal (surface_coverage.slang). In a stage withMIRAI_TEXTURE_FEEDBACK, each sample of the program also writes the feedback of its texture: an atomic, which the optimizer keeps, and with it every read and the code around it.texture_feedback_quiet(scene.slang) keeps those samples from writing whilehit_alphaevaluates the alpha (trace.slang).materials.md(Coverage in the traversal) says so.+13/−1 in the shaders, plus 2 lines of docs. No new mechanism and no per-program opt-in: it holds for every program with coverage.
Measured
RX 580, amdvlk, Windows 10, 16 GB.
SPIR-V of
demo, against the same generation without this change. Only stages with texture feedback change:reflect.compreflect_hw.compddgi_trace.compddgi_trace_hw.compMaking
demo'sreflect.compin a test, one variant per process, with the driver's VkCache moved aside:{color, unlayered}The
maineditor opened ondemo, windowed and not--copy:renderer_problemempty.Tests
mirai test render, by file, this branch againstmain8c5a2a6:material_testglass_testpipeline_gpu_testbatch_trace_testmesh_ray_testthumbnail_testgi_testtexture_feedback_test, includingtexture_feedback_takes_what_reflections_see_and_nothing_unseentexture_residency_testmirai test cook/shaders: 83/83.scripts/check_docs.py: the same 3 problems as onmain, none from this change.It merges cleanly into
mainand with Give each GPU pass of a profile to the frame that submitted it, where it ran #10–Compile the software ray tracing pipelines after the editor opens, and let no frame wait for them #15.Not tested
mirai test rendersuite does not finish on this machine, onmaineither: a device lost inDdgi_TracewhileGlass_Lightruns, then 4gpu_tests wait past the timeout. Those 4 pass alone on both sides.MIRAI_TEXTURE_FEEDBACKpath in the traversal to change.🤖 Generated with Claude Code