Fix -Wundef warnings due to use of unguarded SDL_SSE_INTRINSICS
This commit is contained in:
1 parent
547f53c4ba
commit
9d70a57416
4 files changed
+10
-10
No files matched your search
@@ -181,7 +181,7 @@ static void SDLCALL SDL_TARGETING("sse3") SDL_ConvertStereoToMono_SSE3(SDL_Audio
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
/* Convert from mono to stereo. Duplicate to stereo left and right. */
|
/* Convert from mono to stereo. Duplicate to stereo left and right. */
|
||||||
static void SDLCALL SDL_TARGETING("sse") SDL_ConvertMonoToStereo_SSE(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
static void SDLCALL SDL_TARGETING("sse") SDL_ConvertMonoToStereo_SSE(SDL_AudioCVT *cvt, SDL_AudioFormat format)
|
||||||
{
|
{
|
||||||
@@ -842,7 +842,7 @@ static int SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
|
|||||||
}
|
}
|
||||||
} else if (channel_converter == SDL_ConvertMonoToStereo) {
|
} else if (channel_converter == SDL_ConvertMonoToStereo) {
|
||||||
SDL_AudioFilter filter = NULL;
|
SDL_AudioFilter filter = NULL;
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
if (!filter && SDL_HasSSE()) {
|
if (!filter && SDL_HasSSE()) {
|
||||||
filter = SDL_ConvertMonoToStereo_SSE;
|
filter = SDL_ConvertMonoToStereo_SSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include "SDL_blit.h"
|
#include "SDL_blit.h"
|
||||||
#include "SDL_blit_copy.h"
|
#include "SDL_blit_copy.h"
|
||||||
|
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
/* This assumes 16-byte aligned src and dst */
|
/* This assumes 16-byte aligned src and dst */
|
||||||
static SDL_INLINE void SDL_TARGETING("sse") SDL_memcpySSE(Uint8 *dst, const Uint8 *src, int len)
|
static SDL_INLINE void SDL_TARGETING("sse") SDL_memcpySSE(Uint8 *dst, const Uint8 *src, int len)
|
||||||
{
|
{
|
||||||
@@ -136,7 +136,7 @@ void SDL_BlitCopy(SDL_BlitInfo *info)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
if (SDL_HasSSE() &&
|
if (SDL_HasSSE() &&
|
||||||
!((uintptr_t)src & 15) && !(srcskip & 15) &&
|
!((uintptr_t)src & 15) && !(srcskip & 15) &&
|
||||||
!((uintptr_t)dst & 15) && !(dstskip & 15)) {
|
!((uintptr_t)dst & 15) && !(dstskip & 15)) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "SDL_blit.h"
|
#include "SDL_blit.h"
|
||||||
|
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
/* *INDENT-OFF* */ /* clang-format off */
|
/* *INDENT-OFF* */ /* clang-format off */
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(__clang__)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
@@ -376,7 +376,7 @@ int SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
|||||||
{
|
{
|
||||||
color |= (color << 8);
|
color |= (color << 8);
|
||||||
color |= (color << 16);
|
color |= (color << 16);
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
if (SDL_HasSSE()) {
|
if (SDL_HasSSE()) {
|
||||||
fill_function = SDL_FillSurfaceRect1SSE;
|
fill_function = SDL_FillSurfaceRect1SSE;
|
||||||
break;
|
break;
|
||||||
@@ -389,7 +389,7 @@ int SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
color |= (color << 16);
|
color |= (color << 16);
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
if (SDL_HasSSE()) {
|
if (SDL_HasSSE()) {
|
||||||
fill_function = SDL_FillSurfaceRect2SSE;
|
fill_function = SDL_FillSurfaceRect2SSE;
|
||||||
break;
|
break;
|
||||||
@@ -408,7 +408,7 @@ int SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
|||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
if (SDL_HasSSE()) {
|
if (SDL_HasSSE()) {
|
||||||
fill_function = SDL_FillSurfaceRect4SSE;
|
fill_function = SDL_FillSurfaceRect4SSE;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ SDL_TARGETING("mmx") static void kernel_ints_add_mmx(Sint32 *dest, const Sint32
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
SDL_TARGETING("sse") static void kernel_floats_add_sse(float *dest, const float *a, const float *b, size_t size) {
|
SDL_TARGETING("sse") static void kernel_floats_add_sse(float *dest, const float *a, const float *b, size_t size) {
|
||||||
for (; size >= 4; size -= 4, dest += 4, a += 4, b += 4) {
|
for (; size >= 4; size -= 4, dest += 4, a += 4, b += 4) {
|
||||||
_mm_storeu_ps(dest, _mm_add_ps(_mm_loadu_ps(a), _mm_loadu_ps (b)));
|
_mm_storeu_ps(dest, _mm_add_ps(_mm_loadu_ps(a), _mm_loadu_ps (b)));
|
||||||
@@ -392,7 +392,7 @@ static int intrinsics_testSSE(void *arg)
|
|||||||
{
|
{
|
||||||
if (SDL_HasSSE()) {
|
if (SDL_HasSSE()) {
|
||||||
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE support.");
|
SDLTest_AssertCheck(SDL_TRUE, "CPU of test machine has SSE support.");
|
||||||
#if SDL_SSE_INTRINSICS
|
#if defined(SDL_SSE_INTRINSICS)
|
||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
float *dest, *a, *b;
|
float *dest, *a, *b;
|
||||||
|
|||||||
Reference in new issue
Block a user