lavapipe: create parameters not properly ignored
Along the lines of #2210 (closed) and #2258 (closed) I have a test which exercises some corner cases of the vulkan API where you're allowed to pass a garbage pointer for structs where they are defined to be ignored. This is things like e.g. pDepthStencilState
in PSO creation when there's no depth/stencil attachment for the subpass, or things like that.
In deep_copy_graphics_create_info
(at least, possibly other areas but this was the first crash I hit) the code only checks against NULL, and assumes non-NULL pointers are valid to read from. That would be sensible but unfortunately isn't the case.
To reproduce the ones I tested you can clone RenderDoc from git and build the demos program under util/test/demos
. It will need either glslc
or glslangValidator
in your PATH - or before building the main demos project you can run ./build-shaderc.sh
from within util/test/demos/3rdparty/shaderc
and it will statically link in a compiler.
Then run demos_x64 VK_Parameter_Zoo --gpu llvmpipe
and it will run with the llvmpipe GPU selected wherever it's enumerated.
Tested on master @ 9a0098ee