mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
iris/elk: Restore setting nir->num_uniforms to zero.
Elk still uses param array, so it depends on this behavior. This fixes
an assertion failure on Broadwell in gfxbench4/carchase/339.shader_test.
src/intel/compiler/elk/elk_fs_nir.cpp:148: void fs_nir_setup_uniforms(elk_fs_visitor&): Assertion `s.uniforms == s.prog_data->nr_params' failed.
Fixes: f4a0e05970 ("anv/brw/iris: get rid of param array on prog_data")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39280>
This commit is contained in:
parent
6f076cdfda
commit
d19ea686d3
1 changed files with 11 additions and 0 deletions
|
|
@ -1212,6 +1212,17 @@ iris_setup_uniforms(ASSERTED const struct intel_device_info *devinfo,
|
|||
assert(num_cbufs < PIPE_MAX_CONSTANT_BUFFERS);
|
||||
nir_validate_shader(nir, "after remap");
|
||||
|
||||
#ifdef INTEL_USE_ELK
|
||||
/* We don't use params[] but gallium leaves num_uniforms set. We use this
|
||||
* to detect when cbuf0 exists but we don't need it anymore when we get
|
||||
* here. Instead, zero it out so that the back-end doesn't get confused
|
||||
* when nr_params * 4 != num_uniforms != nr_params * 4.
|
||||
*
|
||||
* Elk still depends on this behavior.
|
||||
*/
|
||||
nir->num_uniforms = 0;
|
||||
#endif
|
||||
|
||||
*out_system_values = system_values;
|
||||
*out_num_system_values = num_system_values;
|
||||
*out_num_cbufs = num_cbufs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue