aboutsummaryrefslogtreecommitdiffstatsci
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
commit1c46bcec119e279e5d35b45912bf728e71acc197 (patch)
treed8399fc595d221ff20b7900ca702ba1fe4a6a49e
parent104e3117e0a0d1885d06821059099475c156380c (diff)
set texture to shaderreadonly
-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);