mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 13:00:42 +02:00
nir/lower_io: Separate driver_location and base offset for uniforms
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
0db8e87b4a
commit
ce5e9139aa
1 changed files with 7 additions and 2 deletions
|
|
@ -244,9 +244,14 @@ nir_lower_io_block(nir_block *block, void *void_state)
|
|||
nir_src indirect;
|
||||
unsigned offset = get_io_offset(intrin->variables[0],
|
||||
&intrin->instr, &indirect, state);
|
||||
offset += intrin->variables[0]->var->data.driver_location;
|
||||
|
||||
load->const_index[0] = offset;
|
||||
unsigned location = intrin->variables[0]->var->data.driver_location;
|
||||
if (mode == nir_var_uniform) {
|
||||
load->const_index[0] = location;
|
||||
load->const_index[1] = offset;
|
||||
} else {
|
||||
load->const_index[0] = location + offset;
|
||||
}
|
||||
|
||||
if (has_indirect)
|
||||
load->src[0] = indirect;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue