Mesa (master): mesa: correctly calculate the storage offset for i915

Timothy Arceri tarceri at kemper.freedesktop.org
Mon Aug 14 22:22:14 UTC 2017


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Tue Aug  1 17:35:06 2017 +1000

mesa: correctly calculate the storage offset for i915

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 at whitecape.org>

---

 src/mesa/program/ir_to_mesa.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index e141ac4b71..87999ea317 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -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:




More information about the mesa-commit mailing list