summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2019-01-16 00:09:27 +0100
committerKarol Herbst <[email protected]>2019-01-19 20:01:41 +0100
commit3afc1e068f9f3ad125decc2761f7c0cf1fe2c3a6 (patch)
tree7b7848ed692ba239c5f41f5cf0a130bb83234d64
parent9b24028426702f8d4c8c1f563ff9d32b99532357 (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]>
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp2
-rw-r--r--src/compiler/nir/nir.c2
-rw-r--r--src/compiler/nir/nir.h2
-rw-r--r--src/compiler/nir/nir_lower_io.c6
-rw-r--r--src/compiler/nir/nir_print.c4
-rw-r--r--src/compiler/nir/nir_validate.c2
-rw-r--r--src/compiler/spirv/vtn_variables.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c2
-rw-r--r--src/intel/vulkan/anv_pipeline.c2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp2
10 files changed, 14 insertions, 14 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;
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index c89a1e6f91b..ab8c4486ce7 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -677,7 +677,7 @@ void si_nir_scan_shader(const struct nir_shader *nir,
*/
if (variable->interface_type != NULL) {
if (variable->data.mode == nir_var_uniform ||
- variable->data.mode == nir_var_ubo) {
+ variable->data.mode == nir_var_mem_ubo) {
unsigned block_count;
if (base_type != GLSL_TYPE_INTERFACE) {
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index e89b78ec1fc..4acbd1040f4 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -211,7 +211,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
NIR_PASS_V(nir, nir_remove_dead_variables,
nir_var_shader_in | nir_var_shader_out | nir_var_system_value);
- NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_ubo | nir_var_ssbo,
+ NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_ubo | nir_var_ssbo,
nir_address_format_vk_index_offset);
NIR_PASS_V(nir, nir_propagate_invariant);
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index bf8d770db73..c2a75c8bd08 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -253,7 +253,7 @@ st_nir_assign_uniform_locations(struct gl_context *ctx,
* UBO's have their own address spaces, so don't count them towards the
* number of global uniforms
*/
- if (uniform->data.mode == nir_var_ubo || uniform->data.mode == nir_var_ssbo)
+ if (uniform->data.mode == nir_var_mem_ubo || uniform->data.mode == nir_var_ssbo)
continue;
const struct glsl_type *type = glsl_without_array(uniform->type);