From 41c3d23b2339c18d46596437c4ef7f4081bd5b7b Mon Sep 17 00:00:00 2001 From: Laura Hermanns Date: Sun, 22 Sep 2024 13:27:41 -0400 Subject: [PATCH] [Testbed] Moved all test shaders into separate folders. --- .../ClearScreen.330core.frag | 0 .../ClearScreen.330core.vert | 0 .../ClearScreen.450core.frag | 0 .../ClearScreen.450core.frag.spv | Bin .../ClearScreen.450core.vert | 0 .../ClearScreen.450core.vert.spv | Bin .../{ => ClearScreen}/ClearScreen.hlsl | 0 .../{ => ClearScreen}/ClearScreen.metal | 0 .../Shaders/CompileAllGlslShadersToSpirv.bat | 42 ++--- .../DualSourceBlending.420core.frag | 0 .../DualSourceBlending.420core.vert | 0 .../DualSourceBlending.450core.frag | 0 .../DualSourceBlending.450core.frag.spv | Bin .../DualSourceBlending.450core.vert | 0 .../DualSourceBlending.450core.vert.spv | Bin .../DualSourceBlending.hlsl | 0 .../DualSourceBlending.metal | 0 .../DynamicTriangleMesh.330core.frag | 0 .../DynamicTriangleMesh.330core.vert | 0 .../DynamicTriangleMesh.450core.frag | 0 .../DynamicTriangleMesh.450core.frag.spv | Bin .../DynamicTriangleMesh.450core.vert | 0 .../DynamicTriangleMesh.450core.vert.spv | Bin .../DynamicTriangleMesh.hlsl | 0 .../DynamicTriangleMesh.metal | 0 .../ResourceArrays.450core.frag | 0 .../ResourceArrays.450core.frag.spv | Bin .../ResourceArrays.450core.vert | 0 .../ResourceArrays.450core.vert.spv | Bin .../{ => ResourceArrays}/ResourceArrays.hlsl | 0 .../ResourceBinding.450core.comp | 0 .../ResourceBinding.450core.comp.spv | Bin .../ResourceBinding.450core.frag | 0 .../ResourceBinding.450core.frag.spv | Bin .../ResourceBinding.450core.vert | 0 .../ResourceBinding.450core.vert.spv | Bin .../ResourceBinding.hlsl | 0 .../SemanticErrors.CSMain.450core.comp | 0 .../SemanticErrors.CSMain.hlsl | 0 .../SemanticErrors.CSMain.metal | 0 .../SemanticErrors.PSMain.450core.frag | 0 .../SemanticErrors.PSMain.450core.frag.spv | Bin .../SemanticErrors.PSMain.hlsl | 0 .../SemanticErrors.PSMain.metal | 0 .../SemanticErrors.VSMain.450core.vert | 0 .../SemanticErrors.VSMain.hlsl | 0 .../SemanticErrors.VSMain.metal | 0 .../ShadowMapping.PScene.330core.frag | 0 .../ShadowMapping.PScene.450core.frag | 0 .../ShadowMapping.PScene.450core.frag.spv | Bin .../ShadowMapping.VScene.330core.vert | 0 .../ShadowMapping.VScene.450core.vert | 0 .../ShadowMapping.VScene.450core.vert.spv | Bin .../ShadowMapping.VShadow.330core.vert | 0 .../ShadowMapping.VShadow.450core.vert | 0 .../ShadowMapping.VShadow.450core.vert.spv | Bin .../{ => ShadowMapping}/ShadowMapping.hlsl | 0 .../{ => ShadowMapping}/ShadowMapping.metal | 0 .../TriangleMesh.330core.frag | 0 .../TriangleMesh.330core.vert | 0 .../TriangleMesh.450core.frag | 0 .../TriangleMesh.450core.frag.spv | Bin .../TriangleMesh.450core.vert | 0 .../TriangleMesh.450core.vert.spv | Bin .../TriangleMesh.Textured.450core.frag.spv | Bin .../TriangleMesh.Textured.450core.vert.spv | Bin .../{ => TriangleMesh}/TriangleMesh.hlsl | 0 .../{ => TriangleMesh}/TriangleMesh.metal | 0 .../UnprojectedMesh.330core.frag | 0 .../UnprojectedMesh.330core.vert | 0 .../UnprojectedMesh.450core.frag | 0 .../UnprojectedMesh.450core.frag.spv | Bin .../UnprojectedMesh.450core.vert | 0 .../UnprojectedMesh.450core.vert.spv | Bin .../UnprojectedMesh.hlsl | 0 .../UnprojectedMesh.metal | 0 tests/Testbed/TestbedContext.cpp | 171 +++++++++--------- tests/Testbed/UnitTests/TestShaderErrors.cpp | 2 +- 78 files changed, 112 insertions(+), 103 deletions(-) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.330core.frag (100%) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.330core.vert (100%) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.450core.frag (100%) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.450core.vert (100%) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.hlsl (100%) rename tests/Testbed/Shaders/{ => ClearScreen}/ClearScreen.metal (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.420core.frag (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.420core.vert (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.450core.frag (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.450core.vert (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.hlsl (100%) rename tests/Testbed/Shaders/{ => DualSourceBlending}/DualSourceBlending.metal (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.330core.frag (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.330core.vert (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.450core.frag (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.450core.vert (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.hlsl (100%) rename tests/Testbed/Shaders/{ => DynamicTriangleMesh}/DynamicTriangleMesh.metal (100%) rename tests/Testbed/Shaders/{ => ResourceArrays}/ResourceArrays.450core.frag (100%) rename tests/Testbed/Shaders/{ => ResourceArrays}/ResourceArrays.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => ResourceArrays}/ResourceArrays.450core.vert (100%) rename tests/Testbed/Shaders/{ => ResourceArrays}/ResourceArrays.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => ResourceArrays}/ResourceArrays.hlsl (100%) rename tests/Testbed/Shaders/{ => ResourceBinding}/ResourceBinding.450core.comp (100%) rename tests/Testbed/Shaders/{ => ResourceBinding}/ResourceBinding.450core.comp.spv (100%) rename tests/Testbed/Shaders/{ => ResourceBinding}/ResourceBinding.450core.frag (100%) rename tests/Testbed/Shaders/{ => ResourceBinding}/ResourceBinding.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => ResourceBinding}/ResourceBinding.450core.vert (100%) rename tests/Testbed/Shaders/{ => ResourceBinding}/ResourceBinding.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => ResourceBinding}/ResourceBinding.hlsl (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.CSMain.450core.comp (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.CSMain.hlsl (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.CSMain.metal (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.PSMain.450core.frag (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.PSMain.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.PSMain.hlsl (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.PSMain.metal (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.VSMain.450core.vert (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.VSMain.hlsl (100%) rename tests/Testbed/Shaders/{ => SemanticErrors}/SemanticErrors.VSMain.metal (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.PScene.330core.frag (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.PScene.450core.frag (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.PScene.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.VScene.330core.vert (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.VScene.450core.vert (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.VScene.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.VShadow.330core.vert (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.VShadow.450core.vert (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.VShadow.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.hlsl (100%) rename tests/Testbed/Shaders/{ => ShadowMapping}/ShadowMapping.metal (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.330core.frag (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.330core.vert (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.450core.frag (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.450core.vert (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.Textured.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.Textured.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.hlsl (100%) rename tests/Testbed/Shaders/{ => TriangleMesh}/TriangleMesh.metal (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.330core.frag (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.330core.vert (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.450core.frag (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.450core.frag.spv (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.450core.vert (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.450core.vert.spv (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.hlsl (100%) rename tests/Testbed/Shaders/{ => UnprojectedMesh}/UnprojectedMesh.metal (100%) diff --git a/tests/Testbed/Shaders/ClearScreen.330core.frag b/tests/Testbed/Shaders/ClearScreen/ClearScreen.330core.frag similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.330core.frag rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.330core.frag diff --git a/tests/Testbed/Shaders/ClearScreen.330core.vert b/tests/Testbed/Shaders/ClearScreen/ClearScreen.330core.vert similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.330core.vert rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.330core.vert diff --git a/tests/Testbed/Shaders/ClearScreen.450core.frag b/tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.frag similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.450core.frag rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.frag diff --git a/tests/Testbed/Shaders/ClearScreen.450core.frag.spv b/tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.450core.frag.spv rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.frag.spv diff --git a/tests/Testbed/Shaders/ClearScreen.450core.vert b/tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.vert similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.450core.vert rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.vert diff --git a/tests/Testbed/Shaders/ClearScreen.450core.vert.spv b/tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.450core.vert.spv rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.450core.vert.spv diff --git a/tests/Testbed/Shaders/ClearScreen.hlsl b/tests/Testbed/Shaders/ClearScreen/ClearScreen.hlsl similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.hlsl rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.hlsl diff --git a/tests/Testbed/Shaders/ClearScreen.metal b/tests/Testbed/Shaders/ClearScreen/ClearScreen.metal similarity index 100% rename from tests/Testbed/Shaders/ClearScreen.metal rename to tests/Testbed/Shaders/ClearScreen/ClearScreen.metal diff --git a/tests/Testbed/Shaders/CompileAllGlslShadersToSpirv.bat b/tests/Testbed/Shaders/CompileAllGlslShadersToSpirv.bat index 2401892b96..4defd0ebb0 100644 --- a/tests/Testbed/Shaders/CompileAllGlslShadersToSpirv.bat +++ b/tests/Testbed/Shaders/CompileAllGlslShadersToSpirv.bat @@ -1,26 +1,26 @@ @echo off -glslangValidator -V -DENABLE_SPIRV=1 -o TriangleMesh.450core.vert.spv TriangleMesh.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o TriangleMesh.450core.frag.spv TriangleMesh.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -DENABLE_TEXTURING=1 -o TriangleMesh.Textured.450core.vert.spv TriangleMesh.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -DENABLE_TEXTURING=1 -o TriangleMesh.Textured.450core.frag.spv TriangleMesh.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o UnprojectedMesh.450core.vert.spv UnprojectedMesh.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o UnprojectedMesh.450core.frag.spv UnprojectedMesh.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o DualSourceBlending.450core.vert.spv DualSourceBlending.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o DualSourceBlending.450core.frag.spv DualSourceBlending.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o DynamicTriangleMesh.450core.vert.spv DynamicTriangleMesh.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o DynamicTriangleMesh.450core.frag.spv DynamicTriangleMesh.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o ShadowMapping.VShadow.450core.vert.spv ShadowMapping.VShadow.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o ShadowMapping.VScene.450core.vert.spv ShadowMapping.VScene.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o ShadowMapping.PScene.450core.frag.spv ShadowMapping.PScene.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o SemanticErrors.PSMain.450core.frag.spv SemanticErrors.PSMain.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o ResourceArrays.450core.vert.spv ResourceArrays.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o ResourceArrays.450core.frag.spv ResourceArrays.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o ResourceBinding.450core.comp.spv ResourceBinding.450core.comp -glslangValidator -V -DENABLE_SPIRV=1 -o ResourceBinding.450core.vert.spv ResourceBinding.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o ResourceBinding.450core.frag.spv ResourceBinding.450core.frag -glslangValidator -V -DENABLE_SPIRV=1 -o ClearScreen.450core.vert.spv ClearScreen.450core.vert -glslangValidator -V -DENABLE_SPIRV=1 -o ClearScreen.450core.frag.spv ClearScreen.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o TriangleMesh\TriangleMesh.450core.vert.spv TriangleMesh\TriangleMesh.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o TriangleMesh\TriangleMesh.450core.frag.spv TriangleMesh\TriangleMesh.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -DENABLE_TEXTURING=1 -o TriangleMesh\TriangleMesh.Textured.450core.vert.spv TriangleMesh\TriangleMesh.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -DENABLE_TEXTURING=1 -o TriangleMesh\TriangleMesh.Textured.450core.frag.spv TriangleMesh\TriangleMesh.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o UnprojectedMesh\UnprojectedMesh.450core.vert.spv UnprojectedMesh\UnprojectedMesh.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o UnprojectedMesh\UnprojectedMesh.450core.frag.spv UnprojectedMesh\UnprojectedMesh.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o DualSourceBlending\DualSourceBlending.450core.vert.spv DualSourceBlending\DualSourceBlending.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o DualSourceBlending\DualSourceBlending.450core.frag.spv DualSourceBlending\DualSourceBlending.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o DynamicTriangleMesh\DynamicTriangleMesh.450core.vert.spv DynamicTriangleMesh\DynamicTriangleMesh.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o DynamicTriangleMesh\DynamicTriangleMesh.450core.frag.spv DynamicTriangleMesh\DynamicTriangleMesh.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o ShadowMapping\ShadowMapping.VShadow.450core.vert.spv ShadowMapping\ShadowMapping.VShadow.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o ShadowMapping\ShadowMapping.VScene.450core.vert.spv ShadowMapping\ShadowMapping.VScene.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o ShadowMapping\ShadowMapping.PScene.450core.frag.spv ShadowMapping\ShadowMapping.PScene.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o SemanticErrors\SemanticErrors.PSMain.450core.frag.spv SemanticErrors\SemanticErrors.PSMain.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o ResourceArrays\ResourceArrays.450core.vert.spv ResourceArrays\ResourceArrays.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o ResourceArrays\ResourceArrays.450core.frag.spv ResourceArrays\ResourceArrays.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o ResourceBinding\ResourceBinding.450core.comp.spv ResourceBinding\ResourceBinding.450core.comp +glslangValidator -V -DENABLE_SPIRV=1 -o ResourceBinding\ResourceBinding.450core.vert.spv ResourceBinding\ResourceBinding.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o ResourceBinding\ResourceBinding.450core.frag.spv ResourceBinding\ResourceBinding.450core.frag +glslangValidator -V -DENABLE_SPIRV=1 -o ClearScreen\ClearScreen.450core.vert.spv ClearScreen\ClearScreen.450core.vert +glslangValidator -V -DENABLE_SPIRV=1 -o ClearScreen\ClearScreen.450core.frag.spv ClearScreen\ClearScreen.450core.frag echo DONE pause diff --git a/tests/Testbed/Shaders/DualSourceBlending.420core.frag b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.420core.frag similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.420core.frag rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.420core.frag diff --git a/tests/Testbed/Shaders/DualSourceBlending.420core.vert b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.420core.vert similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.420core.vert rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.420core.vert diff --git a/tests/Testbed/Shaders/DualSourceBlending.450core.frag b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.frag similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.450core.frag rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.frag diff --git a/tests/Testbed/Shaders/DualSourceBlending.450core.frag.spv b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.450core.frag.spv rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.frag.spv diff --git a/tests/Testbed/Shaders/DualSourceBlending.450core.vert b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.vert similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.450core.vert rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.vert diff --git a/tests/Testbed/Shaders/DualSourceBlending.450core.vert.spv b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.450core.vert.spv rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.450core.vert.spv diff --git a/tests/Testbed/Shaders/DualSourceBlending.hlsl b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.hlsl similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.hlsl rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.hlsl diff --git a/tests/Testbed/Shaders/DualSourceBlending.metal b/tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.metal similarity index 100% rename from tests/Testbed/Shaders/DualSourceBlending.metal rename to tests/Testbed/Shaders/DualSourceBlending/DualSourceBlending.metal diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.330core.frag b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.330core.frag similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.330core.frag rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.330core.frag diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.330core.vert b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.330core.vert similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.330core.vert rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.330core.vert diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.450core.frag b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.frag similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.450core.frag rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.frag diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.450core.frag.spv b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.450core.frag.spv rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.frag.spv diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.450core.vert b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.vert similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.450core.vert rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.vert diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.450core.vert.spv b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.450core.vert.spv rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.450core.vert.spv diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.hlsl b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.hlsl similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.hlsl rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.hlsl diff --git a/tests/Testbed/Shaders/DynamicTriangleMesh.metal b/tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.metal similarity index 100% rename from tests/Testbed/Shaders/DynamicTriangleMesh.metal rename to tests/Testbed/Shaders/DynamicTriangleMesh/DynamicTriangleMesh.metal diff --git a/tests/Testbed/Shaders/ResourceArrays.450core.frag b/tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.frag similarity index 100% rename from tests/Testbed/Shaders/ResourceArrays.450core.frag rename to tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.frag diff --git a/tests/Testbed/Shaders/ResourceArrays.450core.frag.spv b/tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/ResourceArrays.450core.frag.spv rename to tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.frag.spv diff --git a/tests/Testbed/Shaders/ResourceArrays.450core.vert b/tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.vert similarity index 100% rename from tests/Testbed/Shaders/ResourceArrays.450core.vert rename to tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.vert diff --git a/tests/Testbed/Shaders/ResourceArrays.450core.vert.spv b/tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/ResourceArrays.450core.vert.spv rename to tests/Testbed/Shaders/ResourceArrays/ResourceArrays.450core.vert.spv diff --git a/tests/Testbed/Shaders/ResourceArrays.hlsl b/tests/Testbed/Shaders/ResourceArrays/ResourceArrays.hlsl similarity index 100% rename from tests/Testbed/Shaders/ResourceArrays.hlsl rename to tests/Testbed/Shaders/ResourceArrays/ResourceArrays.hlsl diff --git a/tests/Testbed/Shaders/ResourceBinding.450core.comp b/tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.comp similarity index 100% rename from tests/Testbed/Shaders/ResourceBinding.450core.comp rename to tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.comp diff --git a/tests/Testbed/Shaders/ResourceBinding.450core.comp.spv b/tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.comp.spv similarity index 100% rename from tests/Testbed/Shaders/ResourceBinding.450core.comp.spv rename to tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.comp.spv diff --git a/tests/Testbed/Shaders/ResourceBinding.450core.frag b/tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.frag similarity index 100% rename from tests/Testbed/Shaders/ResourceBinding.450core.frag rename to tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.frag diff --git a/tests/Testbed/Shaders/ResourceBinding.450core.frag.spv b/tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/ResourceBinding.450core.frag.spv rename to tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.frag.spv diff --git a/tests/Testbed/Shaders/ResourceBinding.450core.vert b/tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.vert similarity index 100% rename from tests/Testbed/Shaders/ResourceBinding.450core.vert rename to tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.vert diff --git a/tests/Testbed/Shaders/ResourceBinding.450core.vert.spv b/tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/ResourceBinding.450core.vert.spv rename to tests/Testbed/Shaders/ResourceBinding/ResourceBinding.450core.vert.spv diff --git a/tests/Testbed/Shaders/ResourceBinding.hlsl b/tests/Testbed/Shaders/ResourceBinding/ResourceBinding.hlsl similarity index 100% rename from tests/Testbed/Shaders/ResourceBinding.hlsl rename to tests/Testbed/Shaders/ResourceBinding/ResourceBinding.hlsl diff --git a/tests/Testbed/Shaders/SemanticErrors.CSMain.450core.comp b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.CSMain.450core.comp similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.CSMain.450core.comp rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.CSMain.450core.comp diff --git a/tests/Testbed/Shaders/SemanticErrors.CSMain.hlsl b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.CSMain.hlsl similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.CSMain.hlsl rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.CSMain.hlsl diff --git a/tests/Testbed/Shaders/SemanticErrors.CSMain.metal b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.CSMain.metal similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.CSMain.metal rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.CSMain.metal diff --git a/tests/Testbed/Shaders/SemanticErrors.PSMain.450core.frag b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.450core.frag similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.PSMain.450core.frag rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.450core.frag diff --git a/tests/Testbed/Shaders/SemanticErrors.PSMain.450core.frag.spv b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.PSMain.450core.frag.spv rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.450core.frag.spv diff --git a/tests/Testbed/Shaders/SemanticErrors.PSMain.hlsl b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.hlsl similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.PSMain.hlsl rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.hlsl diff --git a/tests/Testbed/Shaders/SemanticErrors.PSMain.metal b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.metal similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.PSMain.metal rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.PSMain.metal diff --git a/tests/Testbed/Shaders/SemanticErrors.VSMain.450core.vert b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.VSMain.450core.vert similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.VSMain.450core.vert rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.VSMain.450core.vert diff --git a/tests/Testbed/Shaders/SemanticErrors.VSMain.hlsl b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.VSMain.hlsl similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.VSMain.hlsl rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.VSMain.hlsl diff --git a/tests/Testbed/Shaders/SemanticErrors.VSMain.metal b/tests/Testbed/Shaders/SemanticErrors/SemanticErrors.VSMain.metal similarity index 100% rename from tests/Testbed/Shaders/SemanticErrors.VSMain.metal rename to tests/Testbed/Shaders/SemanticErrors/SemanticErrors.VSMain.metal diff --git a/tests/Testbed/Shaders/ShadowMapping.PScene.330core.frag b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.PScene.330core.frag similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.PScene.330core.frag rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.PScene.330core.frag diff --git a/tests/Testbed/Shaders/ShadowMapping.PScene.450core.frag b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.PScene.450core.frag similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.PScene.450core.frag rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.PScene.450core.frag diff --git a/tests/Testbed/Shaders/ShadowMapping.PScene.450core.frag.spv b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.PScene.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.PScene.450core.frag.spv rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.PScene.450core.frag.spv diff --git a/tests/Testbed/Shaders/ShadowMapping.VScene.330core.vert b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VScene.330core.vert similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.VScene.330core.vert rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VScene.330core.vert diff --git a/tests/Testbed/Shaders/ShadowMapping.VScene.450core.vert b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VScene.450core.vert similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.VScene.450core.vert rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VScene.450core.vert diff --git a/tests/Testbed/Shaders/ShadowMapping.VScene.450core.vert.spv b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VScene.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.VScene.450core.vert.spv rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VScene.450core.vert.spv diff --git a/tests/Testbed/Shaders/ShadowMapping.VShadow.330core.vert b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VShadow.330core.vert similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.VShadow.330core.vert rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VShadow.330core.vert diff --git a/tests/Testbed/Shaders/ShadowMapping.VShadow.450core.vert b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VShadow.450core.vert similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.VShadow.450core.vert rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VShadow.450core.vert diff --git a/tests/Testbed/Shaders/ShadowMapping.VShadow.450core.vert.spv b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VShadow.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.VShadow.450core.vert.spv rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.VShadow.450core.vert.spv diff --git a/tests/Testbed/Shaders/ShadowMapping.hlsl b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.hlsl similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.hlsl rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.hlsl diff --git a/tests/Testbed/Shaders/ShadowMapping.metal b/tests/Testbed/Shaders/ShadowMapping/ShadowMapping.metal similarity index 100% rename from tests/Testbed/Shaders/ShadowMapping.metal rename to tests/Testbed/Shaders/ShadowMapping/ShadowMapping.metal diff --git a/tests/Testbed/Shaders/TriangleMesh.330core.frag b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.330core.frag similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.330core.frag rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.330core.frag diff --git a/tests/Testbed/Shaders/TriangleMesh.330core.vert b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.330core.vert similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.330core.vert rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.330core.vert diff --git a/tests/Testbed/Shaders/TriangleMesh.450core.frag b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.frag similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.450core.frag rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.frag diff --git a/tests/Testbed/Shaders/TriangleMesh.450core.frag.spv b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.450core.frag.spv rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.frag.spv diff --git a/tests/Testbed/Shaders/TriangleMesh.450core.vert b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.vert similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.450core.vert rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.vert diff --git a/tests/Testbed/Shaders/TriangleMesh.450core.vert.spv b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.450core.vert.spv rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.450core.vert.spv diff --git a/tests/Testbed/Shaders/TriangleMesh.Textured.450core.frag.spv b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.Textured.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.Textured.450core.frag.spv rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.Textured.450core.frag.spv diff --git a/tests/Testbed/Shaders/TriangleMesh.Textured.450core.vert.spv b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.Textured.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.Textured.450core.vert.spv rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.Textured.450core.vert.spv diff --git a/tests/Testbed/Shaders/TriangleMesh.hlsl b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.hlsl similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.hlsl rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.hlsl diff --git a/tests/Testbed/Shaders/TriangleMesh.metal b/tests/Testbed/Shaders/TriangleMesh/TriangleMesh.metal similarity index 100% rename from tests/Testbed/Shaders/TriangleMesh.metal rename to tests/Testbed/Shaders/TriangleMesh/TriangleMesh.metal diff --git a/tests/Testbed/Shaders/UnprojectedMesh.330core.frag b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.330core.frag similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.330core.frag rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.330core.frag diff --git a/tests/Testbed/Shaders/UnprojectedMesh.330core.vert b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.330core.vert similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.330core.vert rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.330core.vert diff --git a/tests/Testbed/Shaders/UnprojectedMesh.450core.frag b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.frag similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.450core.frag rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.frag diff --git a/tests/Testbed/Shaders/UnprojectedMesh.450core.frag.spv b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.frag.spv similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.450core.frag.spv rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.frag.spv diff --git a/tests/Testbed/Shaders/UnprojectedMesh.450core.vert b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.vert similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.450core.vert rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.vert diff --git a/tests/Testbed/Shaders/UnprojectedMesh.450core.vert.spv b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.vert.spv similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.450core.vert.spv rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.450core.vert.spv diff --git a/tests/Testbed/Shaders/UnprojectedMesh.hlsl b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.hlsl similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.hlsl rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.hlsl diff --git a/tests/Testbed/Shaders/UnprojectedMesh.metal b/tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.metal similarity index 100% rename from tests/Testbed/Shaders/UnprojectedMesh.metal rename to tests/Testbed/Shaders/UnprojectedMesh/UnprojectedMesh.metal diff --git a/tests/Testbed/TestbedContext.cpp b/tests/Testbed/TestbedContext.cpp index d9c3ec8bb9..9607bffafa 100644 --- a/tests/Testbed/TestbedContext.cpp +++ b/tests/Testbed/TestbedContext.cpp @@ -849,30 +849,28 @@ bool TestbedContext::LoadShaders() ShaderMacro{ nullptr, nullptr } }; - const std::string shaderPath = "Shaders/"; - if (IsShadingLanguageSupported(ShadingLanguage::HLSL)) { - shaders[VSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0"); - shaders[PSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); - shaders[VSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", definesEnableTexturing); - shaders[PSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0", definesEnableTexturing); - shaders[VSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0"); - shaders[PSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); - shaders[VSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtUnprojected); - shaders[PSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0", nullptr, VertFmtUnprojected); - shaders[VSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtEmpty); - shaders[PSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0", nullptr, VertFmtEmpty); - shaders[VSShadowMap] = LoadShaderFromFile(shaderPath + "ShadowMapping.hlsl", ShaderType::Vertex, "VShadow", "vs_5_0"); - shaders[VSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.hlsl", ShaderType::Vertex, "VScene", "vs_5_0"); - shaders[PSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.hlsl", ShaderType::Fragment, "PScene", "ps_5_0"); - shaders[VSResourceArrays] = LoadShaderFromFile(shaderPath + "ResourceArrays.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0"); - shaders[PSResourceArrays] = LoadShaderFromFile(shaderPath + "ResourceArrays.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); - shaders[VSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtEmpty); - shaders[PSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); - shaders[CSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.hlsl", ShaderType::Compute, "CSMain", "cs_5_0"); - shaders[VSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtEmpty); - shaders[PSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); + shaders[VSSolid] = LoadShaderFromFile("TriangleMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0"); + shaders[PSSolid] = LoadShaderFromFile("TriangleMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); + shaders[VSTextured] = LoadShaderFromFile("TriangleMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", definesEnableTexturing); + shaders[PSTextured] = LoadShaderFromFile("TriangleMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0", definesEnableTexturing); + shaders[VSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0"); + shaders[PSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); + shaders[VSUnprojected] = LoadShaderFromFile("UnprojectedMesh.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtUnprojected); + shaders[PSUnprojected] = LoadShaderFromFile("UnprojectedMesh.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0", nullptr, VertFmtUnprojected); + shaders[VSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtEmpty); + shaders[PSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0", nullptr, VertFmtEmpty); + shaders[VSShadowMap] = LoadShaderFromFile("ShadowMapping.hlsl", ShaderType::Vertex, "VShadow", "vs_5_0"); + shaders[VSShadowedScene] = LoadShaderFromFile("ShadowMapping.hlsl", ShaderType::Vertex, "VScene", "vs_5_0"); + shaders[PSShadowedScene] = LoadShaderFromFile("ShadowMapping.hlsl", ShaderType::Fragment, "PScene", "ps_5_0"); + shaders[VSResourceArrays] = LoadShaderFromFile("ResourceArrays.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0"); + shaders[PSResourceArrays] = LoadShaderFromFile("ResourceArrays.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); + shaders[VSResourceBinding] = LoadShaderFromFile("ResourceBinding.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtEmpty); + shaders[PSResourceBinding] = LoadShaderFromFile("ResourceBinding.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); + shaders[CSResourceBinding] = LoadShaderFromFile("ResourceBinding.hlsl", ShaderType::Compute, "CSMain", "cs_5_0"); + shaders[VSClear] = LoadShaderFromFile("ClearScreen.hlsl", ShaderType::Vertex, "VSMain", "vs_5_0", nullptr, VertFmtEmpty); + shaders[PSClear] = LoadShaderFromFile("ClearScreen.hlsl", ShaderType::Fragment, "PSMain", "ps_5_0"); } else if (IsShadingLanguageSupported(ShadingLanguage::GLSL)) { @@ -881,76 +879,76 @@ bool TestbedContext::LoadShaders() Log::Errorf("OpenGL backend does not support GLSL 330\n"); return false; } - shaders[VSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.330core.vert", ShaderType::Vertex); - shaders[PSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.330core.frag", ShaderType::Fragment); - shaders[VSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.330core.vert", ShaderType::Vertex, nullptr, nullptr, definesEnableTexturing); - shaders[PSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.330core.frag", ShaderType::Fragment, nullptr, nullptr, definesEnableTexturing); - shaders[VSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.330core.vert", ShaderType::Vertex, nullptr, nullptr); - shaders[PSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.330core.frag", ShaderType::Fragment, nullptr, nullptr); - shaders[VSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.330core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtUnprojected); - shaders[PSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.330core.frag", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtUnprojected); + shaders[VSSolid] = LoadShaderFromFile("TriangleMesh.330core.vert", ShaderType::Vertex); + shaders[PSSolid] = LoadShaderFromFile("TriangleMesh.330core.frag", ShaderType::Fragment); + shaders[VSTextured] = LoadShaderFromFile("TriangleMesh.330core.vert", ShaderType::Vertex, nullptr, nullptr, definesEnableTexturing); + shaders[PSTextured] = LoadShaderFromFile("TriangleMesh.330core.frag", ShaderType::Fragment, nullptr, nullptr, definesEnableTexturing); + shaders[VSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.330core.vert", ShaderType::Vertex, nullptr, nullptr); + shaders[PSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.330core.frag", ShaderType::Fragment, nullptr, nullptr); + shaders[VSUnprojected] = LoadShaderFromFile("UnprojectedMesh.330core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtUnprojected); + shaders[PSUnprojected] = LoadShaderFromFile("UnprojectedMesh.330core.frag", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtUnprojected); if (IsShadingLanguageSupported(ShadingLanguage::GLSL_420)) { - shaders[VSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.420core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); - shaders[PSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.420core.frag", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[VSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.420core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[PSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.420core.frag", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtEmpty); } - shaders[VSShadowMap] = LoadShaderFromFile(shaderPath + "ShadowMapping.VShadow.330core.vert", ShaderType::Vertex); - shaders[VSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.VScene.330core.vert", ShaderType::Vertex); - shaders[PSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.PScene.330core.frag", ShaderType::Fragment); + shaders[VSShadowMap] = LoadShaderFromFile("ShadowMapping.VShadow.330core.vert", ShaderType::Vertex); + shaders[VSShadowedScene] = LoadShaderFromFile("ShadowMapping.VScene.330core.vert", ShaderType::Vertex); + shaders[PSShadowedScene] = LoadShaderFromFile("ShadowMapping.PScene.330core.frag", ShaderType::Fragment); if (IsShadingLanguageSupported(ShadingLanguage::GLSL_450)) { - shaders[VSResourceArrays] = LoadShaderFromFile(shaderPath + "ResourceArrays.450core.vert", ShaderType::Vertex); - shaders[PSResourceArrays] = LoadShaderFromFile(shaderPath + "ResourceArrays.450core.frag", ShaderType::Fragment); - shaders[VSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.450core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); - shaders[PSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.450core.frag", ShaderType::Fragment); - shaders[CSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.450core.comp", ShaderType::Compute); + shaders[VSResourceArrays] = LoadShaderFromFile("ResourceArrays.450core.vert", ShaderType::Vertex); + shaders[PSResourceArrays] = LoadShaderFromFile("ResourceArrays.450core.frag", ShaderType::Fragment); + shaders[VSResourceBinding] = LoadShaderFromFile("ResourceBinding.450core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[PSResourceBinding] = LoadShaderFromFile("ResourceBinding.450core.frag", ShaderType::Fragment); + shaders[CSResourceBinding] = LoadShaderFromFile("ResourceBinding.450core.comp", ShaderType::Compute); } - shaders[VSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.330core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); - shaders[PSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.330core.frag", ShaderType::Fragment); + shaders[VSClear] = LoadShaderFromFile("ClearScreen.330core.vert", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[PSClear] = LoadShaderFromFile("ClearScreen.330core.frag", ShaderType::Fragment); } else if (IsShadingLanguageSupported(ShadingLanguage::Metal)) { - shaders[VSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.metal", ShaderType::Vertex, "VSMain", "1.1"); - shaders[PSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.metal", ShaderType::Fragment, "PSMain", "1.1"); - shaders[VSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.metal", ShaderType::Vertex, "VSMain", "1.1", definesEnableTexturing); - shaders[PSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.metal", ShaderType::Fragment, "PSMain", "1.1", definesEnableTexturing); - shaders[VSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.metal", ShaderType::Vertex, "VSMain", "1.1"); - shaders[PSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.metal", ShaderType::Fragment, "PSMain", "1.1"); - shaders[VSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.metal", ShaderType::Vertex, "VSMain", "1.1", nullptr, VertFmtUnprojected); - shaders[PSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.metal", ShaderType::Fragment, "PSMain", "1.1", nullptr, VertFmtUnprojected); - shaders[VSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.metal", ShaderType::Vertex, "VSMain", "1.2", nullptr, VertFmtEmpty); - shaders[PSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.metal", ShaderType::Fragment, "PSMain", "1.2", nullptr, VertFmtEmpty); - shaders[VSShadowMap] = LoadShaderFromFile(shaderPath + "ShadowMapping.metal", ShaderType::Vertex, "VShadow", "1.1"); - shaders[VSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.metal", ShaderType::Vertex, "VScene", "1.1"); - shaders[PSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.metal", ShaderType::Fragment, "PScene", "1.1"); -// shaders[VSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.metal", ShaderType::Vertex, "VSMain", "1.1", nullptr, VertFmtEmpty); -// shaders[PSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.metal", ShaderType::Fragment, "PSMain", "1.1"); -// shaders[CSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.metal", ShaderType::Compute, "CSMain", "1.1"); - shaders[VSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.metal", ShaderType::Vertex, "VSMain", "1.1", nullptr, VertFmtEmpty); - shaders[PSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.metal", ShaderType::Fragment, "PSMain", "1.1"); + shaders[VSSolid] = LoadShaderFromFile("TriangleMesh.metal", ShaderType::Vertex, "VSMain", "1.1"); + shaders[PSSolid] = LoadShaderFromFile("TriangleMesh.metal", ShaderType::Fragment, "PSMain", "1.1"); + shaders[VSTextured] = LoadShaderFromFile("TriangleMesh.metal", ShaderType::Vertex, "VSMain", "1.1", definesEnableTexturing); + shaders[PSTextured] = LoadShaderFromFile("TriangleMesh.metal", ShaderType::Fragment, "PSMain", "1.1", definesEnableTexturing); + shaders[VSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.metal", ShaderType::Vertex, "VSMain", "1.1"); + shaders[PSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.metal", ShaderType::Fragment, "PSMain", "1.1"); + shaders[VSUnprojected] = LoadShaderFromFile("UnprojectedMesh.metal", ShaderType::Vertex, "VSMain", "1.1", nullptr, VertFmtUnprojected); + shaders[PSUnprojected] = LoadShaderFromFile("UnprojectedMesh.metal", ShaderType::Fragment, "PSMain", "1.1", nullptr, VertFmtUnprojected); + shaders[VSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.metal", ShaderType::Vertex, "VSMain", "1.2", nullptr, VertFmtEmpty); + shaders[PSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.metal", ShaderType::Fragment, "PSMain", "1.2", nullptr, VertFmtEmpty); + shaders[VSShadowMap] = LoadShaderFromFile("ShadowMapping.metal", ShaderType::Vertex, "VShadow", "1.1"); + shaders[VSShadowedScene] = LoadShaderFromFile("ShadowMapping.metal", ShaderType::Vertex, "VScene", "1.1"); + shaders[PSShadowedScene] = LoadShaderFromFile("ShadowMapping.metal", ShaderType::Fragment, "PScene", "1.1"); +// shaders[VSResourceBinding] = LoadShaderFromFile("ResourceBinding.metal", ShaderType::Vertex, "VSMain", "1.1", nullptr, VertFmtEmpty); +// shaders[PSResourceBinding] = LoadShaderFromFile("ResourceBinding.metal", ShaderType::Fragment, "PSMain", "1.1"); +// shaders[CSResourceBinding] = LoadShaderFromFile("ResourceBinding.metal", ShaderType::Compute, "CSMain", "1.1"); + shaders[VSClear] = LoadShaderFromFile("ClearScreen.metal", ShaderType::Vertex, "VSMain", "1.1", nullptr, VertFmtEmpty); + shaders[PSClear] = LoadShaderFromFile("ClearScreen.metal", ShaderType::Fragment, "PSMain", "1.1"); } else if (IsShadingLanguageSupported(ShadingLanguage::SPIRV)) { - shaders[VSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.450core.vert.spv", ShaderType::Vertex); - shaders[PSSolid] = LoadShaderFromFile(shaderPath + "TriangleMesh.450core.frag.spv", ShaderType::Fragment); - shaders[VSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.Textured.450core.vert.spv", ShaderType::Vertex); - shaders[PSTextured] = LoadShaderFromFile(shaderPath + "TriangleMesh.Textured.450core.frag.spv", ShaderType::Fragment); - shaders[VSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.450core.vert.spv", ShaderType::Vertex); - shaders[PSDynamic] = LoadShaderFromFile(shaderPath + "DynamicTriangleMesh.450core.frag.spv", ShaderType::Fragment); - shaders[VSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtUnprojected); - shaders[PSUnprojected] = LoadShaderFromFile(shaderPath + "UnprojectedMesh.450core.frag.spv", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtUnprojected); - shaders[VSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); - shaders[PSDualSourceBlend] = LoadShaderFromFile(shaderPath + "DualSourceBlending.450core.frag.spv", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtEmpty); - shaders[VSShadowMap] = LoadShaderFromFile(shaderPath + "ShadowMapping.VShadow.450core.vert.spv", ShaderType::Vertex); - shaders[VSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.VScene.450core.vert.spv", ShaderType::Vertex); - shaders[PSShadowedScene] = LoadShaderFromFile(shaderPath + "ShadowMapping.PScene.450core.frag.spv", ShaderType::Fragment); - shaders[VSResourceArrays] = LoadShaderFromFile(shaderPath + "ResourceArrays.450core.vert.spv", ShaderType::Vertex); - shaders[PSResourceArrays] = LoadShaderFromFile(shaderPath + "ResourceArrays.450core.frag.spv", ShaderType::Fragment); - shaders[VSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); - shaders[PSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.450core.frag.spv", ShaderType::Fragment); - shaders[CSResourceBinding] = LoadShaderFromFile(shaderPath + "ResourceBinding.450core.comp.spv", ShaderType::Compute); - shaders[VSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); - shaders[PSClear] = LoadShaderFromFile(shaderPath + "ClearScreen.450core.frag.spv", ShaderType::Fragment); + shaders[VSSolid] = LoadShaderFromFile("TriangleMesh.450core.vert.spv", ShaderType::Vertex); + shaders[PSSolid] = LoadShaderFromFile("TriangleMesh.450core.frag.spv", ShaderType::Fragment); + shaders[VSTextured] = LoadShaderFromFile("TriangleMesh.Textured.450core.vert.spv", ShaderType::Vertex); + shaders[PSTextured] = LoadShaderFromFile("TriangleMesh.Textured.450core.frag.spv", ShaderType::Fragment); + shaders[VSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.450core.vert.spv", ShaderType::Vertex); + shaders[PSDynamic] = LoadShaderFromFile("DynamicTriangleMesh.450core.frag.spv", ShaderType::Fragment); + shaders[VSUnprojected] = LoadShaderFromFile("UnprojectedMesh.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtUnprojected); + shaders[PSUnprojected] = LoadShaderFromFile("UnprojectedMesh.450core.frag.spv", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtUnprojected); + shaders[VSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[PSDualSourceBlend] = LoadShaderFromFile("DualSourceBlending.450core.frag.spv", ShaderType::Fragment, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[VSShadowMap] = LoadShaderFromFile("ShadowMapping.VShadow.450core.vert.spv", ShaderType::Vertex); + shaders[VSShadowedScene] = LoadShaderFromFile("ShadowMapping.VScene.450core.vert.spv", ShaderType::Vertex); + shaders[PSShadowedScene] = LoadShaderFromFile("ShadowMapping.PScene.450core.frag.spv", ShaderType::Fragment); + shaders[VSResourceArrays] = LoadShaderFromFile("ResourceArrays.450core.vert.spv", ShaderType::Vertex); + shaders[PSResourceArrays] = LoadShaderFromFile("ResourceArrays.450core.frag.spv", ShaderType::Fragment); + shaders[VSResourceBinding] = LoadShaderFromFile("ResourceBinding.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[PSResourceBinding] = LoadShaderFromFile("ResourceBinding.450core.frag.spv", ShaderType::Fragment); + shaders[CSResourceBinding] = LoadShaderFromFile("ResourceBinding.450core.comp.spv", ShaderType::Compute); + shaders[VSClear] = LoadShaderFromFile("ClearScreen.450core.vert.spv", ShaderType::Vertex, nullptr, nullptr, nullptr, VertFmtEmpty); + shaders[PSClear] = LoadShaderFromFile("ClearScreen.450core.frag.spv", ShaderType::Fragment); } else { @@ -1204,10 +1202,21 @@ Shader* TestbedContext::LoadShaderFromFile( if (opt.verbose) PrintLoadingInfo(); + // Resolve file path + const std::string shaderRootDir = "Shaders/"; + + std::string filePath = shaderRootDir; + + std::string::size_type filePartEnd = filename.find('.'); + filePath += (filePartEnd != std::string::npos ? filename.substr(0, filePartEnd) : filename); + filePath += '/'; + filePath += filename; + + // Create shader from file ShaderDescriptor shaderDesc; { shaderDesc.type = type; - shaderDesc.source = filename.c_str(); + shaderDesc.source = filePath.c_str(); shaderDesc.sourceType = (isFileBinary ? ShaderSourceType::BinaryFile : ShaderSourceType::CodeFile); shaderDesc.entryPoint = entry; shaderDesc.profile = profile; diff --git a/tests/Testbed/UnitTests/TestShaderErrors.cpp b/tests/Testbed/UnitTests/TestShaderErrors.cpp index 3d9c2d94dc..b321ff67d9 100644 --- a/tests/Testbed/UnitTests/TestShaderErrors.cpp +++ b/tests/Testbed/UnitTests/TestShaderErrors.cpp @@ -73,7 +73,7 @@ DEF_TEST( ShaderErrors ) } }; - const std::string shaderPath = "Shaders/"; + const std::string shaderPath = "Shaders/SemanticErrors/"; std::string shaderFilename = name; Shader* shader = nullptr;