KhronosGroup / Vulkan-ExtensionLayer

Layer providing Vulkan features when native support is unavailable

Home Page:https://vulkan.lunarg.com/doc/sdk/latest/linux/synchronization2_layer.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential use of pipeline with different shaders than requested

qbojj opened this issue · comments

Because Shaders are allocated on the heap two different Shaders might have the same address if one was deallocated before the other one was allocated, even if they might not have identical contents.

Because stale Shaders might be stored inside FullDrawStateDatas inside vertex/mesh shader's Shader::pipelines, equality test of FullDrawStateData might return true when their Shaders are not equal as argumented above.

If such thing happens a pipeline with wrong shaders attached might be used.

for (uint32_t i = 0; i < NUM_SHADERS; ++i) {
if (!(o.shaders_[i] == shaders_[i])) {
return false;
}
}