tgsi_to_nir: handle PIPE_FORMAT_NONE in image opcodes
authorMarek Olšák <marek.olsak@amd.com>
Tue, 17 Sep 2019 01:19:44 +0000 (21:19 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 30 Sep 2019 18:20:48 +0000 (14:20 -0400)
radeonsi doesn't use the format and internal shaders don't set it.

Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
src/gallium/auxiliary/nir/tgsi_to_nir.c

index 88e9963e0303d00f58f019348b5b4e329be312ce..fca1074e6d2a67da166c31cd23091f5e746e8672 100644 (file)
@@ -1746,6 +1746,9 @@ static GLenum
 get_image_format(struct tgsi_full_instruction *tgsi_inst)
 {
    switch (tgsi_inst->Memory.Format) {
+   case PIPE_FORMAT_NONE:
+      return GL_NONE;
+
    case PIPE_FORMAT_R8_UNORM:
       return GL_R8;
    case PIPE_FORMAT_R8G8_UNORM: