From 4e8845fc0c4327acc657e5888085ae2d21d5c74d Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sat, 25 Feb 2006 15:33:48 +0000 Subject: [PATCH] a few missed cases where blits can't do read/drawpixels --- src/mesa/drivers/dri/i915/intel_pixel.c | 7 ++++++- src/mesa/drivers/dri/i915/intel_pixel_read.c | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i915/intel_pixel.c b/src/mesa/drivers/dri/i915/intel_pixel.c index 0ad78353956..06216596680 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel.c +++ b/src/mesa/drivers/dri/i915/intel_pixel.c @@ -26,6 +26,7 @@ **************************************************************************/ #include "enums.h" +#include "state.h" #include "swrast/swrast.h" #include "intel_context.h" @@ -35,7 +36,11 @@ GLboolean intel_check_blit_fragment_ops( const GLcontext *ctx ) { - return !(ctx->Color.AlphaEnabled || + if (ctx->NewState) + _mesa_update_state(ctx); + + return !(ctx->_ImageTransferState || + ctx->Color.AlphaEnabled || ctx->Depth.Test || ctx->Fog.Enabled || ctx->Scissor.Enabled || diff --git a/src/mesa/drivers/dri/i915/intel_pixel_read.c b/src/mesa/drivers/dri/i915/intel_pixel_read.c index 7f385c8dc29..6da0b1d6edb 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel_read.c +++ b/src/mesa/drivers/dri/i915/intel_pixel_read.c @@ -183,12 +183,13 @@ static GLboolean do_blit_readpixels( GLcontext *ctx, } - if (!intel_check_blit_format(src, format, type)) { + if (ctx->_ImageTransferState || + !intel_check_blit_format(src, format, type)) { _mesa_printf("%s - bad format for blit\n", __FUNCTION__); return GL_FALSE; } - if (pack->SwapBytes || pack->LsbFirst) { + if (pack->Alignment != 1 || pack->SwapBytes || pack->LsbFirst) { _mesa_printf("%s: bad packing params\n", __FUNCTION__); return GL_FALSE; }