mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 23:40:12 +01:00
spirv: add support for bias/lod with OpImageGather
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147>
This commit is contained in:
parent
dd39bf52b0
commit
41dc3ce449
1 changed files with 5 additions and 3 deletions
|
|
@ -2445,8 +2445,10 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
|||
uint32_t operands = w[idx];
|
||||
|
||||
if (operands & SpvImageOperandsBiasMask) {
|
||||
vtn_assert(texop == nir_texop_tex);
|
||||
texop = nir_texop_txb;
|
||||
vtn_assert(texop == nir_texop_tex ||
|
||||
texop == nir_texop_tg4);
|
||||
if (texop == nir_texop_tex)
|
||||
texop = nir_texop_txb;
|
||||
uint32_t arg = image_operand_arg(b, w, count, idx,
|
||||
SpvImageOperandsBiasMask);
|
||||
(*p++) = vtn_tex_src(b, w[arg], nir_tex_src_bias);
|
||||
|
|
@ -2454,7 +2456,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
|||
|
||||
if (operands & SpvImageOperandsLodMask) {
|
||||
vtn_assert(texop == nir_texop_txl || texop == nir_texop_txf ||
|
||||
texop == nir_texop_txs);
|
||||
texop == nir_texop_txs || texop == nir_texop_tg4);
|
||||
uint32_t arg = image_operand_arg(b, w, count, idx,
|
||||
SpvImageOperandsLodMask);
|
||||
(*p++) = vtn_tex_src(b, w[arg], nir_tex_src_lod);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue