diff options
author | Tilman Sauerbeck <[email protected]> | 2010-09-17 12:17:48 +0200 |
---|---|---|
committer | Tilman Sauerbeck <[email protected]> | 2010-09-17 12:17:48 +0200 |
commit | 70a85c39a9cc907902b41c934a17b542865b2ca7 (patch) | |
tree | 08b865a0f77996354ad3e6dd23aed4a7ac22930e /src | |
parent | 5f97d0a218f3509f361504be06f6b307e1b6bb89 (diff) |
r600g: Only set PA_SC_EDGERULE on rv770 and greater.
This is what xf86-video-ati and r600c do.
Signed-off-by: Tilman Sauerbeck <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_states.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_states.c b/src/gallium/drivers/r600/r600_hw_states.c index 144946947d6..bca78ee8deb 100644 --- a/src/gallium/drivers/r600/r600_hw_states.c +++ b/src/gallium/drivers/r600/r600_hw_states.c @@ -289,9 +289,12 @@ static void r600_scissor(struct r600_context *rctx, struct radeon_state *rstate) const struct pipe_scissor_state *state = &rctx->scissor->state.scissor; const struct pipe_framebuffer_state *fb = &rctx->framebuffer->state.framebuffer; struct r600_screen *rscreen = rctx->screen; + enum radeon_family family; unsigned minx, maxx, miny, maxy; u32 tl, br; + family = radeon_get_family(rctx->rw); + if (state == NULL) { minx = 0; miny = 0; @@ -320,7 +323,10 @@ static void r600_scissor(struct r600_context *rctx, struct radeon_state *rstate) rstate->states[R600_SCISSOR__PA_SC_CLIPRECT_2_BR] = br; rstate->states[R600_SCISSOR__PA_SC_CLIPRECT_3_TL] = tl; rstate->states[R600_SCISSOR__PA_SC_CLIPRECT_3_BR] = br; - rstate->states[R600_SCISSOR__PA_SC_EDGERULE] = 0xAAAAAAAA; + + if (family >= CHIP_RV770) + rstate->states[R600_SCISSOR__PA_SC_EDGERULE] = 0xAAAAAAAA; + rstate->states[R600_SCISSOR__PA_SC_GENERIC_SCISSOR_TL] = tl; rstate->states[R600_SCISSOR__PA_SC_GENERIC_SCISSOR_BR] = br; rstate->states[R600_SCISSOR__PA_SC_VPORT_SCISSOR_0_TL] = tl; @@ -1021,6 +1027,9 @@ static void r600_texture_state_scissor(struct r600_screen *rscreen, unsigned level) { struct radeon_state *rstate = &rtexture->scissor[level]; + enum radeon_family family; + + family = radeon_get_family(rscreen->rw); radeon_state_init(rstate, rscreen->rw, R600_STATE_SCISSOR, 0, 0); /* set states (most default value are 0 and struct already @@ -1035,7 +1044,10 @@ static void r600_texture_state_scissor(struct r600_screen *rscreen, rstate->states[R600_SCISSOR__PA_SC_CLIPRECT_3_BR] = S_028244_BR_X(rtexture->width[level]) | S_028244_BR_Y(rtexture->height[level]); rstate->states[R600_SCISSOR__PA_SC_CLIPRECT_3_TL] = 0x80000000; rstate->states[R600_SCISSOR__PA_SC_CLIPRECT_RULE] = 0x0000FFFF; - rstate->states[R600_SCISSOR__PA_SC_EDGERULE] = 0xAAAAAAAA; + + if (family >= CHIP_RV770) + rstate->states[R600_SCISSOR__PA_SC_EDGERULE] = 0xAAAAAAAA; + rstate->states[R600_SCISSOR__PA_SC_GENERIC_SCISSOR_BR] = S_028244_BR_X(rtexture->width[level]) | S_028244_BR_Y(rtexture->height[level]); rstate->states[R600_SCISSOR__PA_SC_GENERIC_SCISSOR_TL] = 0x80000000; rstate->states[R600_SCISSOR__PA_SC_SCREEN_SCISSOR_BR] = S_028244_BR_X(rtexture->width[level]) | S_028244_BR_Y(rtexture->height[level]); |