From c17b58a9e6092ebaf987dec1ba111647fd11d55e Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Mon, 20 Apr 2020 12:27:27 -0700 Subject: [PATCH] glsl: Add 'bare' shadow sampler type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Jason Ekstrand Reviewed-by: Marek Olšák Part-of: --- src/compiler/builtin_type_macros.h | 1 + src/compiler/nir_types.cpp | 6 ++++++ src/compiler/nir_types.h | 1 + 3 files changed, 8 insertions(+) diff --git a/src/compiler/builtin_type_macros.h b/src/compiler/builtin_type_macros.h index 55ad2b89554..b5598c0b2dc 100644 --- a/src/compiler/builtin_type_macros.h +++ b/src/compiler/builtin_type_macros.h @@ -122,6 +122,7 @@ DECL_TYPE(usamplerBuffer, GL_UNSIGNED_INT_SAMPLER_BUFFER, GLSL_ DECL_TYPE(usampler2DMS, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_MS, 0, 0, GLSL_TYPE_UINT) DECL_TYPE(usampler2DMSArray, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_MS, 0, 1, GLSL_TYPE_UINT) +DECL_TYPE(samplerShadow, GL_SAMPLER_1D_SHADOW, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_1D, 1, 0, GLSL_TYPE_VOID) DECL_TYPE(sampler1DShadow, GL_SAMPLER_1D_SHADOW, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_1D, 1, 0, GLSL_TYPE_FLOAT) DECL_TYPE(sampler2DShadow, GL_SAMPLER_2D_SHADOW, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_2D, 1, 0, GLSL_TYPE_FLOAT) DECL_TYPE(samplerCubeShadow, GL_SAMPLER_CUBE_SHADOW, GLSL_TYPE_SAMPLER, GLSL_SAMPLER_DIM_CUBE, 1, 0, GLSL_TYPE_FLOAT) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index a53b14db814..975f5480e11 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -586,6 +586,12 @@ glsl_bare_sampler_type() return glsl_type::sampler_type; } +const struct glsl_type * +glsl_bare_shadow_sampler_type() +{ + return glsl_type::samplerShadow_type; +} + const struct glsl_type * glsl_image_type(enum glsl_sampler_dim dim, bool is_array, enum glsl_base_type base_type) diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 6118e52bfc5..5e4da1e8ab3 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -201,6 +201,7 @@ const struct glsl_type *glsl_sampler_type(enum glsl_sampler_dim dim, bool is_shadow, bool is_array, enum glsl_base_type base_type); const struct glsl_type *glsl_bare_sampler_type(); +const struct glsl_type *glsl_bare_shadow_sampler_type(); const struct glsl_type *glsl_image_type(enum glsl_sampler_dim dim, bool is_array, enum glsl_base_type base_type); -- 2.30.2