mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 20:00:10 +01:00
radv: Work around shader_call_data variables in raygen shaders
Closes: #5326 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20930>
This commit is contained in:
parent
002707ff09
commit
4397c166c0
1 changed files with 6 additions and 0 deletions
|
|
@ -842,6 +842,12 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_pipeline_
|
|||
&device->physical_device->nir_options[stage->stage]);
|
||||
nir->info.internal |= is_internal;
|
||||
assert(nir->info.stage == stage->stage);
|
||||
|
||||
/* Work around applications that declare shader_call_data variables inside ray generation
|
||||
* shaders. */
|
||||
if (nir->info.stage == MESA_SHADER_RAYGEN)
|
||||
NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_shader_call_data, NULL);
|
||||
|
||||
nir_validate_shader(nir, "after spirv_to_nir");
|
||||
|
||||
free(spec_entries);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue