Update all tests to use .refresh shaders instead of spv
parent
28e0e1efb0
commit
46bcdac0d7
|
@ -16,7 +16,7 @@ namespace MoonWorks.Test
|
||||||
// Create the compute pipeline that writes texture data
|
// Create the compute pipeline that writes texture data
|
||||||
ShaderModule fillTextureComputeShaderModule = new ShaderModule(
|
ShaderModule fillTextureComputeShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("FillTextureCompute.spv")
|
TestUtils.GetShaderPath("FillTextureCompute")
|
||||||
);
|
);
|
||||||
|
|
||||||
ComputePipeline fillTextureComputePipeline = new ComputePipeline(
|
ComputePipeline fillTextureComputePipeline = new ComputePipeline(
|
||||||
|
@ -27,7 +27,7 @@ namespace MoonWorks.Test
|
||||||
// Create the compute pipeline that calculates squares of numbers
|
// Create the compute pipeline that calculates squares of numbers
|
||||||
ShaderModule calculateSquaresComputeShaderModule = new ShaderModule(
|
ShaderModule calculateSquaresComputeShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("CalculateSquaresCompute.spv")
|
TestUtils.GetShaderPath("CalculateSquaresCompute")
|
||||||
);
|
);
|
||||||
|
|
||||||
ComputePipeline calculateSquaresComputePipeline = new ComputePipeline(
|
ComputePipeline calculateSquaresComputePipeline = new ComputePipeline(
|
||||||
|
@ -38,12 +38,12 @@ namespace MoonWorks.Test
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
ShaderModule vertShaderModule = new ShaderModule(
|
ShaderModule vertShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("TexturedQuadVert.spv")
|
TestUtils.GetShaderPath("TexturedQuadVert")
|
||||||
);
|
);
|
||||||
|
|
||||||
ShaderModule fragShaderModule = new ShaderModule(
|
ShaderModule fragShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("TexturedQuadFrag.spv")
|
TestUtils.GetShaderPath("TexturedQuadFrag")
|
||||||
);
|
);
|
||||||
|
|
||||||
GraphicsPipelineCreateInfo drawPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo drawPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -19,8 +19,8 @@ namespace MoonWorks.Test
|
||||||
{
|
{
|
||||||
Logger.LogInfo("Press Left to toggle wireframe mode\nPress Down to toggle small viewport\nPress Right to toggle scissor rect");
|
Logger.LogInfo("Press Left to toggle wireframe mode\nPress Down to toggle small viewport\nPress Right to toggle scissor rect");
|
||||||
|
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("RawTriangleVertices.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("RawTriangleVertices"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor"));
|
||||||
|
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
MainWindow.SwapchainFormat,
|
MainWindow.SwapchainFormat,
|
||||||
|
|
|
@ -28,8 +28,8 @@ namespace MoonWorks.Test
|
||||||
Logger.LogInfo("Setting texture to: " + textureNames[0]);
|
Logger.LogInfo("Setting texture to: " + textureNames[0]);
|
||||||
|
|
||||||
// Load the shaders
|
// Load the shaders
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag"));
|
||||||
|
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace MoonWorks.Test
|
||||||
// Create the compute pipeline that writes texture data
|
// Create the compute pipeline that writes texture data
|
||||||
ShaderModule gradientTextureComputeShaderModule = new ShaderModule(
|
ShaderModule gradientTextureComputeShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("GradientTextureCompute.spv")
|
TestUtils.GetShaderPath("GradientTextureCompute")
|
||||||
);
|
);
|
||||||
|
|
||||||
ComputePipeline gradientTextureComputePipeline = new ComputePipeline(
|
ComputePipeline gradientTextureComputePipeline = new ComputePipeline(
|
||||||
|
@ -39,12 +39,12 @@ namespace MoonWorks.Test
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
ShaderModule vertShaderModule = new ShaderModule(
|
ShaderModule vertShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("TexturedQuadVert.spv")
|
TestUtils.GetShaderPath("TexturedQuadVert")
|
||||||
);
|
);
|
||||||
|
|
||||||
ShaderModule fragShaderModule = new ShaderModule(
|
ShaderModule fragShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("TexturedQuadFrag.spv")
|
TestUtils.GetShaderPath("TexturedQuadFrag")
|
||||||
);
|
);
|
||||||
|
|
||||||
GraphicsPipelineCreateInfo drawPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo drawPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -17,8 +17,8 @@ namespace MoonWorks.Test
|
||||||
public CopyTextureGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
public CopyTextureGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
||||||
{
|
{
|
||||||
// Load the shaders
|
// Load the shaders
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag"));
|
||||||
|
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -86,29 +86,29 @@ namespace MoonWorks.Test
|
||||||
{
|
{
|
||||||
ShaderModule cubeVertShaderModule = new ShaderModule(
|
ShaderModule cubeVertShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("PositionColorVertWithMatrix.spv")
|
TestUtils.GetShaderPath("PositionColorVertWithMatrix")
|
||||||
);
|
);
|
||||||
ShaderModule cubeFragShaderModule = new ShaderModule(
|
ShaderModule cubeFragShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("SolidColor.spv")
|
TestUtils.GetShaderPath("SolidColor")
|
||||||
);
|
);
|
||||||
|
|
||||||
ShaderModule skyboxVertShaderModule = new ShaderModule(
|
ShaderModule skyboxVertShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("SkyboxVert.spv")
|
TestUtils.GetShaderPath("SkyboxVert")
|
||||||
);
|
);
|
||||||
ShaderModule skyboxFragShaderModule = new ShaderModule(
|
ShaderModule skyboxFragShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("SkyboxFrag.spv")
|
TestUtils.GetShaderPath("SkyboxFrag")
|
||||||
);
|
);
|
||||||
|
|
||||||
ShaderModule blitVertShaderModule = new ShaderModule(
|
ShaderModule blitVertShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("TexturedQuadVert.spv")
|
TestUtils.GetShaderPath("TexturedQuadVert")
|
||||||
);
|
);
|
||||||
ShaderModule blitFragShaderModule = new ShaderModule(
|
ShaderModule blitFragShaderModule = new ShaderModule(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
TestUtils.GetShaderPath("TexturedDepthQuadFrag.spv")
|
TestUtils.GetShaderPath("TexturedDepthQuadFrag")
|
||||||
);
|
);
|
||||||
|
|
||||||
depthTexture = Texture.CreateTexture2D(
|
depthTexture = Texture.CreateTexture2D(
|
||||||
|
|
|
@ -22,8 +22,8 @@ namespace MoonWorks.Test
|
||||||
Logger.LogInfo("Press Down to toggle the winding order of the triangles (default is counter-clockwise)");
|
Logger.LogInfo("Press Down to toggle the winding order of the triangles (default is counter-clockwise)");
|
||||||
|
|
||||||
// Load the shaders
|
// Load the shaders
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColorVert.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColorVert"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor"));
|
||||||
|
|
||||||
// Create the graphics pipelines
|
// Create the graphics pipelines
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace MoonWorks.Test
|
||||||
public DrawIndirectGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
public DrawIndirectGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
||||||
{
|
{
|
||||||
// Load the shaders
|
// Load the shaders
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColorVert.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColorVert"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor"));
|
||||||
|
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -22,8 +22,8 @@ namespace MoonWorks.Test
|
||||||
Logger.LogInfo("Setting sample count to: " + currentSampleCount);
|
Logger.LogInfo("Setting sample count to: " + currentSampleCount);
|
||||||
|
|
||||||
// Create the MSAA pipelines
|
// Create the MSAA pipelines
|
||||||
ShaderModule triangleVertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("RawTriangleVertices.spv"));
|
ShaderModule triangleVertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("RawTriangleVertices"));
|
||||||
ShaderModule triangleFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv"));
|
ShaderModule triangleFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor"));
|
||||||
|
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
TextureFormat.R8G8B8A8,
|
TextureFormat.R8G8B8A8,
|
||||||
|
@ -37,8 +37,8 @@ namespace MoonWorks.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the blit pipeline
|
// Create the blit pipeline
|
||||||
ShaderModule blitVertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert.spv"));
|
ShaderModule blitVertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert"));
|
||||||
ShaderModule blitFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag.spv"));
|
ShaderModule blitFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag"));
|
||||||
|
|
||||||
pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
MainWindow.SwapchainFormat,
|
MainWindow.SwapchainFormat,
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,5 +0,0 @@
|
||||||
Get-ChildItem "Source" |
|
|
||||||
Foreach-Object {
|
|
||||||
$filename = $_.Basename
|
|
||||||
glslc $_.FullName -o Compiled/$filename.spv
|
|
||||||
}
|
|
|
@ -48,7 +48,7 @@ namespace MoonWorks.Test
|
||||||
|
|
||||||
public static string GetShaderPath(string shaderName)
|
public static string GetShaderPath(string shaderName)
|
||||||
{
|
{
|
||||||
return SDL2.SDL.SDL_GetBasePath() + "Content/Shaders/Compiled/" + shaderName;
|
return SDL2.SDL.SDL_GetBasePath() + "Content/Shaders/Compiled/" + shaderName + ".refresh";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetTexturePath(string textureName)
|
public static string GetTexturePath(string textureName)
|
||||||
|
|
|
@ -40,8 +40,8 @@ namespace MoonWorks.Test
|
||||||
public TexturedAnimatedQuadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
public TexturedAnimatedQuadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
||||||
{
|
{
|
||||||
// Load the shaders
|
// Load the shaders
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVertWithMatrix.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVertWithMatrix"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFragWithMultiplyColor.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFragWithMultiplyColor"));
|
||||||
|
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -29,8 +29,8 @@ namespace MoonWorks.Test
|
||||||
Logger.LogInfo("Setting sampler state to: " + samplerNames[0]);
|
Logger.LogInfo("Setting sampler state to: " + samplerNames[0]);
|
||||||
|
|
||||||
// Load the shaders
|
// Load the shaders
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadVert"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag"));
|
||||||
|
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
|
@ -12,8 +12,8 @@ namespace MoonWorks.Test
|
||||||
public TriangleVertexBufferGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
public TriangleVertexBufferGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true)
|
||||||
{
|
{
|
||||||
// Load the shaders
|
// Load the shaders
|
||||||
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColorVert.spv"));
|
ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColorVert"));
|
||||||
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv"));
|
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor"));
|
||||||
|
|
||||||
// Create the graphics pipeline
|
// Create the graphics pipeline
|
||||||
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
|
||||||
|
|
Loading…
Reference in New Issue