aboutsummaryrefslogtreecommitdiffstatsci
path: root/samples/Textured
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2019-05-04 03:16:52 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2019-05-04 03:16:52 +0200
commit03f4e53b4325cfd20dd27b0e2abe19f9bf7a2d2f (patch)
tree20503056405af4c34e76c96f4e97baf712f52142 /samples/Textured
parent3b913249486fd098f802112e836e0c1fe189b47e (diff)
set texture to shaderreadonly
Diffstat (limited to 'samples/Textured')
-rw-r--r--samples/Textured/main.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/samples/Textured/main.cs b/samples/Textured/main.cs
index 666a46f..7bc2b0d 100644
--- a/samples/Textured/main.cs
+++ b/samples/Textured/main.cs
@@ -108,7 +108,10 @@ namespace TextureSample {
cmds[i].End ();
}
}
- void recordDraw (CommandBuffer cmd, Framebuffer fb) {
+ void recordDraw (CommandBuffer cmd, Framebuffer fb) {
+ texture.SetLayout (cmd, VkImageAspectFlags.Color, VkImageLayout.Undefined, VkImageLayout.ShaderReadOnlyOptimal,
+ VkPipelineStageFlags.BottomOfPipe, VkPipelineStageFlags.FragmentShader);
+
pipeline.RenderPass.Begin (cmd, fb);
cmd.SetViewport (fb.Width, fb.Height);