SDL: Temporarily disabled texture binding validation (840d5)

From 840d5c16d2305f5b65a0f4b37faeaecd00dcbe12 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 8 Oct 2025 19:50:48 -0700
Subject: [PATCH] Temporarily disabled texture binding validation

There are some advanced use cases that trip over this, so temporarily disabling the validation pending further review.

Reference: https://github.com/libsdl-org/SDL/issues/13871
(cherry picked from commit a2a60f75c7be4c0b67ff19bfc733f54ed4059ad4)
---
 src/gpu/SDL_gpu.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/gpu/SDL_gpu.c b/src/gpu/SDL_gpu.c
index d21d863bb8d3e..bfdd94ba5e0eb 100644
--- a/src/gpu/SDL_gpu.c
+++ b/src/gpu/SDL_gpu.c
@@ -61,6 +61,10 @@
         return;                                              \
     }
 
+#if 0
+// The below validation is too aggressive, since there are advanced situations 
+// where this is legal. This is being temporarily disabled for further review.
+// See: https://github.com/libsdl-org/SDL/issues/13871
 #define CHECK_SAMPLER_TEXTURES                                                                                                          \
     RenderPass *rp = (RenderPass *)render_pass;                                                                                         \
     for (Uint32 color_target_index = 0; color_target_index < rp->num_color_targets; color_target_index += 1) {                          \
@@ -92,6 +96,10 @@
             SDL_assert_release(!"Texture cannot be simultaneously bound as a depth stencil target and a storage texture!"); \
         }                                                                                                                   \
     }
+#else
+#define CHECK_SAMPLER_TEXTURES
+#define CHECK_STORAGE_TEXTURES
+#endif
 
 #define CHECK_GRAPHICS_PIPELINE_BOUND                                                   \
     if (!((RenderPass *)render_pass)->graphics_pipeline) { \