diff options
author | Cédric Cano <ccano@interfaceconcept.com> | 2011-02-11 17:00:31 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-02-11 17:01:22 -0500 |
commit | 48ffad957f1dbca909515ffa00629f4caa68706b (patch) | |
tree | adbacd11cdad75aefcacdb234388892e849be7a7 /src/r600_exa.c | |
parent | 151b22bd7c3b1002a7261538611fb2b468815c86 (diff) |
kms: 6xx/7xx big endian accel support
agd5f: minor cleanups
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/r600_exa.c')
-rw-r--r-- | src/r600_exa.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c index 8057d56d..ea584827 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -274,9 +274,15 @@ R600PrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) } else if (accel_state->dst_obj.bpp == 16) { cb_conf.format = COLOR_5_6_5; cb_conf.comp_swap = 2; /* RGB */ +#if X_BYTE_ORDER == X_BIG_ENDIAN + cb_conf.endian = ENDIAN_8IN16; +#endif } else { cb_conf.format = COLOR_8_8_8_8; cb_conf.comp_swap = 1; /* ARGB */ +#if X_BYTE_ORDER == X_BIG_ENDIAN + cb_conf.endian = ENDIAN_8IN32; +#endif } cb_conf.source_format = 1; cb_conf.blend_clamp = 1; @@ -941,6 +947,19 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, tex_res.mip_bo = accel_state->src_obj[unit].bo; tex_res.request_size = 1; +#if X_BYTE_ORDER == X_BIG_ENDIAN + switch (accel_state->src_obj[unit].bpp) { + case 16: + tex_res.endian = SQ_ENDIAN_8IN16; + break; + case 32: + tex_res.endian = SQ_ENDIAN_8IN32; + break; + default : + break; + } +#endif + /* component swizzles */ switch (pPict->format) { case PICT_a1r5g5b5: @@ -1409,6 +1428,18 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, cb_conf.rop = 3; if (accel_state->dst_obj.tiling_flags == 0) cb_conf.array_mode = 1; +#if X_BYTE_ORDER == X_BIG_ENDIAN + switch (dst_obj.bpp) { + case 16: + cb_conf.endian = ENDIAN_8IN16; + break; + case 32: + cb_conf.endian = ENDIAN_8IN32; + break; + default: + break; + } +#endif r600_set_render_target(pScrn, accel_state->ib, &cb_conf, accel_state->dst_obj.domain); if (pMask) |