SDL: Use the hlsli extension for shader includes

From 1e0bac288bcf53ee368dad510479e42320e87382 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 5 Mar 2024 12:46:44 -0800
Subject: [PATCH] Use the hlsli extension for shader includes

---
 src/render/direct3d11/D3D11_PixelShader_Advanced.hlsl          | 2 +-
 src/render/direct3d11/D3D11_PixelShader_Colors.hlsl            | 2 +-
 ..._PixelShader_Common.incl => D3D11_PixelShader_Common.hlsli} | 0
 src/render/direct3d11/D3D11_PixelShader_Textures.hlsl          | 2 +-
 src/render/direct3d11/SDL_render_d3d11.c                       | 2 +-
 src/render/vulkan/SDL_render_vulkan.c                          | 2 +-
 src/render/vulkan/VULKAN_PixelShader_Advanced.hlsl             | 3 ++-
 src/render/vulkan/VULKAN_PixelShader_Colors.hlsl               | 2 +-
 ...PixelShader_Common.incl => VULKAN_PixelShader_Common.hlsli} | 0
 src/render/vulkan/VULKAN_PixelShader_Textures.hlsl             | 3 ++-
 10 files changed, 10 insertions(+), 8 deletions(-)
 rename src/render/direct3d11/{D3D11_PixelShader_Common.incl => D3D11_PixelShader_Common.hlsli} (100%)
 rename src/render/vulkan/{VULKAN_PixelShader_Common.incl => VULKAN_PixelShader_Common.hlsli} (100%)

diff --git a/src/render/direct3d11/D3D11_PixelShader_Advanced.hlsl b/src/render/direct3d11/D3D11_PixelShader_Advanced.hlsl
index 39dda47bca849..aad7b77a112e0 100644
--- a/src/render/direct3d11/D3D11_PixelShader_Advanced.hlsl
+++ b/src/render/direct3d11/D3D11_PixelShader_Advanced.hlsl
@@ -1,5 +1,5 @@
 
-#include "D3D11_PixelShader_Common.incl"
+#include "D3D11_PixelShader_Common.hlsli"
 
 float4 main(PixelShaderInput input) : SV_TARGET
 {
diff --git a/src/render/direct3d11/D3D11_PixelShader_Colors.hlsl b/src/render/direct3d11/D3D11_PixelShader_Colors.hlsl
index b8a26e9177327..5757491b31db0 100644
--- a/src/render/direct3d11/D3D11_PixelShader_Colors.hlsl
+++ b/src/render/direct3d11/D3D11_PixelShader_Colors.hlsl
@@ -1,5 +1,5 @@
 
-#include "D3D11_PixelShader_Common.incl"
+#include "D3D11_PixelShader_Common.hlsli"
 
 float4 main(PixelShaderInput input) : SV_TARGET
 {
diff --git a/src/render/direct3d11/D3D11_PixelShader_Common.incl b/src/render/direct3d11/D3D11_PixelShader_Common.hlsli
similarity index 100%
rename from src/render/direct3d11/D3D11_PixelShader_Common.incl
rename to src/render/direct3d11/D3D11_PixelShader_Common.hlsli
diff --git a/src/render/direct3d11/D3D11_PixelShader_Textures.hlsl b/src/render/direct3d11/D3D11_PixelShader_Textures.hlsl
index fd8ae345036a6..f2ecf18a8a138 100644
--- a/src/render/direct3d11/D3D11_PixelShader_Textures.hlsl
+++ b/src/render/direct3d11/D3D11_PixelShader_Textures.hlsl
@@ -1,7 +1,7 @@
 Texture2D theTexture : register(t0);
 SamplerState theSampler : register(s0);
 
-#include "D3D11_PixelShader_Common.incl"
+#include "D3D11_PixelShader_Common.hlsli"
 
 float4 main(PixelShaderInput input) : SV_TARGET
 {
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index cef5c816a4371..7297e632e5b3f 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -75,7 +75,7 @@ typedef struct
     Float4X4 projectionAndView;
 } VertexShaderConstants;
 
-/* These should mirror the definitions in D3D11_PixelShader_Common.incl */
+/* These should mirror the definitions in D3D11_PixelShader_Common.hlsli */
 //static const float TONEMAP_NONE = 0;
 //static const float TONEMAP_LINEAR = 1;
 static const float TONEMAP_CHROME = 2;
diff --git a/src/render/vulkan/SDL_render_vulkan.c b/src/render/vulkan/SDL_render_vulkan.c
index 7f9490b7bb0d9..08b5c7dc6f068 100644
--- a/src/render/vulkan/SDL_render_vulkan.c
+++ b/src/render/vulkan/SDL_render_vulkan.c
@@ -171,7 +171,7 @@ typedef struct
     Float4X4 projectionAndView;
 } VertexShaderConstants;
 
-/* These should mirror the definitions in VULKAN_PixelShader_Common.incl */
+/* These should mirror the definitions in VULKAN_PixelShader_Common.hlsli */
 //static const float TONEMAP_NONE = 0;
 //static const float TONEMAP_LINEAR = 1;
 static const float TONEMAP_CHROME = 2;
diff --git a/src/render/vulkan/VULKAN_PixelShader_Advanced.hlsl b/src/render/vulkan/VULKAN_PixelShader_Advanced.hlsl
index 6269d0b5b2858..f3a0a61337974 100644
--- a/src/render/vulkan/VULKAN_PixelShader_Advanced.hlsl
+++ b/src/render/vulkan/VULKAN_PixelShader_Advanced.hlsl
@@ -1,4 +1,5 @@
-#include "VULKAN_PixelShader_Common.incl"
+
+#include "VULKAN_PixelShader_Common.hlsli"
 
 float4 main(PixelShaderInput input) : SV_TARGET
 {
diff --git a/src/render/vulkan/VULKAN_PixelShader_Colors.hlsl b/src/render/vulkan/VULKAN_PixelShader_Colors.hlsl
index e84234859c773..b754dde105943 100644
--- a/src/render/vulkan/VULKAN_PixelShader_Colors.hlsl
+++ b/src/render/vulkan/VULKAN_PixelShader_Colors.hlsl
@@ -1,5 +1,5 @@
 
-#include "VULKAN_PixelShader_Common.incl"
+#include "VULKAN_PixelShader_Common.hlsli"
 
 float4 main(PixelShaderInput input) : SV_TARGET0
 {
diff --git a/src/render/vulkan/VULKAN_PixelShader_Common.incl b/src/render/vulkan/VULKAN_PixelShader_Common.hlsli
similarity index 100%
rename from src/render/vulkan/VULKAN_PixelShader_Common.incl
rename to src/render/vulkan/VULKAN_PixelShader_Common.hlsli
diff --git a/src/render/vulkan/VULKAN_PixelShader_Textures.hlsl b/src/render/vulkan/VULKAN_PixelShader_Textures.hlsl
index c48aee7c03a7e..e665291bc3f12 100644
--- a/src/render/vulkan/VULKAN_PixelShader_Textures.hlsl
+++ b/src/render/vulkan/VULKAN_PixelShader_Textures.hlsl
@@ -1,4 +1,5 @@
-#include "VULKAN_PixelShader_Common.incl"
+
+#include "VULKAN_PixelShader_Common.hlsli"
 
 float4 main(PixelShaderInput input) : SV_TARGET
 {