Repository navigation
fix(agc): drop pixel shader exports past the draw's attachments - #135
Merged
boykopovar merged 1 commit intoSep 30, 2026
Merged
boykopovar merged 1 commit into
boykopovar merged 1 commit into
Conversation
An MRT export to a slot past the draw's color attachments (outside
CB_TARGET_MASK & CB_SHADER_MASK, e.g. MRT1 with only slot 0 enabled) is
dropped by the color backend. Vulkan discards a fragment output without
an attachment the same way, but validation rejected the draw ("fragment
shader must export float4 colors at locations below the attachment
count"). Such outputs are now left out of the written locations, and
only the exports that reach an attachment must be float4.
oneandonlydean
marked this pull request as draft
September 29, 2026 01:56
Collaborator
Author
|
Moving this to draft: in a game test, the change it comes from blanks Astro Bot's intro. I'm narrowing down which part is responsible and will update or close this PR. |
oneandonlydean
marked this pull request as ready for review
September 29, 2026 02:27
Collaborator
Author
|
Ready again. A bisect traced the blank intro to a different change (the pixel-input slot mapping, #137), not this one. |
oneandonlydean
force-pushed
the
fix/agc-drop-exports-past-attachments
branch
from
September 30, 2026 11:12
7a59c67 to
2b0fa0b
Compare
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.
What
A pixel shader may export MRT slots the draw has no color attachment for, for example MRT1 when
CB_TARGET_MASK & CB_SHADER_MASKenables only slot 0. The color backend drops those exports. Vulkan also discards a fragment output that has no attachment. ButValidateShadersrejected the whole draw with "fragment shader must export float4 colors at locations below the attachment count".Outputs at or past the attachment count are now left out of the returned written locations. Only exports that reach an attachment must still be float4; otherwise validation throws "fragment shader must export float4 colors to its attachments".
Tested
agc_driver_graphics_testsvalidationTestsadds a fragment module with outputs at Locations 0 and 1 against one attachment. The written set must be {0}.ShaderValidation.cppthe test fails with "must export float4 colors at locations below the attachment count".ctest: 57/57 pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository