diff options
author | Eric Anholt <eric@anholt.net> | 2006-08-08 15:48:04 -0700 |
---|---|---|
committer | Eric Anholt <anholt@FreeBSD.org> | 2006-08-08 15:48:04 -0700 |
commit | bc5f56568021d8c63313e2b6bf30710e7516c04a (patch) | |
tree | 9ba379b7949a05d726e4f0b17413765b74b7a1ba | |
parent | c3b3d479788fcea7e543f29acf83c85b8b148fbe (diff) |
Intel bug #49: Fix video output at 32bpp by using B8G8R8A8 instead of B8G8R8X8.
While here, don't overallocate video memory for the i965G state.
-rw-r--r-- | src/i830_video.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index 64134dff..940550de 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2960,7 +2960,7 @@ BroadwaterDisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, if (pI830->cpp == 2) { dest_surf_state->ss0.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM; } else { - dest_surf_state->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8X8_UNORM; + dest_surf_state->ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; } dest_surf_state->ss0.writedisable_alpha = 0; dest_surf_state->ss0.writedisable_red = 0; @@ -3628,7 +3628,9 @@ I830PutImage(ScrnInfoPtr pScrn, /* size is multiplied by 2 because we have two buffers that are flipping */ pPriv->linear = I830AllocateMemory(pScrn, pPriv->linear, - extraLinear + (pPriv->doubleBuffer ? size * 2 : size) / pI830->cpp); + (extraLinear + + (pPriv->doubleBuffer ? size * 2 : size)) / + pI830->cpp); if(!pPriv->linear || pPriv->linear->offset < (pScrn->virtualX * pScrn->virtualY)) return BadAlloc; |