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 | 03f4e53b4325cfd20dd27b0e2abe19f9bf7a2d2f (patch) | |
| tree | 20503056405af4c34e76c96f4e97baf712f52142 /samples/Textured | |
| parent | 3b913249486fd098f802112e836e0c1fe189b47e (diff) | |
set texture to shaderreadonly
Diffstat (limited to 'samples/Textured')
| -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); |