diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-05-04 03:16:52 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-05-04 03:16:52 +0200 |
| commit | 1c46bcec119e279e5d35b45912bf728e71acc197 (patch) | |
| tree | d8399fc595d221ff20b7900ca702ba1fe4a6a49e | |
| parent | 104e3117e0a0d1885d06821059099475c156380c (diff) | |
set texture to shaderreadonly
| -rw-r--r-- | samples/Textured/main.cs | 5 |
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); |