mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 15:30:40 +02:00
nak/nir: Use prmt in texture lowering
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30218>
This commit is contained in:
parent
bbccbd8d50
commit
fffbd3ff2b
1 changed files with 6 additions and 6 deletions
|
|
@ -156,9 +156,9 @@ lower_tex(nir_builder *b, nir_tex_instr *tex, const struct nak_compiler *nak)
|
|||
PUSH(src0, nir_channel(b, coord, i));
|
||||
|
||||
if (offset != NULL) {
|
||||
nir_def *arr_off = nir_ishl_imm(b, offset, 16);
|
||||
if (arr_idx)
|
||||
arr_off = nir_ior(b, arr_off, arr_idx);
|
||||
nir_def *arr_idx_or_zero = arr_idx ? arr_idx : nir_imm_int(b, 0);
|
||||
nir_def *arr_off = nir_prmt_nv(b, nir_imm_int(b, 0x1054),
|
||||
offset, arr_idx_or_zero);
|
||||
PUSH(src0, arr_off);
|
||||
} else if (arr_idx != NULL) {
|
||||
PUSH(src0, arr_idx);
|
||||
|
|
@ -171,9 +171,9 @@ lower_tex(nir_builder *b, nir_tex_instr *tex, const struct nak_compiler *nak)
|
|||
}
|
||||
} else {
|
||||
if (min_lod != NULL) {
|
||||
nir_def *arr_ml = nir_ishl_imm(b, min_lod, 16);
|
||||
if (arr_idx)
|
||||
arr_ml = nir_ior(b, arr_ml, arr_idx);
|
||||
nir_def *arr_idx_or_zero = arr_idx ? arr_idx : nir_imm_int(b, 0);
|
||||
nir_def *arr_ml = nir_prmt_nv(b, nir_imm_int(b, 0x1054),
|
||||
min_lod, arr_idx_or_zero);
|
||||
PUSH(src0, arr_ml);
|
||||
} else if (arr_idx != NULL) {
|
||||
PUSH(src0, arr_idx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue