compiler/types: Use glsl_get_type_name() to access the type name

This will allow us later to store builtin names in a different way.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25191>
This commit is contained in:
Caio Oliveira
2023-09-12 12:11:18 -07:00
committed by Marge Bot
parent d1e9e7699e
commit bf01000a50
21 changed files with 118 additions and 118 deletions
+5 -5
View File
@@ -150,13 +150,13 @@ ir_validate::visit_enter(class ir_dereference_array *ir)
if (!ir->array_index->type->is_scalar()) {
printf("ir_dereference_array @ %p does not have scalar index: %s\n",
(void *) ir, ir->array_index->type->name);
(void *) ir, glsl_get_type_name(ir->array_index->type));
abort();
}
if (!ir->array_index->type->is_integer_16_32()) {
printf("ir_dereference_array @ %p does not have integer index: %s\n",
(void *) ir, ir->array_index->type->name);
(void *) ir, glsl_get_type_name(ir->array_index->type));
abort();
}
@@ -190,7 +190,7 @@ ir_validate::visit_enter(ir_discard *ir)
{
if (ir->condition && ir->condition->type != glsl_type::bool_type) {
printf("ir_discard condition %s type instead of bool.\n",
ir->condition->type->name);
glsl_get_type_name(ir->condition->type));
ir->print();
printf("\n");
abort();
@@ -204,7 +204,7 @@ ir_validate::visit_enter(ir_if *ir)
{
if (ir->condition->type != glsl_type::bool_type) {
printf("ir_if condition %s type instead of bool.\n",
ir->condition->type->name);
glsl_get_type_name(ir->condition->type));
ir->print();
printf("\n");
abort();
@@ -1129,7 +1129,7 @@ ir_validate::visit_enter(ir_call *ir)
if (ir->return_deref) {
if (ir->return_deref->type != callee->return_type) {
printf("callee type %s does not match return storage type %s\n",
callee->return_type->name, ir->return_deref->type->name);
glsl_get_type_name(callee->return_type), glsl_get_type_name(ir->return_deref->type));
abort();
}
} else if (callee->return_type != glsl_type::void_type) {