mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 22:30:24 +01:00
check for either GL_ARB_depth_texture or GL_SGIX_depth_texture in a few places
This commit is contained in:
parent
f36954ec3c
commit
4618a9bfc2
3 changed files with 12 additions and 11 deletions
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.1
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -1185,7 +1185,8 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
|
|||
; /* fallthrough */
|
||||
}
|
||||
|
||||
if (ctx->Extensions.SGIX_depth_texture) {
|
||||
if (ctx->Extensions.SGIX_depth_texture ||
|
||||
ctx->Extensions.ARB_depth_texture) {
|
||||
switch (internalFormat) {
|
||||
case GL_DEPTH_COMPONENT:
|
||||
case GL_DEPTH_COMPONENT24_SGIX:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
*
|
||||
|
|
@ -242,7 +242,8 @@ _mesa_base_tex_format( GLcontext *ctx, GLint internalFormat )
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx->Extensions.SGIX_depth_texture) {
|
||||
if (ctx->Extensions.SGIX_depth_texture ||
|
||||
ctx->Extensions.ARB_depth_texture) {
|
||||
switch (internalFormat) {
|
||||
case GL_DEPTH_COMPONENT:
|
||||
case GL_DEPTH_COMPONENT16_SGIX:
|
||||
|
|
@ -1982,7 +1983,8 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
|
|||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)");
|
||||
}
|
||||
|
||||
if (!ctx->Extensions.SGIX_depth_texture && is_depth_format(format)) {
|
||||
if (!ctx->Extensions.SGIX_depth_texture &&
|
||||
!ctx->Extensions.ARB_depth_texture && is_depth_format(format)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.3
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||
*
|
||||
|
|
@ -1771,10 +1771,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
|
|||
*params = 0;
|
||||
return;
|
||||
case GL_DEPTH_BITS:
|
||||
/* XXX this isn't in the GL_SGIX_depth_texture spec
|
||||
* but seems appropriate.
|
||||
*/
|
||||
if (ctx->Extensions.SGIX_depth_texture)
|
||||
if (ctx->Extensions.SGIX_depth_texture ||
|
||||
ctx->Extensions.ARB_depth_texture)
|
||||
*params = img->TexFormat->DepthBits;
|
||||
else
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue