glsl: make use of glsl_type::is_interface()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
This commit is contained in:
@@ -47,7 +47,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
|
|||||||
if (op->type->is_error()) {
|
if (op->type->is_error()) {
|
||||||
/* silently propagate the error */
|
/* silently propagate the error */
|
||||||
} else if (op->type->base_type == GLSL_TYPE_STRUCT
|
} else if (op->type->base_type == GLSL_TYPE_STRUCT
|
||||||
|| op->type->base_type == GLSL_TYPE_INTERFACE) {
|
|| op->type->is_interface()) {
|
||||||
result = new(ctx) ir_dereference_record(op,
|
result = new(ctx) ir_dereference_record(op,
|
||||||
expr->primary_expression.identifier);
|
expr->primary_expression.identifier);
|
||||||
|
|
||||||
|
@@ -129,7 +129,7 @@ encode_type_to_blob(struct blob *blob, const glsl_type *type)
|
|||||||
blob_write_string(blob, type->fields.structure[i].name);
|
blob_write_string(blob, type->fields.structure[i].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type->base_type == GLSL_TYPE_INTERFACE) {
|
if (type->is_interface()) {
|
||||||
blob_write_uint32(blob, type->interface_packing);
|
blob_write_uint32(blob, type->interface_packing);
|
||||||
blob_write_uint32(blob, type->interface_row_major);
|
blob_write_uint32(blob, type->interface_row_major);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user