glsl: add texture subpass variants
Dzn needs those as it lowers images to textures and we want to be more consistent about texture ops using texture vars instead of images. Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19381>
This commit is contained in:
@@ -244,12 +244,19 @@ DECL_TYPE(vimage3D, GL_IMAGE_3D, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_3D, 0, 0, GLS
|
||||
DECL_TYPE(vimage1DArray, GL_IMAGE_1D_ARRAY, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_1D, 0, 1, GLSL_TYPE_VOID)
|
||||
DECL_TYPE(vimage2DArray, GL_IMAGE_2D_ARRAY, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_2D, 0, 1, GLSL_TYPE_VOID)
|
||||
|
||||
DECL_TYPE(subpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_FLOAT)
|
||||
DECL_TYPE(subpassInputMS, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_FLOAT)
|
||||
DECL_TYPE(isubpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_INT)
|
||||
DECL_TYPE(isubpassInputMS, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_INT)
|
||||
DECL_TYPE(usubpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_UINT)
|
||||
DECL_TYPE(usubpassInputMS, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_UINT)
|
||||
DECL_TYPE(subpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_FLOAT)
|
||||
DECL_TYPE(subpassInputMS, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_FLOAT)
|
||||
DECL_TYPE(isubpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_INT)
|
||||
DECL_TYPE(isubpassInputMS, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_INT)
|
||||
DECL_TYPE(usubpassInput, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_UINT)
|
||||
DECL_TYPE(usubpassInputMS, 0, GLSL_TYPE_IMAGE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_UINT)
|
||||
DECL_TYPE(textureSubpassInput, 0, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_FLOAT)
|
||||
DECL_TYPE(textureSubpassInputMS, 0, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_FLOAT)
|
||||
DECL_TYPE(itextureSubpassInput, 0, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_INT)
|
||||
DECL_TYPE(itextureSubpassInputMS, 0, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_INT)
|
||||
DECL_TYPE(utextureSubpassInput, 0, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_SUBPASS, 0, 0, GLSL_TYPE_UINT)
|
||||
DECL_TYPE(utextureSubpassInputMS, 0, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_SUBPASS_MS, 0, 0, GLSL_TYPE_UINT)
|
||||
|
||||
|
||||
DECL_TYPE(atomic_uint, GL_UNSIGNED_INT_ATOMIC_COUNTER, GLSL_TYPE_ATOMIC_UINT, 1, 1)
|
||||
|
||||
|
@@ -974,9 +974,9 @@ glsl_type::get_texture_instance(enum glsl_sampler_dim dim,
|
||||
case GLSL_SAMPLER_DIM_MS:
|
||||
return (array ? texture2DMSArray_type : texture2DMS_type);
|
||||
case GLSL_SAMPLER_DIM_SUBPASS:
|
||||
return subpassInput_type;
|
||||
return textureSubpassInput_type;
|
||||
case GLSL_SAMPLER_DIM_SUBPASS_MS:
|
||||
return subpassInputMS_type;
|
||||
return textureSubpassInputMS_type;
|
||||
case GLSL_SAMPLER_DIM_EXTERNAL:
|
||||
if (array)
|
||||
return error_type;
|
||||
@@ -1006,9 +1006,9 @@ glsl_type::get_texture_instance(enum glsl_sampler_dim dim,
|
||||
case GLSL_SAMPLER_DIM_MS:
|
||||
return (array ? itexture2DMSArray_type : itexture2DMS_type);
|
||||
case GLSL_SAMPLER_DIM_SUBPASS:
|
||||
return isubpassInput_type;
|
||||
return itextureSubpassInput_type;
|
||||
case GLSL_SAMPLER_DIM_SUBPASS_MS:
|
||||
return isubpassInputMS_type;
|
||||
return itextureSubpassInputMS_type;
|
||||
case GLSL_SAMPLER_DIM_EXTERNAL:
|
||||
return error_type;
|
||||
}
|
||||
@@ -1035,9 +1035,9 @@ glsl_type::get_texture_instance(enum glsl_sampler_dim dim,
|
||||
case GLSL_SAMPLER_DIM_MS:
|
||||
return (array ? utexture2DMSArray_type : utexture2DMS_type);
|
||||
case GLSL_SAMPLER_DIM_SUBPASS:
|
||||
return usubpassInput_type;
|
||||
return utextureSubpassInput_type;
|
||||
case GLSL_SAMPLER_DIM_SUBPASS_MS:
|
||||
return usubpassInputMS_type;
|
||||
return utextureSubpassInputMS_type;
|
||||
case GLSL_SAMPLER_DIM_EXTERNAL:
|
||||
return error_type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user