diff options
author | Karol Herbst <[email protected]> | 2019-01-16 00:09:27 +0100 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-01-19 20:01:41 +0100 |
commit | 3afc1e068f9f3ad125decc2761f7c0cf1fe2c3a6 (patch) | |
tree | 7b7848ed692ba239c5f41f5cf0a130bb83234d64 /src/compiler | |
parent | 9b24028426702f8d4c8c1f563ff9d32b99532357 (diff) |
nir: rename nir_var_ubo to nir_var_mem_ubo
Signed-off-by: Karol Herbst <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir.c | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir.h | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_io.c | 6 | ||||
-rw-r--r-- | src/compiler/nir/nir_print.c | 4 | ||||
-rw-r--r-- | src/compiler/nir/nir_validate.c | 2 | ||||
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 4 |
7 files changed, 11 insertions, 11 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 7a96957f27e..6246c998022 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -367,7 +367,7 @@ nir_visitor::visit(ir_variable *ir) case ir_var_uniform: if (ir->get_interface_type()) - var->data.mode = nir_var_ubo; + var->data.mode = nir_var_mem_ubo; else var->data.mode = nir_var_uniform; break; diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 57ae2afc2e7..fa9f3fe7e49 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -142,7 +142,7 @@ nir_shader_add_variable(nir_shader *shader, nir_variable *var) break; case nir_var_uniform: - case nir_var_ubo: + case nir_var_mem_ubo: case nir_var_ssbo: exec_list_push_tail(&shader->uniforms, &var->node); break; diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index f09d0ddaea3..fb264fb982b 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -100,7 +100,7 @@ typedef enum { nir_var_shader_temp = (1 << 2), nir_var_function_temp = (1 << 3), nir_var_uniform = (1 << 4), - nir_var_ubo = (1 << 5), + nir_var_mem_ubo = (1 << 5), nir_var_system_value = (1 << 6), nir_var_ssbo = (1 << 7), nir_var_shared = (1 << 8), diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 44af76de599..c118842277c 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -54,7 +54,7 @@ nir_assign_var_locations(struct exec_list *var_list, unsigned *size, * UBOs have their own address spaces, so don't count them towards the * number of global uniforms */ - if (var->data.mode == nir_var_ubo || var->data.mode == nir_var_ssbo) + if (var->data.mode == nir_var_mem_ubo || var->data.mode == nir_var_ssbo) continue; var->data.driver_location = location; @@ -587,7 +587,7 @@ build_explicit_io_load(nir_builder *b, nir_intrinsic_instr *intrin, nir_intrinsic_op op; switch (mode) { - case nir_var_ubo: + case nir_var_mem_ubo: op = nir_intrinsic_load_ubo; break; case nir_var_ssbo: @@ -602,7 +602,7 @@ build_explicit_io_load(nir_builder *b, nir_intrinsic_instr *intrin, load->src[0] = nir_src_for_ssa(addr_to_index(b, addr, addr_format)); load->src[1] = nir_src_for_ssa(addr_to_offset(b, addr, addr_format)); - if (mode != nir_var_ubo) + if (mode != nir_var_mem_ubo) nir_intrinsic_set_access(load, nir_intrinsic_access(intrin)); /* TODO: We should try and provide a better alignment. For OpenCL, we need diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 7e1ad61915b..d9bc073b2d5 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -413,7 +413,7 @@ get_variable_mode_str(nir_variable_mode mode, bool want_local_global_mode) return "shader_out"; case nir_var_uniform: return "uniform"; - case nir_var_ubo: + case nir_var_mem_ubo: return "ubo"; case nir_var_system_value: return "system"; @@ -506,7 +506,7 @@ print_var_decl(nir_variable *var, print_state *state) if (var->data.mode == nir_var_shader_in || var->data.mode == nir_var_shader_out || var->data.mode == nir_var_uniform || - var->data.mode == nir_var_ubo || + var->data.mode == nir_var_mem_ubo || var->data.mode == nir_var_ssbo) { const char *loc = NULL; char buf[4]; diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 43757858207..22af3b6e757 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -446,7 +446,7 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state) case nir_deref_type_array: case nir_deref_type_array_wildcard: - if (instr->mode == nir_var_ubo || + if (instr->mode == nir_var_mem_ubo || instr->mode == nir_var_ssbo || instr->mode == nir_var_shared) { /* Shared variables and UBO/SSBOs have a bit more relaxed rules diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 16cc7aadd71..0ec34ccbe47 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -259,7 +259,7 @@ vtn_nir_deref_pointer_dereference(struct vtn_builder *b, assert(base->mode == vtn_variable_mode_ssbo || base->mode == vtn_variable_mode_ubo); nir_variable_mode nir_mode = - base->mode == vtn_variable_mode_ssbo ? nir_var_ssbo : nir_var_ubo; + base->mode == vtn_variable_mode_ssbo ? nir_var_ssbo : nir_var_mem_ubo; tail = nir_build_deref_cast(&b->nb, desc, nir_mode, type->type, base->ptr_type->stride); @@ -1662,7 +1662,7 @@ vtn_storage_class_to_mode(struct vtn_builder *b, case SpvStorageClassUniform: if (interface_type->block) { mode = vtn_variable_mode_ubo; - nir_mode = nir_var_ubo; + nir_mode = nir_var_mem_ubo; } else if (interface_type->buffer_block) { mode = vtn_variable_mode_ssbo; nir_mode = nir_var_ssbo; |