projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5084d4
)
Make gleans polyoffset test happy.
author
Aapo Tahkola
<aet@rasterburn.org>
Sat, 14 May 2005 17:41:57 +0000
(17:41 +0000)
committer
Aapo Tahkola
<aet@rasterburn.org>
Sat, 14 May 2005 17:41:57 +0000
(17:41 +0000)
src/mesa/drivers/dri/r300/r300_state.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/r300/r300_state.c
b/src/mesa/drivers/dri/r300/r300_state.c
index 16077560965f0a071f2c1624f696dd04480bc007..b1c1bdef2373c621e813d8149a0463859589b081 100644
(file)
--- a/
src/mesa/drivers/dri/r300/r300_state.c
+++ b/
src/mesa/drivers/dri/r300/r300_state.c
@@
-975,9
+975,18
@@
static void r300DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
static void r300PolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
- GLfloat constant = units * /*rmesa->state.depth.scale*/4;
+ GLfloat constant = units;
+
+ switch (ctx->Visual.depthBits) {
+ case 16:
+ constant *= 4.0;
+ break;
+ case 24:
+ constant *= 2.0;
+ break;
+ }
- factor *= 12;
+ factor *= 12
.0
;
/* fprintf(stderr, "%s f:%f u:%f\n", __FUNCTION__, factor, constant); */