#include "compiler/nir/nir_builtin_builder.h"
#include "compiler/nir/nir_deref.h"
#include "main/errors.h"
-#include "util/imports.h"
#include "main/mtypes.h"
#include "main/shaderobj.h"
#include "util/u_math.h"
}
}
+ if (!glsl_type_is_vector_or_scalar(ir->return_type) &&
+ !ir->return_type->is_void()) {
+ unsupported = true;
+ return visit_stop;
+ }
+
return visit_continue;
}
break;
+ case GLSL_TYPE_UINT16:
+ /* Only float base types can be matrices. */
+ assert(cols == 1);
+
+ for (unsigned r = 0; r < rows; r++)
+ ret->values[r].u16 = ir->value.u16[r];
+ break;
+
case GLSL_TYPE_INT:
/* Only float base types can be matrices. */
assert(cols == 1);
break;
+ case GLSL_TYPE_INT16:
+ /* Only float base types can be matrices. */
+ assert(cols == 1);
+
+ for (unsigned r = 0; r < rows; r++)
+ ret->values[r].i16 = ir->value.i16[r];
+ break;
+
case GLSL_TYPE_FLOAT:
case GLSL_TYPE_FLOAT16:
case GLSL_TYPE_DOUBLE:
if (field->memory_restrict)
qualifiers |= ACCESS_RESTRICT;
}
-
+
parent_type = cur->type;
}
case nir_intrinsic_shader_clock:
nir_ssa_dest_init(&instr->instr, &instr->dest, 2, 32, NULL);
instr->num_components = 2;
+ nir_intrinsic_set_memory_scope(instr, NIR_SCOPE_SUBGROUP);
nir_builder_instr_insert(&b, &instr->instr);
break;
case nir_intrinsic_begin_invocation_interlock:
}
case nir_intrinsic_is_helper_invocation: {
nir_ssa_dest_init(&instr->instr, &instr->dest, 1, 1, NULL);
- instr->num_components = 1;
nir_builder_instr_insert(&b, &instr->instr);
break;
}
case ir_unop_f2f16:
case ir_unop_f162b:
case ir_unop_b2f16:
+ case ir_unop_i2i:
+ case ir_unop_u2u:
case ir_unop_d2i:
case ir_unop_d2u:
case ir_unop_d2b:
break;
}
+ case ir_unop_i2imp: {
+ result = nir_build_alu(&b, nir_op_i2imp, srcs[0], NULL, NULL, NULL);
+ break;
+ }
+
+ case ir_unop_u2ump: {
+ result = nir_build_alu(&b, nir_op_u2ump, srcs[0], NULL, NULL, NULL);
+ break;
+ }
+
case ir_unop_bitcast_i2f:
case ir_unop_bitcast_f2i:
case ir_unop_bitcast_u2f:
case GLSL_TYPE_FLOAT16:
instr->dest_type = nir_type_float16;
break;
+ case GLSL_TYPE_INT16:
+ instr->dest_type = nir_type_int16;
+ break;
+ case GLSL_TYPE_UINT16:
+ instr->dest_type = nir_type_uint16;
+ break;
case GLSL_TYPE_INT:
instr->dest_type = nir_type_int;
break;