mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 15:40:46 +02:00
agx: Implement nir_op_txb
Like explicit LODs, biases must be 16-bit, so add a lowering rule for this. With the LOD mode selection updated for txb, we can then ingest biases like explicit LODs and allowlist txb. Passes: dEQP-GLES2.functional.shaders.texture_functions.fragment.texture2d_bias dEQP-GLES2.functional.texture.mipmap.2d.bias.* Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14899>
This commit is contained in:
parent
e2903f66ec
commit
b459473bb9
1 changed files with 4 additions and 2 deletions
|
|
@ -801,6 +801,7 @@ agx_emit_tex(agx_builder *b, nir_tex_instr *instr)
|
|||
switch (instr->op) {
|
||||
case nir_texop_tex:
|
||||
case nir_texop_txl:
|
||||
case nir_texop_txb:
|
||||
break;
|
||||
default:
|
||||
unreachable("Unhandled texture op");
|
||||
|
|
@ -821,10 +822,10 @@ agx_emit_tex(agx_builder *b, nir_tex_instr *instr)
|
|||
break;
|
||||
|
||||
case nir_tex_src_lod:
|
||||
case nir_tex_src_bias:
|
||||
lod = index;
|
||||
break;
|
||||
|
||||
case nir_tex_src_bias:
|
||||
case nir_tex_src_ms_index:
|
||||
case nir_tex_src_offset:
|
||||
case nir_tex_src_comparator:
|
||||
|
|
@ -1481,7 +1482,8 @@ agx_compile_shader_nir(nir_shader *nir,
|
|||
};
|
||||
|
||||
nir_tex_src_type_constraints tex_constraints = {
|
||||
[nir_tex_src_lod] = { true, 16 }
|
||||
[nir_tex_src_lod] = { true, 16 },
|
||||
[nir_tex_src_bias] = { true, 16 },
|
||||
};
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_tex, &lower_tex_options);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue