radv: Mark GS copy shaders as internal.

Instead of passing the meta_shader arg.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32079>
This commit is contained in:
Timur Kristóf
2024-11-11 12:46:53 +01:00
parent 86795a6337
commit 57161f516e
5 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ radv_compile_cs(struct radv_device *device, struct vk_pipeline_cache *cache, str
/* Postprocess NIR. */
radv_postprocess_nir(device, NULL, cs_stage);
bool dump_shader = radv_can_dump_shader(device, cs_stage->nir, false);
bool dump_shader = radv_can_dump_shader(device, cs_stage->nir);
if (dump_shader) {
simple_mtx_lock(&instance->shader_dump_mtx);
+4 -2
View File
@@ -2240,6 +2240,8 @@ radv_create_gs_copy_shader(struct radv_device *device, struct vk_pipeline_cache
gs_info->outinfo.vs_output_param_offset, gs_info->outinfo.param_exports, false, false, false,
gs_info->force_vrs_per_vertex, &output_info);
nir->info.internal = true;
nir_validate_shader(nir, "after ac_nir_create_gs_copy_shader");
nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
@@ -2270,7 +2272,7 @@ radv_create_gs_copy_shader(struct radv_device *device, struct vk_pipeline_cache
NIR_PASS_V(nir, radv_nir_lower_abi, pdev->info.gfx_level, &gs_copy_stage, gfx_state, pdev->info.address32_hi);
struct radv_graphics_pipeline_key key = {0};
bool dump_shader = radv_can_dump_shader(device, nir, true);
bool dump_shader = radv_can_dump_shader(device, nir);
if (dump_shader)
simple_mtx_lock(&instance->shader_dump_mtx);
@@ -2334,7 +2336,7 @@ radv_graphics_shaders_nir_to_asm(struct radv_device *device, struct vk_pipeline_
int64_t stage_start = os_time_get_nano();
bool dump_shader = radv_can_dump_shader(device, nir_shaders[0], false);
bool dump_shader = radv_can_dump_shader(device, nir_shaders[0]);
if (dump_shader) {
simple_mtx_lock(&instance->shader_dump_mtx);
+1 -1
View File
@@ -434,7 +434,7 @@ radv_rt_nir_to_asm(struct radv_device *device, struct vk_pipeline_cache *cache,
radv_gather_unused_args(stage_info, shaders[i]);
}
bool dump_shader = radv_can_dump_shader(device, shaders[0], false);
bool dump_shader = radv_can_dump_shader(device, shaders[0]);
bool replayable =
pipeline->base.base.create_flags & VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR;
+3 -4
View File
@@ -96,7 +96,7 @@ is_meta_shader(nir_shader *nir)
}
bool
radv_can_dump_shader(struct radv_device *device, nir_shader *nir, bool meta_shader)
radv_can_dump_shader(struct radv_device *device, nir_shader *nir)
{
const struct radv_physical_device *pdev = radv_device_physical(device);
const struct radv_instance *instance = radv_physical_device_instance(pdev);
@@ -104,7 +104,7 @@ radv_can_dump_shader(struct radv_device *device, nir_shader *nir, bool meta_shad
if (!(instance->debug_flags & RADV_DEBUG_DUMP_SHADERS))
return false;
if ((is_meta_shader(nir) || meta_shader) && !(instance->debug_flags & RADV_DEBUG_DUMP_META_SHADERS))
if (is_meta_shader(nir) && !(instance->debug_flags & RADV_DEBUG_DUMP_META_SHADERS))
return false;
return true;
@@ -3095,8 +3095,7 @@ radv_shader_nir_to_asm(struct radv_device *device, struct radv_shader_stage *pl_
struct radv_nir_compiler_options options = {0};
radv_fill_nir_compiler_options(&options, device, gfx_state, radv_should_use_wgp_mode(device, stage, info),
radv_can_dump_shader(device, shaders[0], false), keep_shader_info,
keep_statistic_info);
radv_can_dump_shader(device, shaders[0]), keep_shader_info, keep_statistic_info);
struct radv_shader_binary *binary =
shader_compile(device, shaders, shader_count, stage, info, &pl_stage->args, &pl_stage->key, &options);
+1 -1
View File
@@ -605,7 +605,7 @@ unsigned radv_compute_spi_ps_input(const struct radv_physical_device *pdev,
const struct radv_graphics_state_key *gfx_state,
const struct radv_shader_info *info);
bool radv_can_dump_shader(struct radv_device *device, nir_shader *nir, bool meta_shader);
bool radv_can_dump_shader(struct radv_device *device, nir_shader *nir);
bool radv_can_dump_shader_stats(struct radv_device *device, nir_shader *nir);