From b596114b3a9abd7e0e97837edf2bf82270191610 Mon Sep 17 00:00:00 2001
From: Caleb Cornett <[EMAIL REDACTED]>
Date: Sun, 9 Mar 2025 12:46:59 -0400
Subject: [PATCH] Compile fix when DXC is not enabled
---
src/SDL_shadercross.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/SDL_shadercross.c b/src/SDL_shadercross.c
index bd0963b..cb593b4 100644
--- a/src/SDL_shadercross.c
+++ b/src/SDL_shadercross.c
@@ -119,15 +119,6 @@ struct IDxcBlob
IDxcBlobVtbl *lpVtbl;
};
-static int parse_version_number(const char* str)
-{
- unsigned major, minor, patch;
- if (SDL_sscanf(str, "%u.%u.%u", &major, &minor, &patch) == 3) {
- return (major * 10000) + (minor) * 100 + patch;
- }
- return -1;
-}
-
static Uint8 IID_IDxcBlobUtf8[] = {
0xC9, 0x36, 0xA6, 0x3D,
0x71, 0xBA,
@@ -883,6 +874,15 @@ SDL_GPUComputePipeline *SDL_ShaderCross_CompileComputePipelineFromHLSL(
#define SPVC_ERROR(func) \
SDL_SetError(#func " failed: %s", spvc_context_get_last_error_string(context))
+static int parse_version_number(const char* str)
+{
+ unsigned major, minor, patch;
+ if (SDL_sscanf(str, "%u.%u.%u", &major, &minor, &patch) == 3) {
+ return (major * 10000) + (minor) * 100 + patch;
+ }
+ return -1;
+}
+
typedef struct SPIRVTranspileContext {
spvc_context context;
const char *translated_source;