-"fix" page flipping
-use depth tiling if tiling is enabled
This commit is contained in:
parent
0e55891674
commit
b0d62880e8
|
@ -2142,18 +2142,9 @@ void r300ResetHwState(r300ContextPtr r300)
|
||||||
r300->hw.unk4E10.cmd[3] = 0;
|
r300->hw.unk4E10.cmd[3] = 0;
|
||||||
|
|
||||||
/* Again, r300ClearBuffer uses this */
|
/* Again, r300ClearBuffer uses this */
|
||||||
if (ctx->Visual.doubleBufferMode) {
|
r300->hw.cb.cmd[R300_CB_OFFSET] = r300->radeon.state.color.drawOffset +
|
||||||
r300->hw.cb.cmd[R300_CB_OFFSET] =
|
|
||||||
r300->radeon.radeonScreen->backOffset +
|
|
||||||
r300->radeon.radeonScreen->fbLocation;
|
r300->radeon.radeonScreen->fbLocation;
|
||||||
r300->hw.cb.cmd[R300_CB_PITCH] = r300->radeon.radeonScreen->backPitch;
|
r300->hw.cb.cmd[R300_CB_PITCH] = r300->radeon.state.color.drawPitch;
|
||||||
} 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;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (r300->radeon.radeonScreen->cpp == 4)
|
if (r300->radeon.radeonScreen->cpp == 4)
|
||||||
r300->hw.cb.cmd[R300_CB_PITCH] |= R300_COLOR_FORMAT_ARGB8888;
|
r300->hw.cb.cmd[R300_CB_PITCH] |= R300_COLOR_FORMAT_ARGB8888;
|
||||||
|
@ -2199,6 +2190,14 @@ void r300ResetHwState(r300ContextPtr r300)
|
||||||
r300->radeon.radeonScreen->fbLocation;
|
r300->radeon.radeonScreen->fbLocation;
|
||||||
r300->hw.zb.cmd[R300_ZB_PITCH] = r300->radeon.radeonScreen->depthPitch;
|
r300->hw.zb.cmd[R300_ZB_PITCH] = r300->radeon.radeonScreen->depthPitch;
|
||||||
|
|
||||||
|
if (r300->radeon.sarea->tiling_enabled) {
|
||||||
|
/* Turn off when clearing buffers ? */
|
||||||
|
r300->hw.zb.cmd[R300_ZB_PITCH] |= R300_DEPTH_TILE_ENABLE;
|
||||||
|
|
||||||
|
if (ctx->Visual.depthBits == 24)
|
||||||
|
r300->hw.zb.cmd[R300_ZB_PITCH] |= R300_DEPTH_MICROTILE_ENABLE;
|
||||||
|
}
|
||||||
|
|
||||||
r300->hw.unk4F28.cmd[1] = 0;
|
r300->hw.unk4F28.cmd[1] = 0;
|
||||||
|
|
||||||
r300->hw.unk4F30.cmd[1] = 0;
|
r300->hw.unk4F30.cmd[1] = 0;
|
||||||
|
|
|
@ -48,6 +48,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include "r300_ioctl.h"
|
#include "r300_ioctl.h"
|
||||||
#include "r200_tcl.h"
|
#include "r200_tcl.h"
|
||||||
#include "r200_sanity.h"
|
#include "r200_sanity.h"
|
||||||
|
#include "r300_state.h"
|
||||||
#include "radeon_reg.h"
|
#include "radeon_reg.h"
|
||||||
|
|
||||||
#include "vblank.h"
|
#include "vblank.h"
|
||||||
|
@ -237,6 +238,8 @@ void radeonPageFlip(const __DRIdrawablePrivate * dPriv)
|
||||||
|
|
||||||
if (IS_FAMILY_R200(radeon))
|
if (IS_FAMILY_R200(radeon))
|
||||||
R200_FIREVERTICES((r200ContextPtr)radeon);
|
R200_FIREVERTICES((r200ContextPtr)radeon);
|
||||||
|
else
|
||||||
|
r300Flush(radeon->glCtx);
|
||||||
LOCK_HARDWARE(radeon);
|
LOCK_HARDWARE(radeon);
|
||||||
|
|
||||||
if (!dPriv->numClipRects) {
|
if (!dPriv->numClipRects) {
|
||||||
|
@ -295,6 +298,21 @@ void radeonPageFlip(const __DRIdrawablePrivate * dPriv)
|
||||||
+ radeon->radeonScreen->fbLocation;
|
+ radeon->radeonScreen->fbLocation;
|
||||||
r200->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = radeon->state.color.drawPitch;
|
r200->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = radeon->state.color.drawPitch;
|
||||||
}
|
}
|
||||||
|
if (IS_FAMILY_R300(radeon)) {
|
||||||
|
r300ContextPtr r300 = (r300ContextPtr)radeon;
|
||||||
|
R300_STATECHANGE(r300, cb);
|
||||||
|
r300->hw.cb.cmd[R300_CB_OFFSET] = r300->radeon.state.color.drawOffset +
|
||||||
|
r300->radeon.radeonScreen->fbLocation;
|
||||||
|
r300->hw.cb.cmd[R300_CB_PITCH] = r300->radeon.state.color.drawPitch;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
if (r300->radeon.sarea->tiling_enabled)
|
||||||
|
r300->hw.cb.cmd[R300_CB_PITCH] |= R300_COLOR_TILE_ENABLE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void radeonWaitForIdleLocked(radeonContextPtr radeon)
|
void radeonWaitForIdleLocked(radeonContextPtr radeon)
|
||||||
|
|
Loading…
Reference in New Issue