agx: Handle txl
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
This commit is contained in:

committed by
Marge Bot

parent
8361e24604
commit
50f012542f
@@ -711,11 +711,15 @@ agx_emit_tex(agx_builder *b, nir_tex_instr *instr)
|
|||||||
{
|
{
|
||||||
switch (instr->op) {
|
switch (instr->op) {
|
||||||
case nir_texop_tex:
|
case nir_texop_tex:
|
||||||
|
case nir_texop_txl:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
unreachable("Unhandled texture op");
|
unreachable("Unhandled texture op");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum agx_lod_mode lod_mode = (instr->op == nir_texop_tex) ?
|
||||||
|
AGX_LOD_MODE_AUTO_LOD : AGX_LOD_MODE_LOD_MIN;
|
||||||
|
|
||||||
agx_index coords = agx_null(),
|
agx_index coords = agx_null(),
|
||||||
texture = agx_immediate(instr->texture_index),
|
texture = agx_immediate(instr->texture_index),
|
||||||
sampler = agx_immediate(instr->sampler_index),
|
sampler = agx_immediate(instr->sampler_index),
|
||||||
@@ -731,6 +735,9 @@ agx_emit_tex(agx_builder *b, nir_tex_instr *instr)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case nir_tex_src_lod:
|
case nir_tex_src_lod:
|
||||||
|
lod = index;
|
||||||
|
break;
|
||||||
|
|
||||||
case nir_tex_src_bias:
|
case nir_tex_src_bias:
|
||||||
case nir_tex_src_ms_index:
|
case nir_tex_src_ms_index:
|
||||||
case nir_tex_src_offset:
|
case nir_tex_src_offset:
|
||||||
@@ -745,7 +752,7 @@ agx_emit_tex(agx_builder *b, nir_tex_instr *instr)
|
|||||||
agx_texture_sample_to(b, agx_dest_index(&instr->dest),
|
agx_texture_sample_to(b, agx_dest_index(&instr->dest),
|
||||||
coords, lod, texture, sampler, offset,
|
coords, lod, texture, sampler, offset,
|
||||||
agx_tex_dim(instr->sampler_dim, instr->is_array),
|
agx_tex_dim(instr->sampler_dim, instr->is_array),
|
||||||
AGX_LOD_MODE_AUTO_LOD, /* TODO */
|
lod_mode,
|
||||||
0xF, /* TODO: wrmask */
|
0xF, /* TODO: wrmask */
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user