mesa/st: Handle 16-bit types at st_glsl_storage_type_size()
authorEduardo Lima Mitev <elima@igalia.com>
Thu, 17 Aug 2017 07:51:22 +0000 (09:51 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Wed, 6 Dec 2017 07:57:18 +0000 (08:57 +0100)
This is basically to avoid "not handle in switch" warnings.

v2: Let the new types hit the assertion instead. (Marek Olšák
    and Jason Ekstrand)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/state_tracker/st_glsl_types.cpp

index 50936025d9f036508fcfc09856d3e9a3b5ad34c1..e57fbc8f3146e4a1892bb8b76bf7a5897f76089d 100644 (file)
@@ -98,6 +98,9 @@ st_glsl_storage_type_size(const struct glsl_type *type, bool is_bindless)
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_FUNCTION:
+   case GLSL_TYPE_FLOAT16:
+   case GLSL_TYPE_UINT16:
+   case GLSL_TYPE_INT16:
       assert(!"Invalid type in type_size");
       break;
    }