summaryrefslogtreecommitdiff
path: root/scons
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-08-13 00:35:41 -0700
committerKenneth Graunke <kenneth@whitecape.org>2012-08-13 19:16:38 -0700
commit605f964d5cc7016fc74e0563829fa794da845c20 (patch)
tree5fbf7b3e6dce8401d849d1086ed51c0168f217e5 /scons
parent43e3a7533d5537e48cef23588131dd25d938ee4b (diff)
mesa: Use GLdouble for depthMax in final unpack conversions.
The final step of _mesa_unpack_depth_span is to take the temporary GLfloat depth values and convert them to the desired format. When converting to GL_UNSIGNED_INTEGER with depthMax > 0xffffff, we use double-precision math to avoid overflow and precision problems. Or at least that's the idea. Unfortunately GLdouble z = depthValues[i] * (GLfloat) depthMax; actually causes single-precision multiplication, since both operands are GLfloats. Casting depthMax to GLdouble causes the scaling to be done with double-precision math. Fixes a regression in oglconform's depth-stencil basic.read.ds test since c60ac7b17993d28af65b04f9bbbf3ee74c35358c, where the expected and actual values differed slightly. For example, 0xcfa7a6 vs. 0xcfa7a4. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49772 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'scons')
0 files changed, 0 insertions, 0 deletions