From eda596d64b0e143005d52fe50331e099463813d9 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Wed, 21 Aug 2019 09:06:14 -0700 Subject: [PATCH] compiler: Add glsl_contains_opaque() helper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro Piñeiro --- src/compiler/nir_types.cpp | 6 ++++++ src/compiler/nir_types.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index aa4a7df0cbe..a8ef0458134 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -674,6 +674,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) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 0e7639e9018..e1fbc830b1c 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -137,6 +137,7 @@ bool glsl_type_contains_64bit(const struct glsl_type *type); bool glsl_sampler_type_is_shadow(const struct glsl_type *type); bool glsl_sampler_type_is_array(const struct glsl_type *type); bool glsl_contains_atomic(const struct glsl_type *type); +bool glsl_contains_opaque(const struct glsl_type *type); const struct glsl_type *glsl_void_type(void); const struct glsl_type *glsl_float_type(void); -- 2.30.2