Skip to content
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

Fix hash calculation for descriptor set layouts caching. #39

Merged
merged 1 commit into from
Sep 9, 2018
Merged

Fix hash calculation for descriptor set layouts caching. #39

merged 1 commit into from
Sep 9, 2018

Conversation

Warpten
Copy link
Contributor

@Warpten Warpten commented Sep 7, 2018

The "hash" (if anything, it'd rather be a key) calculated for caching descriptor set layouts only considers the last resource of the selected set.

On an unrelated note, I don't like the usage of bitfields here; DescriptorSetLayoutBindingBitField without being packed already fits in a 64-bit register anyways.

Maybe consider specializing std::hash to make this code less, uh, .... weird.

Note that even with the proposed fix this is still very weird, as you are basically reinterpreting a vector<i32> as a vector<i64> where size is divided by two, yet you don't account for that when allocating the vector.

@soconne soconne merged commit a1d8f67 into GPUOpen-LibrariesAndSDKs:master Sep 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants