# SDL: Remove debug print utility functions

**URL:** <https://discourse.libsdl.org/t/sdl-remove-debug-print-utility-functions/69280>\
**Category:** SDL Commits\
**Created:** [September 10, 2026, 9:43pm UTC](https://discourse.libsdl.org/t/sdl-remove-debug-print-utility-functions/69280 "2026-09-10T21:43:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [September 10, 2026, 9:43pm UTC](https://discourse.libsdl.org/t/sdl-remove-debug-print-utility-functions/69280/1 "2026-09-10T21:43:49Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/a50e8a698549954fd8006a68b92e52a1d22638c6>

```diff
From a50e8a698549954fd8006a68b92e52a1d22638c6 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 10 Sep 2026 20:10:08 +0200
Subject: [PATCH] Remove debug print utility functions

---
 src/video/SDL_stretch.c | 18 ------
 src/video/arm/SDL_sve2_util.h | 113 +---------------------------------
 2 files changed, 1 insertion(+), 130 deletions(-)

diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c
index 1de329b943a63..9c7938346feaf 100644
--- a/src/video/SDL_stretch.c
+++ b/src/video/SDL_stretch.c
@@ -285,15 +285,6 @@ typedef struct color_t
     Uint8 d;
 } color_t;
 
-#if 0
-static void printf_64(const char *str, void *var)
-{
- uint8_t *val = (uint8_t *)var;
- printf(" * %s: %02x %02x %02x %02x _ %02x %02x %02x %02x\n",
- str, val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]);
-}
-#endif
-
 /* Interpolated == x0 + frac * (x1 - x0) == x0 * (1 - frac) + x1 * frac */
 
 static SDL_INLINE void INTERPOL(const Uint32 *src_x0, const Uint32 *src_x1, int frac0, int frac1, Uint32 *dst)
@@ -377,15 +368,6 @@ static bool scale_mat(const Uint32 *src, int src_w, int src_h, int src_pitch, Ui
 
 #ifdef SDL_SSE2_INTRINSICS
 
-#if 0
-static void SDL_TARGETING("sse2") printf_128(const char *str, __m128i var)
-{
- uint16_t *val = (uint16_t *)&var;
- printf(" * %s: %04x %04x %04x %04x _ %04x %04x %04x %04x\n",
- str, val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]);
-}
-#endif
-
 static SDL_INLINE int hasSSE2(void)
 {
     static int val = -1;
diff --git a/src/video/arm/SDL_sve2_util.h b/src/video/arm/SDL_sve2_util.h
index 2a1602b43230d..267046d2a2d13 100644
--- a/src/video/arm/SDL_sve2_util.h
+++ b/src/video/arm/SDL_sve2_util.h
@@ -92,115 +92,4 @@
 
 #define SVE_SAFE_NAME(ma_NAME) SVE_CONNECT3(ma_, ma_NAME, ma_LINEma_)
 
-/* ---------------------------------------------------------------------------*
- * SVE Test Helper *
- * ---------------------------------------------------------------------------*/
-
-#define SVT_PRINT_VECTOR(ma_VECOTOR, ma_ELEMENT_T, ma_FORMAT_STRING) \
- do { \
- int_fast8_t nElementCount = svcntb_pat(SV_ALL) / sizeof(ma_ELEMENT_T); \
- uint8_t SVE_SAFE_NAME(chVectorBuffer) \
- [nElementCount * sizeof(ma_ELEMENT_T)]; \
- \
- svst1_u8(svptrue_b8(), \
- SVE_SAFE_NAME(chVectorBuffer), \
- svreinterpret_u8(ma_VECOTOR)); \
- \
- ma_ELEMENT_T *pElement = (ma_ELEMENT_T *)SVE_SAFE_NAME(chVectorBuffer); \
- printf("%s\t[", #ma_VECOTOR); \
- do { \
- printf(ma_FORMAT_STRING "\t", (int)*pElement++); \
- } while (--nElementCount); \
- printf("]\r\n"); \
- } while (0)
-
-#define SVT_INIT_VECOTR(ma_VECTOR, ma_ELEMENT_T, ...) \
- do { \
- uint8_t SVE_SAFE_NAME(chVectorBuffer)[svcntb_pat(SV_ALL)]; \
- \
- memset(SVE_SAFE_NAME(chVectorBuffer), /* This should NOT be SDL_memset() */ \
- 0, \
- sizeof(SVE_SAFE_NAME(chVectorBuffer))); \
- memcpy(SVE_SAFE_NAME(chVectorBuffer), /* This should NOT be SDL_memcpy() */ \
- (ma_ELEMENT_T[]){ __VA_ARGS__ }, \
- MIN(sizeof(SVE_SAFE_NAME(chVectorBuffer)), \
- sizeof((ma_ELEMENT_T[]){ __VA_ARGS__ }))); \
- \
- ma_VECTOR = svld1(svptrue_b8(), \
- (ma_ELEMENT_T *)SVE_SAFE_NAME(chVectorBuffer)); \
- } while (0)
-
-#define SVT_INIT_PRED(ma_PREDICT, ...) \
- do { \
- uint8_t SVE_SAFE_NAME(chBuffer)[svlen(svundef_u64())]; \
- memset(SVE_SAFE_NAME(chBuffer), /* This should NOT be SDL_memset() */ \
- 0, \
- sizeof(SVE_SAFE_NAME(chBuffer))); \
- \
- memcpy(SVE_SAFE_NAME(chBuffer), /* This should NOT be SDL_memcpy() */ \
- (uint8_t[]){ __VA_ARGS__ }, \
- MIN(sizeof(SVE_SAFE_NAME(chBuffer)), \
- sizeof((uint8_t[]){ __VA_ARGS__ }))); \
- \
- ma_PREDICT = (*(svbool_t *)SVE_SAFE_NAME(chBuffer)); \
- } while (0)
-
-#define SVT_PRINT_PRED(ma_PREDICT, ma_TYPE_T) \
- do { \
- printf("%8s\t[", #ma_PREDICT); \
- uint16_t SVE_SAFE_NAME(hwBuffer)[svlen(svundef_u64()) / 2]; \
- memset(SVE_SAFE_NAME(hwBuffer), /* This should NOT be SDL_memset() */ \
- 0, \
- sizeof(SVE_SAFE_NAME(hwBuffer))); \
- *(volatile svbool_t *)SVE_SAFE_NAME(hwBuffer) = (ma_PREDICT); \
- \
- uint_fast16_t SVE_SAFE_NAME(nTotalBits) = svlen(svundef_u8()); \
- uint_fast8_t SVE_SAFE_NAME(nElementBits) = sizeof(ma_TYPE_T); \
- \
- uint16_t *phwPred = SVE_SAFE_NAME(hwBuffer); \
- do { \
- uint16_t hwPred = *phwPred++; \
- \
- for (uint_fast8_t n = 0; \
- n < 16; \
- n += SVE_SAFE_NAME(nElementBits)) { \
- \
- if (hwPred & 0x01) { \
- printf("True "); \
- } else { \
- printf("False"); \
- } \
- printf("%*s\t", (int)sizeof(ma_TYPE_T) - 1, ""); \
- hwPred >>= SVE_SAFE_NAME(nElementBits); \
- } \
- \
- SVE_SAFE_NAME(nTotalBits) -= 16; \
- } while (SVE_SAFE_NAME(nTotalBits)); \
- \
- printf("]\r\n"); \
- } while (0)
-
-#define SVT_PRINT_BUFFER(ma_BUFF_PTR, ma_SIZE, ma_TYPE_T, ma_FMT_STR, ma_STRIDE) \
- do { \
- ma_TYPE_T *pBuffer = (ma_TYPE_T *)ma_BUFF_PTR; \
- size_t nElementCount = (ma_SIZE) / sizeof(ma_TYPE_T); \
- \
- size_t nStrideSize = (ma_STRIDE); \
- size_t nLineCount = 0; \
- \
- printf("%s\n\t", #ma_BUFF_PTR); \
- do { \
- \
- printf(ma_FMT_STR " ", *pBuffer++); \
- nLineCount++; \
- if (nLineCount >= nStrideSize) { \
- nLineCount = 0; \
- printf("\n\t"); \
- } \
- \
- } while (--nElementCount); \
- printf("\n"); \
- \
- } while (0)
-
-#endif /* SDL_SVE2_UTIL_H */
\ No newline at end of file
+#endif /* SDL_SVE2_UTIL_H */

```
