diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2008-12-04 12:28:12 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-12-04 12:28:12 -0500 |
commit | 9eccd0ad0827a1b8ec9abb2cebf5768d204a5ce9 (patch) | |
tree | 8b22a233c85254c9451019bc4554086c1ccf76bc /src/radeon_exa_render.c | |
parent | e13fba853ba19e6b0f081b9b3d9fa76c38a0f82b (diff) |
Fix up US setup after r3xx bicubic merge
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r-- | src/radeon_exa_render.c | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index b7972000..a74abb63 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -1413,8 +1413,8 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, /* setup the rasterizer, load FS */ - BEGIN_ACCEL(10); if (pMask) { + BEGIN_ACCEL(16); /* 4 components: 2 for tex0, 2 for tex1 */ OUT_ACCEL_REG(R300_RS_COUNT, ((4 << R300_RS_COUNT_IT_COUNT_SHIFT) | @@ -1434,7 +1434,10 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, R300_TEX_START(0) | R300_TEX_SIZE(1) | R300_RGBA_OUT)); + + } else { + BEGIN_ACCEL(15); /* 2 components: 2 for tex0 */ OUT_ACCEL_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | @@ -1453,14 +1456,45 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, R300_TEX_START(0) | R300_TEX_SIZE(0) | R300_RGBA_OUT)); + } + OUT_ACCEL_REG(R300_US_CONFIG, (0 << R300_NLEVEL_SHIFT) | R300_FIRST_TEX); + OUT_ACCEL_REG(R300_US_CODE_ADDR_0, + (R300_ALU_START(0) | + R300_ALU_SIZE(0) | + R300_TEX_START(0) | + R300_TEX_SIZE(0))); + OUT_ACCEL_REG(R300_US_CODE_ADDR_1, + (R300_ALU_START(0) | + R300_ALU_SIZE(0) | + R300_TEX_START(0) | + R300_TEX_SIZE(0))); + OUT_ACCEL_REG(R300_US_CODE_ADDR_2, + (R300_ALU_START(0) | + R300_ALU_SIZE(0) | + R300_TEX_START(0) | + R300_TEX_SIZE(0))); + OUT_ACCEL_REG(R300_US_PIXSIZE, 1); /* highest temp used */ /* shader output swizzling */ OUT_ACCEL_REG(R300_US_OUT_FMT_0, output_fmt); - /* tex inst for src texture is pre-loaded in RADEONInit3DEngine() */ - /* tex inst for mask texture is pre-loaded in RADEONInit3DEngine() */ + /* tex inst for src texture */ + OUT_ACCEL_REG(R300_US_TEX_INST(0), + (R300_TEX_SRC_ADDR(0) | + R300_TEX_DST_ADDR(0) | + R300_TEX_ID(0) | + R300_TEX_INST(R300_TEX_INST_LD))); + + if (pMask) { + /* tex inst for mask texture */ + OUT_ACCEL_REG(R300_US_TEX_INST(1), + (R300_TEX_SRC_ADDR(1) | + R300_TEX_DST_ADDR(1) | + R300_TEX_ID(1) | + R300_TEX_INST(R300_TEX_INST_LD))); + } /* RGB inst * temp addresses for texture inputs |