Module: Mesa Branch: main Commit: f5ba4e855ed9b1a4e2fb7baf51d1cde964c54c6d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5ba4e855ed9b1a4e2fb7baf51d1cde964c54c6d
Author: Samuel Pitoiset <[email protected]> Date: Tue Sep 13 17:35:04 2022 +0200 radv: do not remove PSIZ for VS when the topology is unknown When compiling only the pre-rast stages in a library, the input assembly state might not be present and the topology would be 0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18519> --- src/amd/vulkan/radv_pipeline.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 1a139d591c2..dd0fc93259d 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2170,6 +2170,11 @@ radv_remove_point_size(const struct radv_pipeline_key *pipeline_key, if (producer->xfb_info) return; + /* Do not remove PSIZ for vertex shaders when the topology is unknown. */ + if (producer->info.stage == MESA_SHADER_VERTEX && + pipeline_key->vs.topology == V_008958_DI_PT_NONE) + return; + /* Do not remove PSIZ if the rasterization primitive uses points. */ if (consumer->info.stage == MESA_SHADER_FRAGMENT && ((producer->info.stage == MESA_SHADER_VERTEX &&
