mesa: correctly calculate the storage offset for i915
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 1 Aug 2017 07:35:06 +0000 (17:35 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 14 Aug 2017 22:20:57 +0000 (08:20 +1000)
When generating the storage offset for struct members we need
to skip opaque types as they no longer have backing storage.

Fixes: fcbb93e86024 ("mesa: stop assigning unused storage for non-bindless opaque types")
V2: simplify since bindless will never be supported in this code

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101983
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/program/ir_to_mesa.cpp

index e141ac4b71521d0140f28dceacdb65a67cee16c2..87999ea3178027a93305e4cca28e9bac67f65be5 100644 (file)
@@ -550,10 +550,8 @@ type_size(const struct glsl_type *type)
       return size;
    case GLSL_TYPE_SAMPLER:
    case GLSL_TYPE_IMAGE:
+      return 0;
    case GLSL_TYPE_SUBROUTINE:
-      /* Samplers take up one slot in UNIFORMS[], but they're baked in
-       * at link time.
-       */
       return 1;
    case GLSL_TYPE_ATOMIC_UINT:
    case GLSL_TYPE_VOID: