diff options
author | Ian Romanick <[email protected]> | 2004-10-16 00:03:27 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-10-16 00:03:27 +0000 |
commit | 1aa37f97c484dbe62bfd8b27ed6d9b0c744a2b35 (patch) | |
tree | 863e66e59aab0f4f43acf28c3502c4a59c0348e4 /src/mesa/drivers/dri/common | |
parent | 12b53f207919bd02506bd3b337ab501ee2c8092b (diff) |
Only build the MMX/SSE/SSE2 versions for ReadRGBASpan when the pixel format
matches what they optimized versions actually expect.
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/spantmp2.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h index 01d7fea0c52..6bdbe150c3b 100644 --- a/src/mesa/drivers/dri/common/spantmp2.h +++ b/src/mesa/drivers/dri/common/spantmp2.h @@ -366,7 +366,9 @@ static void TAG(ReadRGBASpan)( const GLcontext *ctx, } -#if defined(USE_MMX_ASM) +#if defined(USE_MMX_ASM) && \ + (SPANTMP_PIXEL_FMT == GL_BGRA) && \ + (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) static void TAG2(ReadRGBASpan,_MMX)( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4]) @@ -407,7 +409,9 @@ static void TAG2(ReadRGBASpan,_MMX)( const GLcontext *ctx, #endif -#if defined(USE_SSE_ASM) +#if 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)( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4]) @@ -437,7 +441,9 @@ static void TAG2(ReadRGBASpan,_SSE2)( const GLcontext *ctx, } #endif -#if defined(USE_SSE_ASM) +#if 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)( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4]) @@ -523,6 +529,8 @@ static void TAG(InitPointers)(struct swrast_device_driver *swdd) swdd->WriteMonoRGBAPixels = TAG(WriteMonoRGBAPixels); swdd->ReadRGBAPixels = TAG(ReadRGBAPixels); +#if (SPANTMP_PIXEL_FMT == GL_BGRA) && \ + (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) #if defined(USE_SSE_ASM) if ( cpu_has_xmm2 ) { if (DBG) fprintf( stderr, "Using %s version of ReadRGBASpan\n", "SSE2" ); @@ -544,6 +552,7 @@ static void TAG(InitPointers)(struct swrast_device_driver *swdd) } else #endif +#endif { if (DBG) fprintf( stderr, "Using %s version of ReadRGBASpan\n", "C" ); swdd->ReadRGBASpan = TAG(ReadRGBASpan); |