mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
nir: Add an 'external' texture type for parity with samplers
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14046>
This commit is contained in:
parent
ae4d46d457
commit
9626595026
2 changed files with 6 additions and 1 deletions
|
|
@ -169,6 +169,8 @@ DECL_TYPE(utextureBuffer, GL_UNSIGNED_INT_SAMPLER_BUFFER, GLSL_
|
|||
DECL_TYPE(utexture2DMS, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_MS, 0, 0, GLSL_TYPE_UINT)
|
||||
DECL_TYPE(utexture2DMSArray, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_MS, 0, 1, GLSL_TYPE_UINT)
|
||||
|
||||
DECL_TYPE(textureExternalOES, GL_SAMPLER_EXTERNAL_OES, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_EXTERNAL, 0, 0, GLSL_TYPE_FLOAT)
|
||||
|
||||
/* OpenCL image types */
|
||||
DECL_TYPE(vtexture1D, GL_SAMPLER_1D, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_VOID)
|
||||
DECL_TYPE(vtexture2D, GL_SAMPLER_2D, GLSL_TYPE_TEXTURE, GLSL_SAMPLER_DIM_2D, 0, 0, GLSL_TYPE_VOID)
|
||||
|
|
|
|||
|
|
@ -983,7 +983,10 @@ glsl_type::get_texture_instance(enum glsl_sampler_dim dim,
|
|||
case GLSL_SAMPLER_DIM_SUBPASS_MS:
|
||||
return subpassInputMS_type;
|
||||
case GLSL_SAMPLER_DIM_EXTERNAL:
|
||||
return error_type;
|
||||
if (array)
|
||||
return error_type;
|
||||
else
|
||||
return textureExternalOES_type;
|
||||
}
|
||||
case GLSL_TYPE_INT:
|
||||
switch (dim) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue