Commit 4666f8c9 authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund

nir/spirv: Use uniform rather than shader_in for kernel inputs

parent 265fae06
......@@ -827,7 +827,7 @@ static nir_ssa_def *
build_addr_for_var(nir_builder *b, nir_variable *var,
nir_address_format addr_format)
{
assert(var->data.mode & (nir_var_shader_in | nir_var_mem_shared |
assert(var->data.mode & (nir_var_uniform | nir_var_mem_shared |
nir_var_shader_temp | nir_var_function_temp |
nir_var_mem_constant));
......@@ -977,7 +977,7 @@ build_explicit_io_load(nir_builder *b, nir_intrinsic_instr *intrin,
assert(addr_format_is_global(addr_format));
op = nir_intrinsic_load_global;
break;
case nir_var_shader_in:
case nir_var_uniform:
assert(addr_format_is_offset(addr_format));
op = nir_intrinsic_load_kernel_input;
break;
......
......@@ -5454,7 +5454,7 @@ vtn_emit_kernel_entry_point_wrapper(struct vtn_builder *b,
/* input variable */
nir_variable *in_var = rzalloc(b->nb.shader, nir_variable);
in_var->data.mode = nir_var_shader_in;
in_var->data.mode = nir_var_uniform;
in_var->data.read_only = true;
in_var->data.location = i;
if (param_type->base_type == vtn_base_type_image) {
......
......@@ -2631,12 +2631,12 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
ptr_type = rzalloc(b, struct vtn_type);
ptr_type->base_type = vtn_base_type_pointer;
ptr_type->deref = sampler_type;
ptr_type->storage_class = SpvStorageClassUniform;
ptr_type->storage_class = SpvStorageClassUniformConstant;
ptr_type->type = nir_address_format_to_glsl_type(
vtn_mode_to_address_format(b, vtn_variable_mode_function));
vtn_create_variable(b, val, ptr_type, ptr_type->storage_class, NULL, NULL);
vtn_create_variable(b, val, ptr_type, SpvStorageClassUniform, NULL, NULL);
nir_variable *nir_var = val->pointer->var->var;
nir_var->data.sampler.is_inline_sampler = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment