Commit 6f048b5f authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜 Committed by Marge Bot
Browse files

pan/bi: Add TEXS emit with builder


Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!8135>
parent 311d3d60
...@@ -2494,6 +2494,20 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr) ...@@ -2494,6 +2494,20 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
/* TEXS instructions assume normal 2D f32 operation but are more /* TEXS instructions assume normal 2D f32 operation but are more
* space-efficient and with simpler RA/scheduling requirements*/ * space-efficient and with simpler RA/scheduling requirements*/
static void
bi_emit_texs(bi_builder *b, nir_tex_instr *instr)
{
int coord_idx = nir_tex_instr_src_index(instr, nir_tex_src_coord);
assert(coord_idx >= 0);
bi_index coords = bi_src_index(&instr->src[coord_idx].src);
bi_texs_2d_to(b, nir_dest_bit_size(instr->dest),
bi_dest_index(&instr->dest),
coords, bi_word(coords, 1),
instr->op != nir_texop_tex, /* zero LOD */
instr->sampler_index, instr->texture_index);
}
static void static void
emit_texs(bi_context *ctx, nir_tex_instr *instr) emit_texs(bi_context *ctx, nir_tex_instr *instr)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment