Mesa (master): mesa: Always use seamless cubemap filtering in GLES3
Ian Romanick
idr at kemper.freedesktop.org
Sun Sep 8 14:54:51 UTC 2013
Module: Mesa
Branch: master
Commit: 4a1950351663ac58cbef1ee041dab9a56441792c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a1950351663ac58cbef1ee041dab9a56441792c
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Sep 4 11:09:05 2013 -0700
mesa: Always use seamless cubemap filtering in GLES3
Appendix F.2 of the OpenGL ES 3.0.0 spec says:
"OpenGL ES 3.0 requires that all cube map filtering be
seamless. OpenGL ES 2.0 specified that a single cube map face be
selected and used for filtering."
Setting the field only in the context will work fine with sampler
objects (and drivers that support AMD_seamless_cubemap_per_texture)
because seamless filtering is used if *either* the context or the
sampler enable it:
"If TEXTURE_CUBE_MAP_SEAMLESS_ARB is emabled (sic) globally or the
value of the texture's TEXTURE_CUBE_MAP_SEAMLESS_ARB parameter is
TRUE, seamless cube map sampling is enabled..."
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
Reported-by: Maxence Le Dore <maxence.ledore at gmail.com>
Thanked-by: Maxence Le Dore <maxence.ledore at gmail.com>
---
src/mesa/main/texstate.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index dad69a8..ad80dcf 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -810,6 +810,14 @@ _mesa_init_texture(struct gl_context *ctx)
ctx->Texture.CurrentUnit = 0; /* multitexture */
ctx->Texture._EnabledUnits = 0x0;
+ /* Appendix F.2 of the OpenGL ES 3.0 spec says:
+ *
+ * "OpenGL ES 3.0 requires that all cube map filtering be
+ * seamless. OpenGL ES 2.0 specified that a single cube map face be
+ * selected and used for filtering."
+ */
+ ctx->Texture.CubeMapSeamless = _mesa_is_gles3(ctx);
+
for (u = 0; u < Elements(ctx->Texture.Unit); u++)
init_texture_unit(ctx, u);
More information about the mesa-commit
mailing list