summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-03-02 15:42:53 +1100
committerBen Skeggs <[email protected]>2008-03-02 15:42:53 +1100
commita414173105a18a0c6ed3b03ef986eb6eb30f7a58 (patch)
treead62788cfc17e83c394b82ca4f38b653c68ce0a0 /src/gallium
parent59d4b7cc626704dbbd9c817019ec2dd9183322ad (diff)
parentd8a9d850b9d63c7398d596fad2dfd2f05e55ef7d (diff)
Merge remote branch 'nouveau/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv30/nv30_state.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 53368561e07..aa3fe7837e4 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -537,7 +537,7 @@ nv30_set_framebuffer_state(struct pipe_context *pipe,
const struct pipe_framebuffer_state *fb)
{
struct nv30_context *nv30 = nv30_context(pipe);
- struct pipe_surface *rt[4], *zeta;
+ struct pipe_surface *rt[4], *zeta = NULL;
uint32_t rt_enable, rt_format, w, h;
int i, colour_format = 0, zeta_format = 0;
@@ -603,13 +603,20 @@ nv30_set_framebuffer_state(struct pipe_context *pipe,
}
if (rt_enable & NV34TCL_RT_ENABLE_COLOR0) {
+ uint32_t pitch = rt[0]->pitch * rt[0]->cpp;
+ if (zeta) {
+ pitch |= (zeta->pitch * zeta->cpp)<<16;
+ } else {
+ pitch |= pitch<<16;
+ }
+
BEGIN_RING(rankine, NV34TCL_COLOR0_PITCH, 1);
- OUT_RING ( (rt[0]->pitch * rt[0]->cpp) | ( (zeta->pitch * zeta->cpp) << 16) );
+ OUT_RING ( pitch );
nv30->rt[0] = rt[0]->buffer;
}
if (rt_enable & NV34TCL_RT_ENABLE_COLOR1) {
- BEGIN_RING(rankine, NV34TCL_COLOR1_PITCH, 2);
+ BEGIN_RING(rankine, NV34TCL_COLOR1_PITCH, 1);
OUT_RING (rt[1]->pitch * rt[1]->cpp);
nv30->rt[1] = rt[1]->buffer;
}