Module: Mesa
Branch: master
Commit: fa18a427e929ecc04a9980e517db96663debea29
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa18a427e929ecc04a9980e517db96663debea29

Author: Brian Paul <bri...@vmware.com>
Date:   Wed Mar 28 19:38:00 2018 -0600

st/mesa: add missing GLSL_TYPE_[U]INT8 cases in st_glsl_type_dword_size()

Silences a compiler warning about unhandled enum switch cases.

Reviewed-by: Mathias Fröhlich <mathias.froehl...@web.de>

---

 src/mesa/state_tracker/st_glsl_types.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/state_tracker/st_glsl_types.cpp 
b/src/mesa/state_tracker/st_glsl_types.cpp
index baba2d414b..42d4e9cef2 100644
--- a/src/mesa/state_tracker/st_glsl_types.cpp
+++ b/src/mesa/state_tracker/st_glsl_types.cpp
@@ -124,6 +124,9 @@ st_glsl_type_dword_size(const struct glsl_type *type)
    case GLSL_TYPE_INT16:
    case GLSL_TYPE_FLOAT16:
       return DIV_ROUND_UP(type->components(), 2);
+   case GLSL_TYPE_UINT8:
+   case GLSL_TYPE_INT8:
+      return DIV_ROUND_UP(type->components(), 4);
    case GLSL_TYPE_DOUBLE:
    case GLSL_TYPE_UINT64:
    case GLSL_TYPE_INT64:

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to