-
Notifications
You must be signed in to change notification settings - Fork 59
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
shader cache polishing #748
base: master
Are you sure you want to change the base?
Conversation
@devshgraphicsprogramming did i miss anything? |
Did you test the hash cache works nicely on example 23 (arithmetic test) and 62 CAD ? |
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
std::vector<unsigned char> compressedSpirv = {}; | ||
compressedSpirv.resize(propsSize + destLen); |
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.
why are you making a temp vector just to memcpy
it later into a spirv
buffer?
just make the buffer now and write into that
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.
the final size after compression is unknown and ICPUBuffer
can't be resized (unless you ask me to add a resize
method?)
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.
ok didn't realize.
In that case, there's a thing called CCPUBuffer
with a custom allocator that can also adopt memory
you can malloc
instead of having a vector, then realloc
and after realloc is complete you can create that CCustomAllocatorCPUBuffer
with core::adopt_memory
tag constructor overload
You just need to provide an "allocator" which will call free()
on the adopted pointer
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.
i'll address this in the upcoming Lib Shader Stage PR
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
@Erfan-Ahmadi you can merge, this will probably help you a lot with the cache size |
Description
Testing
TODO list: