radv,aco: do not implicitly export the primitive ID for mesh shaders
From the Vulkan spec: "VUID-VkGraphicsPipelineCreateInfo-PrimitiveId-06264 If the pipeline is being created with pre-rasterization shader state, it includes a mesh shader and the fragment shader code reads from an input variable that is decorated with PrimitiveId, then the mesh shader code must write to a matching output variable, decorated with PrimitiveId, in all execution paths" So, if PS uses PrimitiveID, MS must export it (like GS). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16438>
This commit is contained in:

committed by
Marge Bot

parent
b043cbc72b
commit
27f1da8215
@@ -3337,10 +3337,8 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
|
||||
|
||||
assert(outinfo);
|
||||
outinfo->export_clip_dists |= ps_clip_dists_in;
|
||||
if (pipeline->graphics.last_vgt_api_stage == MESA_SHADER_MESH) {
|
||||
outinfo->export_prim_id_per_primitive |= ps_prim_id_in;
|
||||
} else if (pipeline->graphics.last_vgt_api_stage == MESA_SHADER_VERTEX ||
|
||||
pipeline->graphics.last_vgt_api_stage == MESA_SHADER_TESS_EVAL) {
|
||||
if (pipeline->graphics.last_vgt_api_stage == MESA_SHADER_VERTEX ||
|
||||
pipeline->graphics.last_vgt_api_stage == MESA_SHADER_TESS_EVAL) {
|
||||
outinfo->export_prim_id |= ps_prim_id_in;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user