aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorAntia Puentes <[email protected]>2015-12-01 19:34:21 +0100
committerEduardo Lima Mitev <[email protected]>2016-03-03 15:14:06 +0100
commit675418182b822810e1371407740d1a9793a812d3 (patch)
treebe3a1bff4a1b3e8c98e53d7c833b44c4201e65fa /src/mesa
parent4a8dae62478377226bf63fcc69629daa0e80a97d (diff)
mesa/main: Extend _mesa_get_format_bits to accept new pnames
The new pnames accepted by the function are: - INTERNALFORMAT_RED_SIZE - INTERNALFORMAT_GREEN_SIZE - INTERNALFORMAT_BLUE_SIZE - INTERNALFORMAT_ALPHA_SIZE - INTERNALFORMAT_DEPTH_SIZE - INTERNALFORMAT_STENCIL_SIZE It will be used by the ARB_internalformat_query2 implementation to implement those pnames. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/formats.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 9f920075026..41d40a522fa 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -132,21 +132,25 @@ _mesa_get_format_bits(mesa_format format, GLenum pname)
case GL_TEXTURE_RED_SIZE:
case GL_RENDERBUFFER_RED_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
+ case GL_INTERNALFORMAT_RED_SIZE:
return info->RedBits;
case GL_GREEN_BITS:
case GL_TEXTURE_GREEN_SIZE:
case GL_RENDERBUFFER_GREEN_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
+ case GL_INTERNALFORMAT_GREEN_SIZE:
return info->GreenBits;
case GL_BLUE_BITS:
case GL_TEXTURE_BLUE_SIZE:
case GL_RENDERBUFFER_BLUE_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
+ case GL_INTERNALFORMAT_BLUE_SIZE:
return info->BlueBits;
case GL_ALPHA_BITS:
case GL_TEXTURE_ALPHA_SIZE:
case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
+ case GL_INTERNALFORMAT_ALPHA_SIZE:
return info->AlphaBits;
case GL_TEXTURE_INTENSITY_SIZE:
return info->IntensityBits;
@@ -158,11 +162,13 @@ _mesa_get_format_bits(mesa_format format, GLenum pname)
case GL_TEXTURE_DEPTH_SIZE_ARB:
case GL_RENDERBUFFER_DEPTH_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
+ case GL_INTERNALFORMAT_DEPTH_SIZE:
return info->DepthBits;
case GL_STENCIL_BITS:
case GL_TEXTURE_STENCIL_SIZE_EXT:
case GL_RENDERBUFFER_STENCIL_SIZE_EXT:
case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
+ case GL_INTERNALFORMAT_STENCIL_SIZE:
return info->StencilBits;
default:
_mesa_problem(NULL, "bad pname in _mesa_get_format_bits()");