nir/glsl: Consider block interfaces as structs when it comes to size/align calculation
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 30 Jun 2020 10:03:00 +0000 (12:03 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Sep 2020 18:02:50 +0000 (18:02 +0000)
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472>

src/compiler/nir_types.cpp

index f86f0a7986806904c6d5d546847cbe1c682ce2ad..c7d07415cd200f91c6037c9de937c5dd609d7ead 100644 (file)
@@ -696,6 +696,7 @@ glsl_get_natural_size_align_bytes(const struct glsl_type *type,
       break;
    }
 
+   case GLSL_TYPE_INTERFACE:
    case GLSL_TYPE_STRUCT:
       *size = 0;
       *align = 0;
@@ -719,7 +720,6 @@ glsl_get_natural_size_align_bytes(const struct glsl_type *type,
    case GLSL_TYPE_SUBROUTINE:
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
-   case GLSL_TYPE_INTERFACE:
    case GLSL_TYPE_FUNCTION:
       unreachable("type does not have a natural size");
    }