diff options
author | Eric Anholt <[email protected]> | 2008-07-15 13:14:18 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-07-15 13:21:37 -0700 |
commit | a5f02368d2a9ab1f814eba2c997729c6c655fc5e (patch) | |
tree | 4a87427efc4c2695dcb72f812c717770add2f469 /src/mesa/drivers/dri/common/spantmp2.h | |
parent | 946abd9b5a55f999ef21f807769f5fb81b10a426 (diff) |
intel-gem: Disable spantmp sse/mmx functions when tile swizzling.
Those functions rely on being able to treat the GET_PTR returned value as an
array indexed by x, but that's not the case for our tiling.
Bug #16387
Diffstat (limited to 'src/mesa/drivers/dri/common/spantmp2.h')
-rw-r--r-- | src/mesa/drivers/dri/common/spantmp2.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h index 53f5f846a0b..5e51112a203 100644 --- a/src/mesa/drivers/dri/common/spantmp2.h +++ b/src/mesa/drivers/dri/common/spantmp2.h @@ -48,6 +48,10 @@ #define HW_WRITE_CLIPLOOP() HW_CLIPLOOP() #endif +/* Whether GET_PTR(x, y) + cpp != GET_PTR(x+1, y) */ +#ifndef GET_PTR_NONLINEAR +#define GET_PTR_NONLINEAR 0 +#endif #if (SPANTMP_PIXEL_FMT == GL_RGB) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5) @@ -389,7 +393,8 @@ static void TAG(ReadRGBASpan)( GLcontext *ctx, } -#if defined(USE_MMX_ASM) && \ +#if !GET_PTR_NONLINEAR && \ + defined(USE_MMX_ASM) && \ (((SPANTMP_PIXEL_FMT == GL_BGRA) && \ (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)) || \ ((SPANTMP_PIXEL_FMT == GL_RGB) && \ @@ -440,7 +445,8 @@ static void TAG2(ReadRGBASpan,_MMX)( GLcontext *ctx, #endif -#if defined(USE_SSE_ASM) && \ +#if !GET_PTR_NONLINEAR && \ + defined(USE_SSE_ASM) && \ (SPANTMP_PIXEL_FMT == GL_BGRA) && \ (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) static void TAG2(ReadRGBASpan,_SSE2)( GLcontext *ctx, @@ -474,7 +480,8 @@ static void TAG2(ReadRGBASpan,_SSE2)( GLcontext *ctx, } #endif -#if defined(USE_SSE_ASM) && \ +#if !GET_PTR_NONLINEAR && \ + defined(USE_SSE_ASM) && \ (SPANTMP_PIXEL_FMT == GL_BGRA) && \ (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) static void TAG2(ReadRGBASpan,_SSE)( GLcontext *ctx, @@ -567,6 +574,7 @@ static void TAG(InitPointers)(struct gl_renderbuffer *rb) rb->PutMonoValues = TAG(WriteMonoRGBAPixels); rb->GetValues = TAG(ReadRGBAPixels); +#if !GET_PTR_NONLINEAR #if defined(USE_SSE_ASM) && \ (SPANTMP_PIXEL_FMT == GL_BGRA) && \ (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) @@ -596,6 +604,7 @@ static void TAG(InitPointers)(struct gl_renderbuffer *rb) } else #endif +#endif /* GET_PTR_NONLINEAR */ { if (DBG) fprintf( stderr, "Using %s version of GetRow\n", "C" ); rb->GetRow = TAG(ReadRGBASpan); @@ -611,5 +620,6 @@ static void TAG(InitPointers)(struct gl_renderbuffer *rb) #undef TAG #undef TAG2 #undef GET_PTR +#undef GET_PTR_NONLINEAR #undef SPANTMP_PIXEL_FMT #undef SPANTMP_PIXEL_TYPE |