mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-04 04:07:08 +00:00
Crash and leak fixes
This commit is contained in:
parent
9f918fd11b
commit
2b996db298
@ -85,6 +85,8 @@ FramebufferManagerVulkan::FramebufferManagerVulkan(VulkanContext *vulkan) :
|
||||
vulkan_(vulkan),
|
||||
drawPixelsTex_(nullptr),
|
||||
drawPixelsTexFormat_(GE_FORMAT_INVALID),
|
||||
convBuf_(nullptr),
|
||||
convBufSize_(0),
|
||||
textureCache_(nullptr),
|
||||
shaderManager_(nullptr),
|
||||
resized_(false),
|
||||
@ -267,13 +269,13 @@ void FramebufferManagerVulkan::MakePixelTexture(const u8 *srcPixels, GEBufferFor
|
||||
// Could share code with the texture cache perhaps.
|
||||
const uint8_t *data = srcPixels;
|
||||
if (srcPixelFormat != GE_FORMAT_8888 || srcStride != width) {
|
||||
data = convBuf_;
|
||||
u32 neededSize = width * height * 4;
|
||||
if (!convBuf_ || convBufSize_ < neededSize) {
|
||||
delete[] convBuf_;
|
||||
convBuf_ = new u8[neededSize];
|
||||
convBufSize_ = neededSize;
|
||||
}
|
||||
data = convBuf_;
|
||||
for (int y = 0; y < height; y++) {
|
||||
switch (srcPixelFormat) {
|
||||
case GE_FORMAT_565:
|
||||
|
@ -108,6 +108,7 @@ Vulkan2D::~Vulkan2D() {
|
||||
vulkan_->Delete().QueueDeleteDescriptorPool(frameData_[i].descPool);
|
||||
}
|
||||
vkDestroyDescriptorSetLayout(device, descriptorSetLayout_, nullptr);
|
||||
vkDestroyPipelineLayout(device, pipelineLayout_, nullptr);
|
||||
}
|
||||
|
||||
void Vulkan2D::BeginFrame() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user