Module: Mesa Branch: main Commit: fc0ca7407b1b028f22fdb622a1b9842f50d67ba6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc0ca7407b1b028f22fdb622a1b9842f50d67ba6
Author: Iago Toral Quiroga <[email protected]> Date: Tue Aug 1 11:43:15 2023 +0200 v3dv: fix incorrect key setup We had this incorrectly included inside the body of loop over the subpass attachments so when all attachments are unused we would not set this correctly. Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396> --- src/broadcom/vulkan/v3dv_pipeline.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index 1518d131dca..eac5bbec2d8 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -1089,6 +1089,17 @@ pipeline_populate_v3d_fs_key(struct v3d_fs_key *key, key->is_points = (topology == MESA_PRIM_POINTS); key->is_lines = (topology >= MESA_PRIM_LINES && topology <= MESA_PRIM_LINE_STRIP); + + if (key->is_points) { + /* This mask represents state for GL_ARB_point_sprite which is not + * relevant to Vulkan. + */ + key->point_sprite_mask = 0; + + /* Vulkan mandates upper left. */ + key->point_coord_upper_left = true; + } + key->has_gs = has_geometry_shader; const VkPipelineColorBlendStateCreateInfo *cb_info = @@ -1165,16 +1176,6 @@ pipeline_populate_v3d_fs_key(struct v3d_fs_key *key, else if (util_format_is_pure_sint(fb_pipe_format)) key->int_color_rb |= 1 << i; } - - if (key->is_points) { - /* This mask represents state for GL_ARB_point_sprite which is not - * relevant to Vulkan. - */ - key->point_sprite_mask = 0; - - /* Vulkan mandates upper left. */ - key->point_coord_upper_left = true; - } } }
