diff options
author | Jesse Barnes <jbarnes@nietzche.virtuousgeek.org> | 2007-08-16 12:04:20 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@nietzche.virtuousgeek.org> | 2007-08-16 12:04:20 -0700 |
commit | 3655a1ecb62f6c387a16fa87cf6f00bf7835dce4 (patch) | |
tree | 8ae63d8f75a7a7a64d33b927aee706db0c89928d /src | |
parent | e5c336eaa32be8f9379a2c1dd51006b85bc8b270 (diff) | |
parent | 2231cdcd8f1ee81b3e59cc5e3a325c22ee0f40e4 (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/driver/xf86-video-intel
Diffstat (limited to 'src')
-rw-r--r-- | src/i830_dri.c | 1 | ||||
-rw-r--r-- | src/i915_render.c | 22 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index a4fc97c2..e2b42b49 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -602,6 +602,7 @@ I830DRIScreenInit(ScreenPtr pScreen) #endif #if DRIINFO_MAJOR_VERSION > 5 || \ (DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 3) + if (pI830->useEXA) pDRIInfo->texOffsetStart = I830TexOffsetStart; #endif diff --git a/src/i915_render.c b/src/i915_render.c index 7f25d90a..7546dfd7 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -155,16 +155,9 @@ static Bool i915_get_dest_format(PicturePtr pDstPicture, CARD32 *dst_format) case PICT_x1r5g5b5: *dst_format = COLR_BUF_ARGB1555; break; - /* COLR_BUF_8BIT is special for YUV surfaces. While we may end up being - * able to use it depending on how the hardware implements it, disable it - * for now while we don't know what exactly it does (what channel does it - * read from? - */ - /* case PICT_a8: *dst_format = COLR_BUF_8BIT; break; - */ case PICT_a4r4g4b4: case PICT_x4r4g4b4: *dst_format = COLR_BUF_ARGB4444; @@ -313,6 +306,7 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture, I830Ptr pI830 = I830PTR(pScrn); CARD32 dst_format, dst_offset, dst_pitch; CARD32 blendctl; + int out_reg = FS_OC; IntelEmitInvarientState(pScrn); *pI830->last_3d = LAST_3D_RENDER; @@ -412,6 +406,9 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture, ADVANCE_LP_RING(); } + if (dst_format == COLR_BUF_8BIT) + out_reg = FS_U0; + FS_BEGIN(); /* Declare the registers necessary for our program. I don't think the @@ -432,7 +429,7 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture, if (!pMask) { /* No mask, so move to output color */ - i915_fs_mov(FS_OC, i915_fs_operand_reg(FS_R0)); + i915_fs_mov(out_reg, i915_fs_operand_reg(FS_R0)); } else { /* Load the pMaskPicture texel */ i915_fs_texld(FS_R1, FS_S1, FS_T1); @@ -453,17 +450,20 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture, PICT_FORMAT_RGB(pMaskPicture->format)) { if (i915_blend_op[op].src_alpha) { - i915_fs_mul(FS_OC, i915_fs_operand(FS_R0, W, W, W, W), + i915_fs_mul(out_reg, i915_fs_operand(FS_R0, W, W, W, W), i915_fs_operand_reg(FS_R1)); } else { - i915_fs_mul(FS_OC, i915_fs_operand_reg(FS_R0), + i915_fs_mul(out_reg, i915_fs_operand_reg(FS_R0), i915_fs_operand_reg(FS_R1)); } } else { - i915_fs_mul(FS_OC, i915_fs_operand_reg(FS_R0), + i915_fs_mul(out_reg, i915_fs_operand_reg(FS_R0), i915_fs_operand(FS_R1, W, W, W, W)); } } + if (dst_format == COLR_BUF_8BIT) + i915_fs_mov(FS_OC, i915_fs_operand(out_reg, W, W, W, W)); + FS_END(); return TRUE; |