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

Refactor shader cache implementation for the mesh instance #6696

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Jun 13, 2024

  • before, we had the string based shader key. As we only had two values to construct the string, and in order to avoid the string construction every draw call, a two level look up was implemented
  • as this is not scalable to more than 2 keys we need in the follow up PRs, this has been changed to a hash key, similarly to the way the render pipeline cache is implemented
  • as the content of this cache is very small (few shaders), a simpler solution was done without handling the hash collisions, which are very unlikely in this case. This is tested and reported in the debug mode, which will allow to avoid it fi this actually takes place.

@mvaligursky mvaligursky merged commit 1806a15 into main Jun 13, 2024
8 checks passed
@mvaligursky mvaligursky deleted the mv-meshinstance-shader-cache branch June 13, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants