[RADV] create parameters not properly ignored
In radv_generate_graphics_pipeline_key
it checks that pTessellationState
is non-NULL and if it's present dereferences it to get the number of control points. The vulkan spec says though that this pointer needs only be valid if a tessellation shader is present, so it could be non-NULL garbage otherwise and should be ignored. Similarly with pMultisampleState
needs only be valid if rasterization is enabled.
Similar places where only NULL checks exist but pointers should be ignored entirely if rasterization is disabled (or other circumstances like pDepthStencilState
if there's no depth/stencil attachment).
- In
radv_pipeline_init_blend_state
withpColorBlendState
. - In
radv_pipeline_init_multisample_state
withpMultisampleState
.
I didn't test anv or other vulkan backends that may have similar issues.
Edited by Baldur Karlsson