This fixes random crashes with MSVC release builds. It seems the
members are implicitly initialized to zero with gcc, but not MSVC.
In particular, the tex_offset_num_offset field was non-zero causing
a loop over the NULL tex_offsets array to crash.
Zero-init those fields and a few others to be safe.
The regression began with
acc23b04cfd64e "ralloc: remove memset from
ralloc_size".
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
inst->is_64bit_expanded = false;
inst->ir = ir;
inst->dead_mask = 0;
+ inst->tex_offsets = NULL;
+ inst->tex_offset_num_offset = 0;
+ inst->saturate = 0;
+ inst->tex_shadow = 0;
/* default to float, for paths where this is not initialized
* (since 0==UINT which is likely wrong):
*/