diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index 6f0434ab255..0df505f7255 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -1299,16 +1299,8 @@ pipeline_populate_v3d_vs_key(struct v3d_vs_key *key, struct v3dv_pipeline *pipeline = p_stage->pipeline; - /* Vulkan specifies a point size per vertex, so true for if the prim are - * points, like on ES2) - */ - const VkPipelineInputAssemblyStateCreateInfo *ia_info = - pCreateInfo->pInputAssemblyState; - uint8_t topology = vk_to_mesa_prim[ia_info->topology]; - - /* FIXME: PRIM_POINTS is not enough, in gallium the full check is - * MESA_PRIM_POINTS && v3d->rasterizer->base.point_size_per_vertex */ - key->per_vertex_point_size = (topology == MESA_PRIM_POINTS); + key->per_vertex_point_size = + p_stage->nir->info.outputs_written & (1ull << VARYING_SLOT_PSIZ); key->is_coord = broadcom_shader_stage_is_binning(p_stage->stage); diff --git a/src/broadcom/vulkan/v3dvx_pipeline.c b/src/broadcom/vulkan/v3dvx_pipeline.c index 6c4e340f6af..51738a2aa4f 100644 --- a/src/broadcom/vulkan/v3dvx_pipeline.c +++ b/src/broadcom/vulkan/v3dvx_pipeline.c @@ -375,7 +375,9 @@ pack_shader_state_record(struct v3dv_pipeline *pipeline) bool point_size_in_shaded_vertex_data; if (!pipeline->has_gs) { - point_size_in_shaded_vertex_data = pipeline->topology == MESA_PRIM_POINTS; + struct v3d_vs_prog_data *prog_data_vs = + pipeline->shared_data->variants[BROADCOM_SHADER_VERTEX]->prog_data.vs; + point_size_in_shaded_vertex_data = prog_data_vs->writes_psiz; } else { struct v3d_gs_prog_data *prog_data_gs = pipeline->shared_data->variants[BROADCOM_SHADER_GEOMETRY]->prog_data.gs;