include/SDL_cpuinfo.h
author Sam Lantinga <slouken@libsdl.org>
Wed, 12 Jan 2011 15:42:26 -0800
changeset 4986 8431f59485d0
parent 3697 f7b03b6838cb
child 5115 427998ff3bcf
permissions -rw-r--r--
Renderer didn't advertise texture format SDL_PIXELFORMAT_ABGR8888
slouken@739
     1
/*
slouken@739
     2
    SDL - Simple DirectMedia Layer
slouken@3697
     3
    Copyright (C) 1997-2010 Sam Lantinga
slouken@739
     4
slouken@739
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@739
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@739
     9
slouken@739
    10
    This library is distributed in the hope that it will be useful,
slouken@739
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@739
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@739
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@739
    18
slouken@739
    19
    Sam Lantinga
slouken@739
    20
    slouken@libsdl.org
slouken@739
    21
*/
slouken@739
    22
slouken@1895
    23
/**
slouken@3407
    24
 *  \file SDL_cpuinfo.h
slouken@3407
    25
 *  
slouken@3407
    26
 *  CPU feature detection for SDL.
slouken@1895
    27
 */
slouken@739
    28
slouken@739
    29
#ifndef _SDL_cpuinfo_h
slouken@739
    30
#define _SDL_cpuinfo_h
slouken@739
    31
slouken@1402
    32
#include "SDL_stdinc.h"
slouken@1402
    33
slouken@739
    34
#include "begin_code.h"
slouken@739
    35
/* Set up for C function definitions, even when using C++ */
slouken@739
    36
#ifdef __cplusplus
slouken@1895
    37
/* *INDENT-OFF* */
slouken@739
    38
extern "C" {
slouken@1895
    39
/* *INDENT-ON* */
slouken@739
    40
#endif
slouken@739
    41
slouken@3407
    42
/**
slouken@3579
    43
 *  This function returns the number of CPU cores available.
slouken@3579
    44
 */
slouken@3579
    45
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
slouken@3579
    46
slouken@3579
    47
/**
slouken@3407
    48
 *  This function returns true if the CPU has the RDTSC instruction.
slouken@745
    49
 */
slouken@1426
    50
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
slouken@745
    51
slouken@3407
    52
/**
slouken@3407
    53
 *  This function returns true if the CPU has MMX features.
slouken@739
    54
 */
slouken@1426
    55
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
slouken@739
    56
slouken@3407
    57
/**
slouken@3407
    58
 *  This function returns true if the CPU has MMX Ext.\ features.
slouken@785
    59
 */
slouken@1426
    60
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
slouken@785
    61
slouken@3407
    62
/**
slouken@3407
    63
 *  This function returns true if the CPU has 3DNow!\ features.
slouken@739
    64
 */
slouken@1426
    65
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
slouken@739
    66
slouken@3407
    67
/**
slouken@3407
    68
 *  This function returns true if the CPU has 3DNow!\ Ext.\ features.
slouken@785
    69
 */
slouken@1426
    70
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
slouken@785
    71
slouken@3407
    72
/**
slouken@3407
    73
 *  This function returns true if the CPU has SSE features.
slouken@739
    74
 */
slouken@1426
    75
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
slouken@739
    76
slouken@3407
    77
/**
slouken@3407
    78
 *  This function returns true if the CPU has SSE2 features.
slouken@785
    79
 */
slouken@1426
    80
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
slouken@785
    81
slouken@3407
    82
/**
slouken@3407
    83
 *  This function returns true if the CPU has AltiVec features.
slouken@778
    84
 */
slouken@1426
    85
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
slouken@778
    86
slouken@739
    87
/* Ends C function definitions when using C++ */
slouken@739
    88
#ifdef __cplusplus
slouken@1895
    89
/* *INDENT-OFF* */
slouken@739
    90
}
slouken@1895
    91
/* *INDENT-ON* */
slouken@739
    92
#endif
slouken@739
    93
#include "close_code.h"
slouken@739
    94
slouken@739
    95
#endif /* _SDL_cpuinfo_h */
slouken@1895
    96
slouken@1895
    97
/* vi: set ts=4 sw=4 expandtab: */