From c2b66a0882c69c30d5057382aa7ff4ef941a4ff0 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 30 Mar 2016 22:53:06 +0200 Subject: [PATCH] Another leak fix, buildfix --- GPU/Vulkan/DrawEngineVulkan.cpp | 1 + GPU/Vulkan/FramebufferVulkan.cpp | 4 ++-- GPU/Vulkan/FramebufferVulkan.h | 3 --- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 4ef9cd4e41..e700b8ee46 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -208,6 +208,7 @@ DrawEngineVulkan::~DrawEngineVulkan() { delete nullTexture_; } delete[] uvScale; + vkDestroyPipelineLayout(vulkan_->GetDevice(), pipelineLayout_, nullptr); } void DrawEngineVulkan::BeginFrame() { diff --git a/GPU/Vulkan/FramebufferVulkan.cpp b/GPU/Vulkan/FramebufferVulkan.cpp index f31c29370b..79dc059b71 100644 --- a/GPU/Vulkan/FramebufferVulkan.cpp +++ b/GPU/Vulkan/FramebufferVulkan.cpp @@ -341,7 +341,7 @@ void FramebufferManagerVulkan::DrawPixels(VirtualFramebuffer *vfb, int dstX, int vkCmdSetViewport(curCmd_, 0, 1, &vp); MakePixelTexture(srcPixels, srcPixelFormat, srcStride, width, height); - DrawActiveTexture(drawPixelsTex_, dstX, dstY, width, height, vfb->bufferWidth, vfb->bufferHeight, 0.0f, 0.0f, 1.0f, 1.0f, nullptr, ROTATION_LOCKED_HORIZONTAL); + DrawActiveTexture(drawPixelsTex_, dstX, dstY, width, height, vfb->bufferWidth, vfb->bufferHeight, 0.0f, 0.0f, 1.0f, 1.0f, pipelineBasicTex_, ROTATION_LOCKED_HORIZONTAL); textureCache_->ForgetLastTexture(); } @@ -455,7 +455,7 @@ void FramebufferManagerVulkan::DrawActiveTexture(VulkanTexture *texture, float x // TODO: Choose linear or nearest appropriately, see GL impl. vulkan2D_.BindDescriptorSet(cmd, texture->GetImageView(), linearSampler_); - vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineBasicTex_); + vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); VkBuffer vbuffer; VkDeviceSize offset = push->Push(vtx, sizeof(vtx), &vbuffer); vkCmdBindVertexBuffers(cmd, 0, 1, &vbuffer, &offset); diff --git a/GPU/Vulkan/FramebufferVulkan.h b/GPU/Vulkan/FramebufferVulkan.h index 5db9a8ce38..353a1f3eef 100644 --- a/GPU/Vulkan/FramebufferVulkan.h +++ b/GPU/Vulkan/FramebufferVulkan.h @@ -191,9 +191,6 @@ private: ShaderManagerVulkan *shaderManager_; DrawEngineVulkan *drawEngine_; - // Used for postprocessing tasks and in-render-pass plain 2D draws/blits. - VkPipelineLayout simplePipelineLayout_; - bool resized_; AsyncPBOVulkan *pixelBufObj_;