Texture format consistency

pull/1/head
cosmonaut 2022-11-17 12:33:58 -08:00
parent 030e86124a
commit 0c47e85146
9 changed files with 12 additions and 2 deletions

View File

@ -47,6 +47,7 @@ namespace MoonWorks.Test
); );
GraphicsPipelineCreateInfo drawPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo drawPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
vertShaderModule, vertShaderModule,
fragShaderModule fragShaderModule
); );

View File

@ -23,6 +23,7 @@ namespace MoonWorks.Test
ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv")); ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv"));
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
vertShaderModule, vertShaderModule,
fragShaderModule fragShaderModule
); );
@ -70,7 +71,7 @@ namespace MoonWorks.Test
{ {
cmdbuf.SetScissor(scissorRect); cmdbuf.SetScissor(scissorRect);
} }
cmdbuf.DrawPrimitives(0, 1, 0, 0); cmdbuf.DrawPrimitives(0, 1, 0, 0);
cmdbuf.EndRenderPass(); cmdbuf.EndRenderPass();
} }

View File

@ -210,6 +210,7 @@ namespace MoonWorks.Test
// Create the blit pipeline // Create the blit pipeline
GraphicsPipelineCreateInfo blitPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo blitPipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
blitVertShaderModule, blitVertShaderModule,
blitFragShaderModule blitFragShaderModule
); );

View File

@ -27,6 +27,7 @@ namespace MoonWorks.Test
// Create the graphics pipelines // Create the graphics pipelines
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
vertShaderModule, vertShaderModule,
fragShaderModule fragShaderModule
); );

View File

@ -26,6 +26,7 @@ namespace MoonWorks.Test
ShaderModule triangleFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv")); ShaderModule triangleFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.spv"));
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
TextureFormat.R8G8B8A8,
triangleVertShaderModule, triangleVertShaderModule,
triangleFragShaderModule triangleFragShaderModule
); );
@ -40,6 +41,7 @@ namespace MoonWorks.Test
ShaderModule blitFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag.spv")); ShaderModule blitFragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadFrag.spv"));
pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
blitVertShaderModule, blitVertShaderModule,
blitFragShaderModule blitFragShaderModule
); );

View File

@ -24,6 +24,7 @@ namespace MoonWorks.Test
} }
public static GraphicsPipelineCreateInfo GetStandardGraphicsPipelineCreateInfo( public static GraphicsPipelineCreateInfo GetStandardGraphicsPipelineCreateInfo(
TextureFormat swapchainFormat,
ShaderModule vertShaderModule, ShaderModule vertShaderModule,
ShaderModule fragShaderModule ShaderModule fragShaderModule
) { ) {
@ -31,7 +32,7 @@ namespace MoonWorks.Test
{ {
AttachmentInfo = new GraphicsPipelineAttachmentInfo( AttachmentInfo = new GraphicsPipelineAttachmentInfo(
new ColorAttachmentDescription( new ColorAttachmentDescription(
TextureFormat.R8G8B8A8, swapchainFormat,
ColorAttachmentBlendState.Opaque ColorAttachmentBlendState.Opaque
) )
), ),

View File

@ -45,6 +45,7 @@ namespace MoonWorks.Test
// Create the graphics pipeline // Create the graphics pipeline
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
vertShaderModule, vertShaderModule,
fragShaderModule fragShaderModule
); );

View File

@ -34,6 +34,7 @@ namespace MoonWorks.Test
// Create the graphics pipeline // Create the graphics pipeline
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
vertShaderModule, vertShaderModule,
fragShaderModule fragShaderModule
); );

View File

@ -17,6 +17,7 @@ namespace MoonWorks.Test
// Create the graphics pipeline // Create the graphics pipeline
GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo( GraphicsPipelineCreateInfo pipelineCreateInfo = TestUtils.GetStandardGraphicsPipelineCreateInfo(
MainWindow.SwapchainFormat,
vertShaderModule, vertShaderModule,
fragShaderModule fragShaderModule
); );