mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
radv: fix clearing of TRUNC_COORD with tg4 and immutable samplers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 15640e58d9 ("radv,aco: lower texture descriptor loads in NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16148>
This commit is contained in:
parent
c63346eb69
commit
f97d82c52b
1 changed files with 2 additions and 1 deletions
|
|
@ -251,8 +251,9 @@ get_sampler_desc(nir_builder *b, apply_layout_state *state, nir_deref_instr *der
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t dword0_mask = tex->op == nir_texop_tg4 ? C_008F30_TRUNC_COORD : 0xffffffffu;
|
||||
const uint32_t *samplers = radv_immutable_samplers(layout, binding);
|
||||
return nir_imm_ivec4(b, samplers[constant_index * 4 + 0], samplers[constant_index * 4 + 1],
|
||||
return nir_imm_ivec4(b, samplers[constant_index * 4 + 0] & dword0_mask, samplers[constant_index * 4 + 1],
|
||||
samplers[constant_index * 4 + 2], samplers[constant_index * 4 + 3]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue