glsl: Add 'bare' shadow sampler type

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6222>
This commit is contained in:
Jesse Natalie
2020-04-20 12:27:27 -07:00
committed by Marge Bot
parent 418c4c0d7d
commit c17b58a9e6
3 changed files with 8 additions and 0 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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);