nir/lower_io: Support shader_call_data in vars_to_explicit_types
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7356>
This commit is contained in:
parent
477d2f0379
commit
a7dd172aaa
|
@ -2240,6 +2240,7 @@ lower_vars_to_explicit(nir_shader *shader,
|
|||
case nir_var_mem_constant:
|
||||
offset = shader->constant_data_size;
|
||||
break;
|
||||
case nir_var_shader_call_data:
|
||||
case nir_var_ray_hit_attrib:
|
||||
offset = 0;
|
||||
break;
|
||||
|
@ -2279,6 +2280,7 @@ lower_vars_to_explicit(nir_shader *shader,
|
|||
case nir_var_mem_constant:
|
||||
shader->constant_data_size = offset;
|
||||
break;
|
||||
case nir_var_shader_call_data:
|
||||
case nir_var_ray_hit_attrib:
|
||||
break;
|
||||
default:
|
||||
|
@ -2305,7 +2307,7 @@ nir_lower_vars_to_explicit_types(nir_shader *shader,
|
|||
ASSERTED nir_variable_mode supported =
|
||||
nir_var_mem_shared | nir_var_mem_global | nir_var_mem_constant |
|
||||
nir_var_shader_temp | nir_var_function_temp | nir_var_uniform |
|
||||
nir_var_ray_hit_attrib;
|
||||
nir_var_shader_call_data | nir_var_ray_hit_attrib;
|
||||
assert(!(modes & ~supported) && "unsupported");
|
||||
|
||||
bool progress = false;
|
||||
|
@ -2318,6 +2320,8 @@ nir_lower_vars_to_explicit_types(nir_shader *shader,
|
|||
progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_shader_temp, type_info);
|
||||
if (modes & nir_var_mem_constant)
|
||||
progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_mem_constant, type_info);
|
||||
if (modes & nir_var_shader_call_data)
|
||||
progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_shader_call_data, type_info);
|
||||
if (modes & nir_var_ray_hit_attrib)
|
||||
progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_ray_hit_attrib, type_info);
|
||||
|
||||
|
|
Loading…
Reference in New Issue