projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e884c6
)
Float->uint conversion for PIPE_FORMAT_U_Z32 resulted in overflow in depth_value...
author
Brian
<brian.paul@tungstengraphics.com>
Wed, 7 Nov 2007 21:40:38 +0000
(14:40 -0700)
committer
Brian
<brian.paul@tungstengraphics.com>
Wed, 7 Nov 2007 21:40:38 +0000
(14:40 -0700)
src/mesa/state_tracker/st_cb_clear.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_cb_clear.c
b/src/mesa/state_tracker/st_cb_clear.c
index 2c79e2890d136d6be72b51c1f2ffef251a82baca..cb7e43fb8e925c6c3279e45d3610b02d7f528551 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_clear.c
+++ b/
src/mesa/state_tracker/st_cb_clear.c
@@
-86,7
+86,11
@@
depth_value(GLuint pipeFormat, GLfloat value)
val = (GLuint) (value * 0xffffff);
break;
case PIPE_FORMAT_U_Z32:
- val = (GLuint) (value * 0xffffffff);
+ /* special-case to avoid overflow */
+ if (value == 1.0)
+ val = 0xffffffff;
+ else
+ val = (GLuint) (value * 0xffffffff);
break;
case PIPE_FORMAT_S8_Z24:
/*case PIPE_FORMAT_Z24_S8:*/