summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_state.c
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-06-16 10:40:39 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-06-16 10:40:39 +0000
commitaf02907b4cbe212f0d87de25d85118b05303415c (patch)
tree1497c1bb6c3e6592803bf2f6bf2fbf806da10fa0 /src/mesa/drivers/dri/r300/r300_state.c
parent463c1d6c57a3df87b57a74f9bdbd365eb99f2a42 (diff)
Support 16-bit modes.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_state.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 72418154c4..1c0ccc1986 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -2146,17 +2146,20 @@ void r300ResetHwState(r300ContextPtr r300)
r300->hw.cb.cmd[R300_CB_OFFSET] =
r300->radeon.radeonScreen->backOffset +
r300->radeon.radeonScreen->fbLocation;
- r300->hw.cb.cmd[R300_CB_PITCH] = r300->radeon.radeonScreen->backPitch
- | R300_COLOR_UNKNOWN_22_23;
+ r300->hw.cb.cmd[R300_CB_PITCH] = r300->radeon.radeonScreen->backPitch;
} else {
r300->hw.cb.cmd[R300_CB_OFFSET] =
r300->radeon.radeonScreen->frontOffset +
r300->radeon.radeonScreen->fbLocation;
- r300->hw.cb.cmd[R300_CB_PITCH] = r300->radeon.radeonScreen->frontPitch
- | R300_COLOR_UNKNOWN_22_23;
+ r300->hw.cb.cmd[R300_CB_PITCH] = r300->radeon.radeonScreen->frontPitch;
}
+ if (r300->radeon.radeonScreen->cpp == 4)
+ r300->hw.cb.cmd[R300_CB_PITCH] |= R300_COLOR_FORMAT_ARGB8888;
+ else
+ r300->hw.cb.cmd[R300_CB_PITCH] |= R300_COLOR_FORMAT_RGB565;
+
r300->hw.unk4E50.cmd[1] = 0;
r300->hw.unk4E50.cmd[2] = 0;
r300->hw.unk4E50.cmd[3] = 0;