ntt: Handle sized tex destination types
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 8 Dec 2020 11:42:05 +0000 (12:42 +0100)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 25 Jan 2021 10:21:42 +0000 (11:21 +0100)
I believe this code doesn't handle 16-bit destination types so we only
need to handle float32, etc.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>

src/gallium/auxiliary/nir/nir_to_tgsi.c

index fbc96b3..8a48435 100644 (file)
@@ -2041,12 +2041,15 @@ ntt_emit_texture(struct ntt_compile *c, nir_tex_instr *instr)
 
    enum tgsi_return_type tex_type;
    switch (instr->dest_type) {
+   case nir_type_float32:
    case nir_type_float:
       tex_type = TGSI_RETURN_TYPE_FLOAT;
       break;
+   case nir_type_int32:
    case nir_type_int:
       tex_type = TGSI_RETURN_TYPE_SINT;
       break;
+   case nir_type_uint32:
    case nir_type_uint:
       tex_type = TGSI_RETURN_TYPE_UINT;
       break;