Mesa (master): v3dv/pipeline: remove compiled_variant_count field

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Mar 22 17:22:34 UTC 2021


Module: Mesa
Branch: master
Commit: b8c73c512a3906884aceb821a40376461d5f3ddb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8c73c512a3906884aceb821a40376461d5f3ddb

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Mon Mar 15 21:55:23 2021 +0100

v3dv/pipeline: remove compiled_variant_count field

We are not really compiling several variants, or at least not on the
same pipeline.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403>

---

 src/broadcom/vulkan/v3dv_pipeline.c | 13 +++----------
 src/broadcom/vulkan/v3dv_private.h  |  2 --
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c
index 0283a51614c..c89e42690cc 100644
--- a/src/broadcom/vulkan/v3dv_pipeline.c
+++ b/src/broadcom/vulkan/v3dv_pipeline.c
@@ -1452,14 +1452,11 @@ v3dv_get_shader_variant(struct v3dv_pipeline_stage *p_stage,
       &pipeline->device->instance->physicalDevice;
    const struct v3d_compiler *compiler = physical_device->compiler;
 
-   uint32_t variant_id = p_atomic_inc_return(&p_stage->compiled_variant_count);
-
    if (V3D_DEBUG & (V3D_DEBUG_NIR |
                     v3d_debug_flag_for_shader_stage(p_stage->stage))) {
-      fprintf(stderr, "Just before v3d_compile: %s prog %d variant %d NIR:\n",
+      fprintf(stderr, "Just before v3d_compile: %s prog %d NIR:\n",
               gl_shader_stage_name(p_stage->stage),
-              p_stage->program_id,
-              variant_id);
+              p_stage->program_id);
       nir_print_shader(p_stage->nir, stderr);
       fprintf(stderr, "\n");
    }
@@ -1472,8 +1469,7 @@ v3dv_get_shader_variant(struct v3dv_pipeline_stage *p_stage,
                            key, &prog_data,
                            p_stage->nir,
                            shader_debug_output, NULL,
-                           p_stage->program_id,
-                           variant_id,
+                           p_stage->program_id, 0,
                            &qpu_insts_size);
 
    if (!qpu_insts) {
@@ -1826,7 +1822,6 @@ pipeline_compile_graphics(struct v3dv_pipeline *pipeline,
        */
       p_stage->program_id =
          p_atomic_inc_return(&physical_device->next_program_id);
-      p_stage->compiled_variant_count = 0;
 
       p_stage->pipeline = pipeline;
       p_stage->stage = stage;
@@ -1884,7 +1879,6 @@ pipeline_compile_graphics(struct v3dv_pipeline *pipeline,
 
       p_stage->program_id =
          p_atomic_inc_return(&physical_device->next_program_id);
-      p_stage->compiled_variant_count = 0;
 
       pipeline->fs = p_stage;
       pipeline->active_stages |= MESA_SHADER_FRAGMENT;
@@ -2959,7 +2953,6 @@ pipeline_compile_compute(struct v3dv_pipeline *pipeline,
       return VK_ERROR_OUT_OF_HOST_MEMORY;
 
    p_stage->program_id = p_atomic_inc_return(&physical_device->next_program_id);
-   p_stage->compiled_variant_count = 0;
    p_stage->pipeline = pipeline;
    p_stage->stage = stage;
    p_stage->entrypoint = sinfo->pName;
diff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h
index 179dcbb4d4f..3e871a2f761 100644
--- a/src/broadcom/vulkan/v3dv_private.h
+++ b/src/broadcom/vulkan/v3dv_private.h
@@ -1363,8 +1363,6 @@ struct v3dv_pipeline_stage {
 
    /** A name for this program, so you can track it in shader-db output. */
    uint32_t program_id;
-   /** How many variants of this program were compiled, for shader-db. */
-   uint32_t compiled_variant_count;
 
    /* The following are the default v3d_key populated using
     * VkCreateGraphicsPipelineCreateInfo. Variants will be created tweaking



More information about the mesa-commit mailing list