[Mesa-dev] [PATCH 1/3] mesa: remove misleading gles checks for formatquery
sroland at vmware.com
sroland at vmware.com
Sat Jan 27 00:59:56 UTC 2018
From: Roland Scheidegger <sroland at vmware.com>
Testing for gles there is just confusing - this is about target being
supported, if it was valid at all was already determined earlier
(in _legal_parameters). It didn't make sense at all in any case, since
it would only have said false there for gles for 2d but not 2d arrays etc.
---
src/mesa/main/formatquery.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 61f798c88f..e0062a64d2 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -392,14 +392,12 @@ _is_target_supported(struct gl_context *ctx, GLenum target)
* implementation the "unsupported" answer should be given.
* This is not an error."
*
- * For OpenGL ES, queries can only be used with GL_RENDERBUFFER or MS.
+ * Note that legality of targets has already been verified.
*/
switch(target){
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
case GL_TEXTURE_3D:
- if (!_mesa_is_desktop_gl(ctx))
- return false;
break;
case GL_TEXTURE_1D_ARRAY:
@@ -702,6 +700,12 @@ _mesa_query_internal_format_default(struct gl_context *ctx, GLenum target,
case GL_FRAMEBUFFER_RENDERABLE_LAYERED:
case GL_FRAMEBUFFER_BLEND:
case GL_FILTER:
+ /*
+ * XXX seems a tad optimistic just saying yes to everything here.
+ * Even for combinations which make no sense...
+ * And things like TESS_CONTROL_TEXTURE should definitely default to
+ * NONE if the driver doesn't even support tessellation...
+ */
params[0] = GL_FULL_SUPPORT;
break;
case GL_NUM_TILING_TYPES_EXT:
--
2.12.3
More information about the mesa-dev
mailing list