From ef17fbf8e5f92f52d2e169d0d11601f5de846039 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 20 Mar 2025 10:32:09 +0200 Subject: [PATCH] anv/brw: use separate_shader to deduced MUE compaction Signed-off-by: Lionel Landwerlin Reviewed-by: Ivan Briano Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_compile_mesh.cpp | 6 +++++- src/intel/compiler/brw_compiler.h | 3 --- src/intel/vulkan/anv_pipeline.c | 9 ++------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/intel/compiler/brw_compile_mesh.cpp b/src/intel/compiler/brw_compile_mesh.cpp index 28110f4ef8c..87337412b5d 100644 --- a/src/intel/compiler/brw_compile_mesh.cpp +++ b/src/intel/compiler/brw_compile_mesh.cpp @@ -1662,8 +1662,12 @@ brw_compile_mesh(const struct brw_compiler *compiler, brw_nir_lower_tue_inputs(nir, params->tue_map); + /* Incorrectly set separate to false until we fix the anv/brw in the next + * commit. + */ brw_compute_mue_map(compiler, nir, &prog_data->map, - prog_data->index_format, key->compact_mue); + prog_data->index_format, + false /* TODO: use nir->info.separate_shader */); brw_nir_lower_mue_outputs(nir, &prog_data->map); prog_data->autostrip_enable = brw_mesh_autostrip_enable(compiler, nir, &prog_data->map); diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index 9bbc5fc737b..b56bef64337 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -338,9 +338,6 @@ struct brw_task_prog_key struct brw_mesh_prog_key { struct brw_base_prog_key base; - - bool compact_mue:1; - unsigned padding:31; }; /** The program key for Fragment/Pixel Shaders. */ diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index b35b34fb9b2..3ff44b435f8 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -431,14 +431,12 @@ populate_task_prog_key(struct anv_pipeline_stage *stage, static void populate_mesh_prog_key(struct anv_pipeline_stage *stage, - const struct anv_device *device, - bool compact_mue) + const struct anv_device *device) { memset(&stage->key, 0, sizeof(stage->key)); populate_base_prog_key(stage, device); - stage->key.mesh.compact_mue = compact_mue; stage->key.base.uses_inline_push_addr = true; } @@ -1805,10 +1803,7 @@ anv_graphics_pipeline_init_keys(struct anv_graphics_base_pipeline *pipeline, break; case MESA_SHADER_MESH: { - const bool compact_mue = - !(pipeline->base.type == ANV_PIPELINE_GRAPHICS_LIB && - !anv_pipeline_base_has_stage(pipeline, MESA_SHADER_FRAGMENT)); - populate_mesh_prog_key(&stages[s], device, compact_mue); + populate_mesh_prog_key(&stages[s], device); break; }