mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 05:28:05 +02:00
iris: Don't assume UBO indices are constant
It will be true for the constant/system value buffer because they use a constant zero but it's not true in general. If we ever got here when the source wasn't constant, nir_src_as_uint would assert. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
744f93f5c1
commit
9dc57eebd5
1 changed files with 2 additions and 1 deletions
|
|
@ -491,7 +491,8 @@ iris_setup_uniforms(const struct brw_compiler *compiler,
|
|||
if (load->src[0].ssa == temp_ubo_name) {
|
||||
nir_instr_rewrite_src(instr, &load->src[0],
|
||||
nir_src_for_ssa(nir_imm_int(&b, 0)));
|
||||
} else if (nir_src_as_uint(load->src[0]) == 0) {
|
||||
} else if (nir_src_is_const(load->src[0]) &&
|
||||
nir_src_as_uint(load->src[0]) == 0) {
|
||||
nir_ssa_def *offset =
|
||||
nir_iadd(&b, load->src[1].ssa,
|
||||
nir_imm_int(&b, 4 * num_system_values));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue