radv: consider radix sort shaders to be internal/meta
Cleans up RADV_DEBUG=shaders Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16198>
This commit is contained in:
parent
c9f68361a8
commit
8a525c0fa5
|
@ -537,6 +537,8 @@ radv_device_init_meta(struct radv_device *device)
|
|||
|
||||
mtx_init(&device->meta_state.mtx, mtx_plain);
|
||||
|
||||
device->app_shaders_internal = true;
|
||||
|
||||
result = radv_device_init_meta_clear_state(device, on_demand);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_clear;
|
||||
|
@ -597,6 +599,8 @@ radv_device_init_meta(struct radv_device *device)
|
|||
if (result != VK_SUCCESS)
|
||||
goto fail_etc_decode;
|
||||
|
||||
device->app_shaders_internal = false;
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
||||
fail_etc_decode:
|
||||
|
|
|
@ -884,6 +884,9 @@ struct radv_device {
|
|||
|
||||
/* Whether per-vertex VRS is forced. */
|
||||
bool force_vrs_enabled;
|
||||
|
||||
/* Whether shaders created through application entrypoints are considered internal. */
|
||||
bool app_shaders_internal;
|
||||
};
|
||||
|
||||
struct radv_device_memory {
|
||||
|
|
|
@ -579,7 +579,9 @@ radv_shader_compile_to_nir(struct radv_device *device, const struct radv_pipelin
|
|||
uint32_t *spirv = (uint32_t *)stage->spirv.data;
|
||||
assert(stage->spirv.size % 4 == 0);
|
||||
|
||||
if (device->instance->debug_flags & RADV_DEBUG_DUMP_SPIRV)
|
||||
bool dump_meta = device->instance->debug_flags & RADV_DEBUG_DUMP_META_SHADERS;
|
||||
if ((device->instance->debug_flags & RADV_DEBUG_DUMP_SPIRV) &&
|
||||
(!device->app_shaders_internal || dump_meta))
|
||||
radv_print_spirv(stage->spirv.data, stage->spirv.size, stderr);
|
||||
|
||||
uint32_t num_spec_entries = 0;
|
||||
|
@ -669,6 +671,7 @@ radv_shader_compile_to_nir(struct radv_device *device, const struct radv_pipelin
|
|||
nir = spirv_to_nir(spirv, stage->spirv.size / 4, spec_entries, num_spec_entries, stage->stage,
|
||||
stage->entrypoint, &spirv_options,
|
||||
&device->physical_device->nir_options[stage->stage]);
|
||||
nir->info.internal |= device->app_shaders_internal;
|
||||
assert(nir->info.stage == stage->stage);
|
||||
nir_validate_shader(nir, "after spirv_to_nir");
|
||||
|
||||
|
|
Loading…
Reference in New Issue