summaryrefslogtreecommitdiff
path: root/src/evergreen_exa.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-05-24 18:02:52 -0400
committerAlex Deucher <alexdeucher@gmail.com>2011-05-24 18:02:52 -0400
commitb913e7ba2b60d47a6660699210cc3cf6f5dc52c2 (patch)
tree1701e7b1585703261330027c9b7499df85112b24 /src/evergreen_exa.c
parent82cb33c3f0e1ba802d7a94f3159b3c5c86cd4043 (diff)
Revert "cayman: add scissors workaround."
Needs a proper workaround for a hw bug. This reverts commit b77d374b0d11f48c33cfffdb4157c4ec4b05ea15.
Diffstat (limited to 'src/evergreen_exa.c')
-rw-r--r--src/evergreen_exa.c42
1 files changed, 9 insertions, 33 deletions
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 5752d0eb..306e90fe 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -58,24 +58,6 @@ extern int cayman_comp_ps(RADEONChipFamily ChipSet, uint32_t* ps);
static void
EVERGREENDoneSolid(PixmapPtr pPix);
-/* this is a workaround, but not sure for what -
- */
-static inline int cayman_adjust_scissor(ScrnInfoPtr pScrn, int height)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- if (info->ChipFamily != CHIP_FAMILY_CAYMAN)
- return height;
-
- if (height == 0)
- return 0;
-
- /* I've no idea if all scissors need to be even height or if its
- just a 1 -> 2 problem */
- if (height & 1)
- height++;
- return height;
-}
-
static Bool
EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
{
@@ -88,7 +70,6 @@ EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
float *ps_alu_consts;
const_config_t ps_const_conf;
struct r600_accel_object dst;
- int scissor_height;
if (!RADEONCheckBPP(pPix->drawable.bitsPerPixel))
@@ -125,10 +106,9 @@ EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
evergreen_set_default_state(pScrn);
- scissor_height = cayman_adjust_scissor(pScrn, accel_state->dst_obj.height);
- evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
- evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
- evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
+ evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
+ evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
+ evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
/* Shader */
vs_conf.shader_addr = accel_state->vs_mc_addr;
@@ -279,7 +259,6 @@ EVERGREENDoPrepareCopy(ScrnInfoPtr pScrn)
tex_resource_t tex_res;
tex_sampler_t tex_samp;
shader_config_t vs_conf, ps_conf;
- int scissor_height;
CLEAR (cb_conf);
CLEAR (tex_res);
@@ -292,10 +271,9 @@ EVERGREENDoPrepareCopy(ScrnInfoPtr pScrn)
evergreen_set_default_state(pScrn);
- scissor_height = cayman_adjust_scissor(pScrn, accel_state->dst_obj.height);
- evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
- evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
- evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
+ evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
+ evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
+ evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
/* Shader */
vs_conf.shader_addr = accel_state->vs_mc_addr;
@@ -1119,7 +1097,6 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
const_config_t vs_const_conf;
struct r600_accel_object src_obj, mask_obj, dst_obj;
float *cbuf;
- int scissor_height;
if (pDst->drawable.bitsPerPixel < 8 || pSrc->drawable.bitsPerPixel < 8)
return FALSE;
@@ -1207,10 +1184,9 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
evergreen_set_default_state(pScrn);
- scissor_height = cayman_adjust_scissor(pScrn, accel_state->dst_obj.height);
- evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
- evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
- evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, scissor_height);
+ evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
+ evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
+ evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height);
if (!EVERGREENTextureSetup(pSrcPicture, pSrc, 0)) {
radeon_ib_discard(pScrn);