Module: Mesa Branch: master Commit: c17b58a9e6092ebaf987dec1ba111647fd11d55e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c17b58a9e6092ebaf987dec1ba111647fd11d55e
Author: Jesse Natalie <jenat...@microsoft.com> Date: Mon Apr 20 12:27:27 2020 -0700 glsl: Add 'bare' shadow sampler type Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net> Reviewed-by: Marek Olšák <marek.ol...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6222> --- 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); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit