mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 04:50:35 +01:00
mesa/formatquery: Added queries related to texture sampling in shaders
From the ARB_internalformat_query2 specification:
"- VERTEX_TEXTURE: The support for using the resource as a source for
texture sampling in a vertex shader is written to <params>.
- TESS_CONTROL_TEXTURE: The support for using the resource as a source for
texture sampling in a tessellation control shader is written to <params>.
- TESS_EVALUATION_TEXTURE: The support for using the resource as a source
for texture sampling in a tessellation evaluation shader is written to
<params>.
- GEOMETRY_TEXTURE: The support for using the resource as a source for
texture sampling in a geometry shader is written to <params>.
- FRAGMENT_TEXTURE: The support for using the resource as a source for
texture sampling in a fragment shader is written to <params>.
- COMPUTE_TEXTURE: The support for using the resource as a source for
texture sampling in a compute shader is written to <params>."
For all of them,
"Possible values returned are FULL_SUPPORT, CAVEAT_SUPPORT, or NONE.
If the resource or operation is not supported, NONE is returned."
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
aeb759c7d6
commit
fae2b10ff9
1 changed files with 22 additions and 16 deletions
|
|
@ -601,6 +601,12 @@ _mesa_query_internal_format_default(struct gl_context *ctx, GLenum target,
|
|||
case GL_SRGB_READ:
|
||||
case GL_SRGB_WRITE:
|
||||
case GL_SRGB_DECODE_ARB:
|
||||
case GL_VERTEX_TEXTURE:
|
||||
case GL_TESS_CONTROL_TEXTURE:
|
||||
case GL_TESS_EVALUATION_TEXTURE:
|
||||
case GL_GEOMETRY_TEXTURE:
|
||||
case GL_FRAGMENT_TEXTURE:
|
||||
case GL_COMPUTE_TEXTURE:
|
||||
params[0] = GL_FULL_SUPPORT;
|
||||
break;
|
||||
|
||||
|
|
@ -1148,27 +1154,27 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
|
|||
break;
|
||||
|
||||
case GL_VERTEX_TEXTURE:
|
||||
/* @TODO */
|
||||
break;
|
||||
|
||||
case GL_TESS_CONTROL_TEXTURE:
|
||||
/* @TODO */
|
||||
break;
|
||||
|
||||
case GL_TESS_EVALUATION_TEXTURE:
|
||||
/* @TODO */
|
||||
break;
|
||||
|
||||
case GL_GEOMETRY_TEXTURE:
|
||||
/* @TODO */
|
||||
break;
|
||||
|
||||
case GL_FRAGMENT_TEXTURE:
|
||||
/* @TODO */
|
||||
break;
|
||||
|
||||
case GL_COMPUTE_TEXTURE:
|
||||
/* @TODO */
|
||||
if (target == GL_RENDERBUFFER)
|
||||
goto end;
|
||||
|
||||
if ((pname == GL_TESS_CONTROL_TEXTURE ||
|
||||
pname == GL_TESS_EVALUATION_TEXTURE) &&
|
||||
!_mesa_has_tessellation(ctx))
|
||||
goto end;
|
||||
|
||||
if (pname == GL_GEOMETRY_TEXTURE && !_mesa_has_geometry_shaders(ctx))
|
||||
goto end;
|
||||
|
||||
if (pname == GL_COMPUTE_TEXTURE && !_mesa_has_compute_shaders(ctx))
|
||||
goto end;
|
||||
|
||||
ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname,
|
||||
buffer);
|
||||
break;
|
||||
|
||||
case GL_TEXTURE_SHADOW:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue