nir: Fix non-determinism in lower_global_vars_to_local
[mesa.git] / src / compiler / nir_types.cpp
index aa4a7df0cbe87c5904e2e4ef51db67797e6647ca..817dae09e7b9593950604cc21aec91ba239e507f 100644 (file)
@@ -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:
@@ -674,6 +679,12 @@ glsl_contains_atomic(const struct glsl_type *type)
    return type->contains_atomic();
 }
 
+bool
+glsl_contains_opaque(const struct glsl_type *type)
+{
+   return type->contains_opaque();
+}
+
 int
 glsl_get_cl_size(const struct glsl_type *type)
 {