mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Merge pull request #8654 from unknownbrackets/vulkan-leaks
Plug some Vulkan leaks
This commit is contained in:
commit
3dcdd4b533
@ -1240,12 +1240,14 @@ void VulkanContext::DestroyFramebuffers() {
|
||||
}
|
||||
|
||||
void VulkanContext::DestroySurfaceRenderPass() {
|
||||
vkDestroyRenderPass(device_, surface_render_pass_, NULL);
|
||||
vkDestroyRenderPass(device_, surface_render_pass_, NULL);
|
||||
surface_render_pass_ = NULL;
|
||||
}
|
||||
|
||||
void VulkanContext::DestroyDevice() {
|
||||
vkDestroyDevice(device_, NULL);
|
||||
// If there happen to be any pending deletes, now is a good time.
|
||||
Delete().PerformDeletes(device_);
|
||||
vkDestroyDevice(device_, NULL);
|
||||
device_ = NULL;
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,13 @@ SoftGPU::~SoftGPU() {
|
||||
vformat = nullptr;
|
||||
fbTex->Release();
|
||||
fbTex = nullptr;
|
||||
|
||||
vdata->Release();
|
||||
vdata = nullptr;
|
||||
idata->Release();
|
||||
idata = nullptr;
|
||||
depth->Release();
|
||||
depth = nullptr;
|
||||
}
|
||||
|
||||
void SoftGPU::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) {
|
||||
|
@ -192,6 +192,11 @@ Thin3DContext::~Thin3DContext() {
|
||||
ssPresets_[i]->Release();
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < SAMPS_MAX_PRESET; i++) {
|
||||
if (sampsPresets_[i]) {
|
||||
sampsPresets_[i]->Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static T3DImageFormat ZimToT3DFormat(int zim) {
|
||||
|
@ -194,10 +194,12 @@ public:
|
||||
bool Compile(VulkanContext *vulkan, const char *source);
|
||||
const std::string &GetSource() const { return source_; }
|
||||
~Thin3DVKShader() {
|
||||
vkDestroyShaderModule(device_, module_, nullptr);
|
||||
}
|
||||
VkShaderModule Get() const { return module_; }
|
||||
|
||||
private:
|
||||
VkDevice device_;
|
||||
VkShaderModule module_;
|
||||
VkShaderStageFlagBits stage_;
|
||||
bool ok_;
|
||||
@ -205,6 +207,8 @@ private:
|
||||
};
|
||||
|
||||
bool Thin3DVKShader::Compile(VulkanContext *vulkan, const char *source) {
|
||||
// We'll need this to free it later.
|
||||
device_ = vulkan->GetDevice();
|
||||
this->source_ = source;
|
||||
std::vector<uint32_t> spirv;
|
||||
if (!GLSLtoSPV(stage_, source, spirv)) {
|
||||
|
Loading…
Reference in New Issue
Block a user