iris: Set num_uniforms in bytes

Ref: brw_nir_lower_uniforms, type_size_scalar_bytes

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Jordan Justen
2018-09-18 14:22:34 -07:00
committed by Kenneth Graunke
parent c29fd34259
commit 6441e906e8

View File

@@ -410,6 +410,12 @@ iris_setup_uniforms(const struct brw_compiler *compiler,
struct brw_stage_prog_data *prog_data)
{
prog_data->nr_params = nir->num_uniforms;
/* The intel compiler assumes that num_uniforms is in bytes. For
* scalar that means 4 bytes per uniform slot.
*
* Ref: brw_nir_lower_uniforms, type_size_scalar_bytes.
*/
nir->num_uniforms *= 4;
prog_data->param = rzalloc_array(mem_ctx, uint32_t, prog_data->nr_params);
nir_foreach_variable(var, &nir->uniforms) {