Mesa (master): nir: define 8-byte size and alignment for bindless variables

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 23 19:35:26 UTC 2019


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Sep 18 15:25:15 2019 -0400

nir: define 8-byte size and alignment for bindless variables

Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

---

 src/compiler/nir_types.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index a8ef0458134..817dae09e7b 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -645,9 +645,14 @@ glsl_get_natural_size_align_bytes(const struct glsl_type *type,
       break;
 
    case GLSL_TYPE_SAMPLER:
+   case GLSL_TYPE_IMAGE:
+      /* Bindless samplers and images. */
+      *size = 8;
+      *align = 8;
+      break;
+
    case GLSL_TYPE_ATOMIC_UINT:
    case GLSL_TYPE_SUBROUTINE:
-   case GLSL_TYPE_IMAGE:
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_INTERFACE:




More information about the mesa-commit mailing list