Zero sized uniforms can exist in the list, but they don't get get any space
allocated in prog_data->params or in the param_size array, so the size
should not be set for them. This was previously fixed in:
commit:
781dc7c0e1f41502f18e07c0940af949a78d2792.
However,
commit:
259f7291de2387aa3ac5f856b39b7b934a1d8e7d
removed the fix.
Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
nir_setup_builtin_uniform(var);
else
nir_setup_uniform(var);
-
- param_size[var->data.driver_location] = type_size_scalar(var->type);
+ if(type_size_scalar(var->type) > 0)
+ param_size[var->data.driver_location] = type_size_scalar(var->type);
}
} else {
/* prog_to_nir only creates a single giant uniform variable so we can
&prog->Parameters->ParameterValues[p][i];
}
}
- param_size[0] = prog->Parameters->NumParameters * 4;
+ if(prog->Parameters->NumParameters > 0)
+ param_size[0] = prog->Parameters->NumParameters * 4;
}
}