[Mesa-dev] [PATCH] mesa: Fix types in _mesa_get_color_read_format().
Kenneth Graunke
kenneth at whitecape.org
Sat Sep 3 22:07:23 UTC 2016
This is a mesa_format, not a GLenum.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/main/framebuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index f024f5e..46a6f64 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -844,21 +844,21 @@ _mesa_get_color_read_format(struct gl_context *ctx)
if (!ctx->ReadBuffer || !ctx->ReadBuffer->_ColorReadBuffer) {
/* The spec is unclear how to handle this case, but NVIDIA's
* driver generates GL_INVALID_OPERATION.
*/
_mesa_error(ctx, GL_INVALID_OPERATION,
"glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT: "
"no GL_READ_BUFFER)");
return GL_NONE;
}
else {
- const GLenum format = ctx->ReadBuffer->_ColorReadBuffer->Format;
+ const mesa_format format = ctx->ReadBuffer->_ColorReadBuffer->Format;
const GLenum data_type = _mesa_get_format_datatype(format);
if (format == MESA_FORMAT_B8G8R8A8_UNORM)
return GL_BGRA;
else if (format == MESA_FORMAT_B5G6R5_UNORM)
return GL_RGB;
else if (format == MESA_FORMAT_R_UNORM8)
return GL_RED;
switch (data_type) {
--
2.9.3
More information about the mesa-dev
mailing list