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 <charmainel@vmware.com> Reviewed-by: Neha Bhende <bhenden@vmware.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user