summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-10-10 11:29:14 -0600
committerBrian Paul <brianp@vmware.com>2016-10-13 17:38:49 -0600
commitff00ab745c9a9d6ef35239ea656a5db0c76de52d (patch)
tree0ea17a68c9eeafdb5d43b2ebaf8105ca1a131a92 /src/mesa/main/api_validate.c
parenta710c21ac200fc1c80a6209862e837f0a75f4cc5 (diff)
downloadexternal_mesa3d-ff00ab745c9a9d6ef35239ea656a5db0c76de52d.zip
external_mesa3d-ff00ab745c9a9d6ef35239ea656a5db0c76de52d.tar.gz
external_mesa3d-ff00ab745c9a9d6ef35239ea656a5db0c76de52d.tar.bz2
mesa: replace gl_framebuffer::_IntegerColor wih _IntegerBuffers
Use a bitmask to indicate which color buffers are integer-valued, rather than a bool. Also, the old field was mis-computed. If an integer buffer was followed by a non-integer buffer, the _IntegerColor field was wrongly set to false. This fixes the new piglit gl-3.1-mixed-int-float-fbo test. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index c3c5a69..d3b4cab 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -152,7 +152,7 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
/* If drawing to integer-valued color buffers, there must be an
* active fragment shader (GL_EXT_texture_integer).
*/
- if (ctx->DrawBuffer && ctx->DrawBuffer->_IntegerColor) {
+ if (ctx->DrawBuffer && ctx->DrawBuffer->_IntegerBuffers) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(integer format but no fragment shader)", where);
return GL_FALSE;