diff options
author | Vladimir Dergachev <volodya@freedesktop.org> | 2005-01-04 20:25:11 +0000 |
---|---|---|
committer | Vladimir Dergachev <volodya@freedesktop.org> | 2005-01-04 20:25:11 +0000 |
commit | 6b185aaedfacf3cc435d575585cc5f2e029bece6 (patch) | |
tree | 2844dfa281566efc3f36065f347c964d9542c1e3 /src/mesa/drivers/dri/r300/r300_ioctl.c | |
parent | 55ee1daaf929b9dca436a238f87715caec184445 (diff) |
Port code from r200 that implements color blending. Seems to work.
This can be tested with lesson19 from NeHe.
This has also shown that the alpha code does not work - we pick up a red tint
for transparent pixels somewhere.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_ioctl.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_ioctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 0b876d576e..b4b1aebc4d 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -109,6 +109,13 @@ static void r300ClearBuffer(r300ContextPtr r300, int flags, int buffer) r300->hw.vpt.cmd[R300_VPT_ZSCALE] = r300PackFloat32(1.0); r300->hw.vpt.cmd[R300_VPT_ZOFFSET] = r300PackFloat32(0.0); + R300_STATECHANGE(r300, at); + r300->hw.at.cmd[R300_AT_ALPHA_TEST] = 0; + + R300_STATECHANGE(r300, bld); + r300->hw.bld.cmd[R300_BLD_CBLEND] = 0; + r300->hw.bld.cmd[R300_BLD_ABLEND] = 0; + R300_STATECHANGE(r300, cb); r300->hw.cb.cmd[R300_CB_OFFSET] = cboffset; r300->hw.cb.cmd[R300_CB_PITCH] = cbpitch | R300_COLOR_UNKNOWN_22_23; |