diff options
author | Brian Paul <[email protected]> | 2018-04-13 09:38:16 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-04-13 13:53:08 -0600 |
commit | 5dc7233f444a84f6317509e690c861a87562775e (patch) | |
tree | da89f47ef3fcc53e8aacb91b48213bb3e93bd538 /src/compiler/glsl | |
parent | 73f1e33d34b2044f2252a73e0fdd827d39724505 (diff) |
glsl: rename 'interface' var to 'iface' to fix MSVC build
The recent mtypes.h removal patches seems to have exposed a MSVC
issue where 'interface' is defined as a macro in an MSVC header file.
Reviewed-by: Charmaine Lee <[email protected]>
Reviewed-by: Neha Bhende <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index ecd267b24f3..f060c5316fa 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4201,7 +4201,7 @@ get_array_size(struct gl_uniform_storage *uni, const glsl_struct_field *field, static int get_array_stride(struct gl_context *ctx, struct gl_uniform_storage *uni, - const glsl_type *interface, const glsl_struct_field *field, + const glsl_type *iface, const glsl_struct_field *field, char *interface_name, char *var_name) { /* The ARB_program_interface_query spec says: @@ -4227,7 +4227,7 @@ get_array_stride(struct gl_context *ctx, struct gl_uniform_storage *uni, return 0; if (GLSL_INTERFACE_PACKING_STD140 == - interface-> + iface-> get_internal_ifc_packing(ctx->Const.UseSTD430AsDefaultPacking)) { if (array_type->is_record() || array_type->is_array()) return glsl_align(array_type->std140_size(row_major), 16); @@ -4281,17 +4281,17 @@ calculate_array_size_and_stride(struct gl_context *ctx, var->data.mode != ir_var_shader_storage) continue; - const glsl_type *interface = var->get_interface_type(); + const glsl_type *iface = var->get_interface_type(); - if (strcmp(interface_name, interface->name) != 0) + if (strcmp(interface_name, iface->name) != 0) continue; - for (unsigned i = 0; i < interface->length; i++) { - const glsl_struct_field *field = &interface->fields.structure[i]; + for (unsigned i = 0; i < iface->length; i++) { + const glsl_struct_field *field = &iface->fields.structure[i]; if (strcmp(field->name, var_name) != 0) continue; - array_stride = get_array_stride(ctx, uni, interface, field, + array_stride = get_array_stride(ctx, uni, iface, field, interface_name, var_name); array_size = get_array_size(uni, field, interface_name, var_name); goto write_top_level_array_size_and_stride; |