v3dv: fix program id for binning shaders

We had a comment stating that we were using different program ids for render
and binning but this isn't true. We were only assigning ids to the render
stages and then we would create the binning stages and not assign a program id
to them at all, so they would remain with a program id of 0.

This change removes the comment and makes sure we assign the same program
id to the binning and render stages of the pipeline, which makes it a lot
easier to match render and binning shaders when debugging.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18630>
This commit is contained in:
Iago Toral Quiroga
2022-09-16 10:22:16 +02:00
committed by Marge Bot
parent 074f3216f2
commit 0fc38b358b
+1 -6
View File
@@ -1431,6 +1431,7 @@ pipeline_stage_create_binning(const struct v3dv_pipeline_stage *src,
* we only have to run the relevant NIR lowerings once for render shaders
*/
p_stage->nir = NULL;
p_stage->program_id = src->program_id;
p_stage->spec_info = src->spec_info;
p_stage->feedback = (VkPipelineCreationFeedback) { 0 };
memcpy(p_stage->shader_sha1, src->shader_sha1, 20);
@@ -2370,12 +2371,6 @@ pipeline_compile_graphics(struct v3dv_pipeline *pipeline,
if (p_stage == NULL)
return VK_ERROR_OUT_OF_HOST_MEMORY;
/* Note that we are assigning program_id slightly differently that
* v3d. Here we are assigning one per pipeline stage, so vs and vs_bin
* would have a different program_id, while v3d would have the same for
* both. For the case of v3dv, it is more natural to have an id this way,
* as right now we are using it for debugging, not for shader-db.
*/
p_stage->program_id =
p_atomic_inc_return(&physical_device->next_program_id);