With num_direct_uniforms == 0 there's no space allocated in the
param_size array for the one block of direct uniforms -- On the FS
stage this would be a harmless no-op because it would simply re-set
one of the param_size entries allocated for the sampler units to zero,
but on the VS stage it has been reported to cause memory corruption
followed by a crash -- Surprising how a full piglit run on Gen8 didn't
catch it.
Reported-and-reviewed-by: "Lofstedt, Marta" <marta.lofstedt@intel.com>
/* We split the uniform register file in half. The first half is
* entirely direct uniforms. The second half is indirect.
*/
- param_size[0] = num_direct_uniforms;
+ if (num_direct_uniforms > 0)
+ param_size[0] = num_direct_uniforms;
if (shader->num_uniforms > num_direct_uniforms)
param_size[num_direct_uniforms] = shader->num_uniforms - num_direct_uniforms;