ttn: set dest_type for TXQ
authorMarek Olšák <marek.olsak@amd.com>
Sun, 17 Jul 2022 14:48:12 +0000 (10:48 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 21 Jul 2022 20:05:12 +0000 (20:05 +0000)
It was failing an assertion in tgsi_to_nir and NIR validation.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17691>

src/gallium/auxiliary/nir/tgsi_to_nir.c

index afc5676..9a281c4 100644 (file)
@@ -1585,11 +1585,13 @@ ttn_txq(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
 
    txs = nir_tex_instr_create(b->shader, 2);
    txs->op = nir_texop_txs;
+   txs->dest_type = nir_type_uint32;
    get_texture_info(tgsi_inst->Texture.Texture,
                     &txs->sampler_dim, &txs->is_shadow, &txs->is_array);
 
    qlv = nir_tex_instr_create(b->shader, 1);
    qlv->op = nir_texop_query_levels;
+   qlv->dest_type = nir_type_uint32;
    get_texture_info(tgsi_inst->Texture.Texture,
                     &qlv->sampler_dim, &qlv->is_shadow, &qlv->is_array);