-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite some handling codes of unpacked output locations #2871
Merged
Conversation
This file contains 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
Test summary for commit e8442d7CTS tests (Failed: 12/138443)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
amdrexu
force-pushed
the
feature
branch
2 times, most recently
from
December 12, 2023 09:25
be8588c
to
cbf16bf
Compare
We have the logic to keep all locations in some conditions to initialize more location map entries than actually needed. The original logic is somewhat vague when TCS dynamic indexing is involved (the same to mesh shader outputs). For example: layout(location = 10) out float data[5] ... data[i] = XXX Location 0-9 should be initialized to 'unmapped' status and we only map the actual location range, which is location 10-14. The original code mapped all locations 0-14. This is incorrect if we have two arrays: layout(location = 5) out float data1[5] layout(location = 10) out float data2[5] ... data1[i] = XXX data2[j] = YYY In resource collecting pass, also re-write some handling codes of unpacked output locations. This is to address such case: layout(location = 0) out float data1[5] layout(location = 5) out float data2 layout(location = 6) out float data3[5] ... data1[i] = XXX data2 = 0.5 data3[j] = YYY When handing dynamic indexing, data1 is assigned to location 0-5 and data3 is assigned to location 6-10 without location mapping needed in resource collecting pass. data2 could take location 5 but our current logic assigns it to 0 without checking already-occupied locations. Such error is found when compiling a separate TCS (not full pipeline). So we must first colllect occupied locations and do location mapping after that.
Test summary for commit cbf16bfCTS tests (Failed: 0/138443)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
amdrexu
changed the title
Rewrite some handling codes in markGenericInputOutputUsage for clearness
Rewrite some handling codes of unpacked output locations
Dec 12, 2023
Test summary for commit cea738dCTS tests (Failed: 0/138443)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
nhaehnle
approved these changes
Dec 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
We have the logic to keep all locations in some conditions to initialize
more location map entries than actually needed. The original logic is
somewhat vague when TCS dynamic indexing is involved (the same to mesh
shader outputs). For example:
Location 0-9 should be initialized to 'unmapped' status and we only map
the actual location range, which is location 10-14. The original code
mapped all locations 0-14. This is incorrect if we have two arrays:
In resource collecting pass, also re-write some handling codes of
unpacked output locations. This is to address such case:
When handing dynamic indexing, data1 is assigned to location 0-5 and data3
is assigned to location 6-10 without location mapping needed in resource
collecting pass. data2 could take location 5 but our current logic assigns
it to 0 without checking already-occupied locations. Such error is found
when compiling a separate TCS (not full pipeline). So we must first
colllect occupied locations and do location mapping after that.