pan/bi: Support txs operations

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7636>
This commit is contained in:
Boris Brezillon 2020-11-12 18:19:21 +01:00
parent 045ae54343
commit d0cd8bf2a5
1 changed files with 16 additions and 0 deletions

View File

@ -2078,6 +2078,22 @@ bi_is_normal_tex(gl_shader_stage stage, nir_tex_instr *instr)
static void
emit_tex(bi_context *ctx, nir_tex_instr *instr)
{
switch (instr->op) {
case nir_texop_txs:
bi_emit_sysval(ctx, &instr->instr, 4, 0);
return;
case nir_texop_tex:
case nir_texop_txl:
case nir_texop_txb:
case nir_texop_txf:
case nir_texop_txf_ms:
break;
default:
unreachable("Invalid texture operation");
}
nir_alu_type base = nir_alu_type_get_base_type(instr->dest_type);
unsigned sz = nir_dest_bit_size(instr->dest);
instr->dest_type = base | sz;