src/video/SDL_blit_N.c
changeset 739 22dbf364c017
parent 431 41cadcba32e8
child 769 b8d311d90021
     1.1 --- a/src/video/SDL_blit_N.c	Fri Nov 14 20:21:22 2003 +0000
     1.2 +++ b/src/video/SDL_blit_N.c	Tue Nov 18 01:27:06 2003 +0000
     1.3 @@ -31,14 +31,7 @@
     1.4  #include "SDL_video.h"
     1.5  #include "SDL_blit.h"
     1.6  #include "SDL_byteorder.h"
     1.7 -
     1.8 -/* Function to check the CPU flags */
     1.9 -#define MMX_CPU		0x800000
    1.10 -#ifdef USE_ASMBLIT
    1.11 -#define CPU_Flags()	Hermes_X86_CPU()
    1.12 -#else
    1.13 -#define CPU_Flags()	0L
    1.14 -#endif
    1.15 +#include "SDL_cpuinfo.h"
    1.16  
    1.17  /* Functions to blit from N-bit surfaces to other surfaces */
    1.18  
    1.19 @@ -1429,7 +1422,7 @@
    1.20  	Uint32 srcR, srcG, srcB;
    1.21  	int dstbpp;
    1.22  	Uint32 dstR, dstG, dstB;
    1.23 -	Uint32 cpu_flags;
    1.24 +	SDL_bool cpu_mmx;
    1.25  	void *aux_data;
    1.26  	SDL_loblit blitfunc;
    1.27          enum { NO_ALPHA, SET_ALPHA, COPY_ALPHA } alpha;
    1.28 @@ -1466,19 +1459,19 @@
    1.29  static const struct blit_table normal_blit_4[] = {
    1.30  #ifdef USE_ASMBLIT
    1.31      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000F800,0x000007E0,0x0000001F,
    1.32 -      MMX_CPU, ConvertMMXpII32_16RGB565, ConvertMMX, NO_ALPHA },
    1.33 +      1, ConvertMMXpII32_16RGB565, ConvertMMX, NO_ALPHA },
    1.34      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000F800,0x000007E0,0x0000001F,
    1.35        0, ConvertX86p32_16RGB565, ConvertX86, NO_ALPHA },
    1.36      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000007E0,0x0000F800,
    1.37 -      MMX_CPU, ConvertMMXpII32_16BGR565, ConvertMMX, NO_ALPHA },
    1.38 +      1, ConvertMMXpII32_16BGR565, ConvertMMX, NO_ALPHA },
    1.39      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000007E0,0x0000F800,
    1.40        0, ConvertX86p32_16BGR565, ConvertX86, NO_ALPHA },
    1.41      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x00007C00,0x000003E0,0x0000001F,
    1.42 -      MMX_CPU, ConvertMMXpII32_16RGB555, ConvertMMX, NO_ALPHA },
    1.43 +      1, ConvertMMXpII32_16RGB555, ConvertMMX, NO_ALPHA },
    1.44      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x00007C00,0x000003E0,0x0000001F,
    1.45        0, ConvertX86p32_16RGB555, ConvertX86, NO_ALPHA },
    1.46      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000003E0,0x00007C00,
    1.47 -      MMX_CPU, ConvertMMXpII32_16BGR555, ConvertMMX, NO_ALPHA },
    1.48 +      1, ConvertMMXpII32_16BGR555, ConvertMMX, NO_ALPHA },
    1.49      { 0x00FF0000,0x0000FF00,0x000000FF, 2, 0x0000001F,0x000003E0,0x00007C00,
    1.50        0, ConvertX86p32_16BGR555, ConvertX86, NO_ALPHA },
    1.51      { 0x00FF0000,0x0000FF00,0x000000FF, 3, 0x00FF0000,0x0000FF00,0x000000FF,
    1.52 @@ -1581,8 +1574,7 @@
    1.53  			     dstfmt->Gmask == table[which].dstG &&
    1.54  			     dstfmt->Bmask == table[which].dstB &&
    1.55  			     (a_need & table[which].alpha) == a_need &&
    1.56 -			     (CPU_Flags()&table[which].cpu_flags) ==
    1.57 -			     table[which].cpu_flags )
    1.58 +			     (table[which].cpu_mmx == SDL_HasMMX())) 
    1.59  				break;
    1.60  		}
    1.61  		sdata->aux_data = table[which].aux_data;