intel/compiler: handle GLSL_TYPE_INTERFACE as GLSL_TYPE_STRUCT
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -542,6 +542,7 @@ type_size_scalar(const struct glsl_type *type)
|
||||
case GLSL_TYPE_ARRAY:
|
||||
return type_size_scalar(type->fields.array) * type->length;
|
||||
case GLSL_TYPE_STRUCT:
|
||||
case GLSL_TYPE_INTERFACE:
|
||||
size = 0;
|
||||
for (i = 0; i < type->length; i++) {
|
||||
size += type_size_scalar(type->fields.structure[i].type);
|
||||
@@ -558,7 +559,6 @@ type_size_scalar(const struct glsl_type *type)
|
||||
return 1;
|
||||
case GLSL_TYPE_VOID:
|
||||
case GLSL_TYPE_ERROR:
|
||||
case GLSL_TYPE_INTERFACE:
|
||||
case GLSL_TYPE_FUNCTION:
|
||||
unreachable("not reached");
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ brw_type_for_base_type(const struct glsl_type *type)
|
||||
case GLSL_TYPE_ARRAY:
|
||||
return brw_type_for_base_type(type->fields.array);
|
||||
case GLSL_TYPE_STRUCT:
|
||||
case GLSL_TYPE_INTERFACE:
|
||||
case GLSL_TYPE_SAMPLER:
|
||||
case GLSL_TYPE_ATOMIC_UINT:
|
||||
/* These should be overridden with the type of the member when
|
||||
@@ -72,7 +73,6 @@ brw_type_for_base_type(const struct glsl_type *type)
|
||||
return BRW_REGISTER_TYPE_Q;
|
||||
case GLSL_TYPE_VOID:
|
||||
case GLSL_TYPE_ERROR:
|
||||
case GLSL_TYPE_INTERFACE:
|
||||
case GLSL_TYPE_FUNCTION:
|
||||
unreachable("not reached");
|
||||
}
|
||||
|
||||
@@ -611,6 +611,7 @@ type_size_xvec4(const struct glsl_type *type, bool as_vec4)
|
||||
assert(type->length > 0);
|
||||
return type_size_xvec4(type->fields.array, as_vec4) * type->length;
|
||||
case GLSL_TYPE_STRUCT:
|
||||
case GLSL_TYPE_INTERFACE:
|
||||
size = 0;
|
||||
for (i = 0; i < type->length; i++) {
|
||||
size += type_size_xvec4(type->fields.structure[i].type, as_vec4);
|
||||
@@ -630,7 +631,6 @@ type_size_xvec4(const struct glsl_type *type, bool as_vec4)
|
||||
return DIV_ROUND_UP(BRW_IMAGE_PARAM_SIZE, 4);
|
||||
case GLSL_TYPE_VOID:
|
||||
case GLSL_TYPE_ERROR:
|
||||
case GLSL_TYPE_INTERFACE:
|
||||
case GLSL_TYPE_FUNCTION:
|
||||
unreachable("not reached");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user