summaryrefslogtreecommitdiff
path: root/src/radeon_render.c
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2004-08-09 22:37:22 +0000
committerKevin E Martin <kem@kem.org>2004-08-09 22:37:22 +0000
commita2da1caf5848a78b10afd99811fd1a5677af6786 (patch)
treeca0f34d8044b70800fe6666a4a72e3520b000f3f /src/radeon_render.c
parent3171664c6a02424736864204b731249097fa7aae (diff)
Fix install problem on platforms not using xorg.cf/xfree86.cf (Bug #339,
Harold L. Hunt II, Alexander Gottwald). Fix crash when using X core font in zh_CN.UTF-8 locale (Bug #368, Yu Shao, David Dawes). Fix glXMakeCurrent(Dpy, None, NULL) crash (Bug #719, Adam Jackson). HP-PA build fix (Bug #828, Guy Martin, Paul Anderson). Fix SDK build for GATOS and Wacom driver (Bug #829, Bryan Stine). Fix attempt to read video ROM before enabling it (Bug #843, Ivan Kokshaysky, Mike A. Harris). Fix detection of primary adapter (Bug #843, Ivan Kokshaysky, Mike A. Harris). Clarify xset man page description of how to use the keyboard repeat rate settings (Bug #846, Mike A. Harris). Fix problem where print-screen key would get remapped to sys-req in certain keymaps, which broke GNOME printscreen functionality (Bug #847, Owen Taylor). Fix several render problems: - MMIO mode support - Hang on IGP chips - VT switching hang - 3D render corruption (Bug #922, Hui Yu).
Diffstat (limited to 'src/radeon_render.c')
-rw-r--r--src/radeon_render.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/radeon_render.c b/src/radeon_render.c
index 8b4f5da3..073ca665 100644
--- a/src/radeon_render.c
+++ b/src/radeon_render.c
@@ -230,7 +230,7 @@ void RADEONInit3DEngineForRender(ScrnInfoPtr pScrn)
#ifdef XF86DRI
RADEONInfoPtr info = RADEONPTR (pScrn);
- if (info->directRenderingEnabled)
+ if (info->CPStarted)
RadeonInit3DEngineCP(pScrn);
else
#endif
@@ -321,8 +321,13 @@ static void FUNC_NAME(RadeonInit3DEngine)(ScrnInfoPtr pScrn)
(info->ChipFamily == CHIP_FAMILY_RV280) ||
(info->ChipFamily == CHIP_FAMILY_RS300) ||
(info->ChipFamily == CHIP_FAMILY_R200)) {
+
BEGIN_ACCEL(7);
- OUT_ACCEL_REG(R200_SE_VAP_CNTL_STATUS, 0);
+ if (info->ChipFamily == CHIP_FAMILY_RS300) {
+ OUT_ACCEL_REG(R200_SE_VAP_CNTL_STATUS, RADEON_TCL_BYPASS);
+ } else {
+ OUT_ACCEL_REG(R200_SE_VAP_CNTL_STATUS, 0);
+ }
OUT_ACCEL_REG(R200_PP_CNTL_X, 0);
OUT_ACCEL_REG(R200_PP_TXMULTI_CTL_0, 0);
OUT_ACCEL_REG(R200_SE_VTX_STATE_CNTL, 0);
@@ -334,7 +339,11 @@ static void FUNC_NAME(RadeonInit3DEngine)(ScrnInfoPtr pScrn)
FINISH_ACCEL();
} else {
BEGIN_ACCEL(2);
- OUT_ACCEL_REG(RADEON_SE_CNTL_STATUS, RADEON_TCL_BYPASS);
+ if ((info->ChipFamily == CHIP_FAMILY_RADEON) ||
+ (info->ChipFamily == CHIP_FAMILY_RV200))
+ OUT_ACCEL_REG(RADEON_SE_CNTL_STATUS, 0);
+ else
+ OUT_ACCEL_REG(RADEON_SE_CNTL_STATUS, RADEON_TCL_BYPASS);
OUT_ACCEL_REG(RADEON_SE_COORD_FMT,
RADEON_VTX_XY_PRE_MULT_1_OVER_W0 |
RADEON_VTX_ST0_NONPARAMETRIC |
@@ -423,8 +432,13 @@ static Bool FUNC_NAME(R100SetupTexture)(
/* Upload texture to card. Should use ImageWrite to avoid syncing. */
i = height;
dst = (CARD8*)(info->FB + offset);
- if (info->accel->NeedToSync)
+
+ if (info->accel->NeedToSync) {
info->accel->Sync(pScrn);
+ if (info->CPStarted)
+ RADEONInit3DEngineForRender(pScrn);
+ }
+
while(i--) {
memcpy(dst, src, width * tex_bytepp);
src += src_pitch;
@@ -475,7 +489,7 @@ FUNC_NAME(R100SetupForCPUToScreenAlphaTexture) (
blend_cntl = RadeonGetBlendCntl(op, dstFormat);
if (blend_cntl == 0)
return FALSE;
-
+
if (!FUNC_NAME(R100SetupTexture)(pScrn, maskFormat, alphaPtr, alphaPitch,
width, height, flags))
return FALSE;
@@ -727,8 +741,12 @@ static Bool FUNC_NAME(R200SetupTexture)(
/* Upload texture to card. Should use ImageWrite to avoid syncing. */
i = height;
dst = (CARD8*)(info->FB + offset);
- if (info->accel->NeedToSync)
+ if (info->accel->NeedToSync) {
info->accel->Sync(pScrn);
+ if (info->CPStarted)
+ RADEONInit3DEngineForRender(pScrn);
+ }
+
while(i--) {
memcpy(dst, src, width * tex_bytepp);
src += src_pitch;