mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 09:58:05 +02:00
mesa/main: do not allow stencil-texture enums on gles1
ctx->Extensions.ARB_texture_stencil8 is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. So let's instead check for both ARB_texture_stencil8 and OES_texture_stencil8, so we support depth textures on OpenGL and OpenGL ES 2.0+. There's no extension enabling stencil-textures for OpenGL ES 1.x, so we shouldn't allow those enums there. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
19eb0bf28f
commit
76b038bee7
1 changed files with 2 additions and 1 deletions
|
|
@ -2337,7 +2337,8 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat)
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx->Extensions.ARB_texture_stencil8) {
|
||||
if (_mesa_has_ARB_texture_stencil8(ctx) ||
|
||||
_mesa_has_OES_texture_stencil8(ctx)) {
|
||||
switch (internalFormat) {
|
||||
case GL_STENCIL_INDEX:
|
||||
case GL_STENCIL_INDEX1:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue