And assert on the register index in dst_register(). The dest can
only be an output or temp reg and there's more of the later.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
emit.nr_hw_float_const = (emit.imm_start + emit.info.file_max[TGSI_FILE_IMMEDIATE] + 1);
emit.nr_hw_temp = emit.info.file_max[TGSI_FILE_TEMPORARY] + 1;
+
+ if (emit.nr_hw_temp >= SVGA3D_TEMPREG_MAX)
+ goto fail;
+
emit.in_main_func = TRUE;
if (!svga_shader_emit_header( &emit ))
assert(number < (1 << 11));
assert(file <= SVGA3DREG_PREDICATE);
+ assert(number < SVGA3D_TEMPREG_MAX);
+
dest.value = 0;
dest.num = number;
dest.type_upper = file >> 3;