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

Remove SetCode() copy in shader instrumentation #9242

Open
spencer-lunarg opened this issue Jan 16, 2025 · 0 comments
Open

Remove SetCode() copy in shader instrumentation #9242

spencer-lunarg opened this issue Jan 16, 2025 · 0 comments
Labels
Enhancement New feature or request

Comments

@spencer-lunarg
Copy link
Contributor

We have this code

// TODO - This makes a copy, but could save on Chassis stack instead (then remove function from VUL).
// The core issue is we always use std::vector<uint32_t> but Safe Struct manages its own version of the pCode
// memory. It would be much harder to change everything from std::vector and instead to adjust Safe Struct to not
// double-free the memory on us. If making any changes, we have to consider a case where the user inlines the
// fragment shader, but use a normal VkShaderModule in the vertex shader.
modified_shader_module_ci->SetCode(instrumented_spirv);

What is needed is a way in VUL to allow the safe struct to let us manage the memory

@spencer-lunarg spencer-lunarg added the Enhancement New feature or request label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant