private void ClearIfRenderTarget() { // If the image is going to be used as a render target, we need to clear the data before its first use. if ((Usage & TextureUsage.RenderTarget) != 0) { _gd.ClearColorTexture(this, new VkClearColorValue(0, 0, 0, 0)); } else if ((Usage & TextureUsage.DepthStencil) != 0) { _gd.ClearDepthTexture(this, new VkClearDepthStencilValue(0, 0)); } }