summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-03-28 01:50:21 +0100
committerMarek Olšák <[email protected]>2013-04-06 23:57:04 +0200
commit21d407c1b8bf3be1eff87121d528d03c240ce207 (patch)
tree5909f109a8e529e2e2663b42a10e56a5aca848d1 /src/mesa/main/fbobject.c
parentc4629ad3f9440ec7ad3d9f4881d0aba41a93f2f5 (diff)
mesa: refactor clamping controls, get rid of _ClampReadColor
v2: cosmetic changes from Brian's email Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index c1f52990c60..67c116163db 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -784,6 +784,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
numImages = 0;
fb->Width = 0;
fb->Height = 0;
+ fb->_AllColorBuffersFixedPoint = GL_TRUE;
/* Start at -2 to more easily loop over all attachment points.
* -2: depth buffer
@@ -900,6 +901,15 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
/* check if integer color */
fb->_IntegerColor = _mesa_is_format_integer_color(attFormat);
+ /* Update _AllColorBuffersFixedPoint. */
+ if (i >= 0) {
+ GLenum type = _mesa_get_format_datatype(attFormat);
+
+ fb->_AllColorBuffersFixedPoint =
+ fb->_AllColorBuffersFixedPoint &&
+ (type == GL_UNSIGNED_NORMALIZED || type == GL_SIGNED_NORMALIZED);
+ }
+
/* Error-check width, height, format */
if (numImages == 1) {
/* save format */