Permalink
Browse files

More buildfixes, warning fix, memory leak fix

  • Loading branch information...
hrydgard committed Oct 26, 2017
1 parent ecad09d commit 73125762396fc4246a77fd25cfd4f451f96ce056
View
@@ -317,12 +317,13 @@ void GPU_D3D11::EndHostFrame() {
}
void GPU_D3D11::BeginFrameInternal() {
GPUCommon::BeginFrameInternal();
textureCacheD3D11_->StartFrame();
drawEngine_.BeginFrame();
depalShaderCache_->Decimate();
// fragmentTestCache_.Decimate();
GPUCommon::BeginFrameInternal();
shaderManagerD3D11_->DirtyLastShader();
framebufferManagerD3D11_->BeginFrame();
View
@@ -295,7 +295,7 @@ void GPU_DX9::BeginFrameInternal() {
GPUCommon::BeginFrameInternal();
shaderManagerDX9_->DirtyShader();
framebufferManagerDX9_->BeginFrame();
framebufferManager_->BeginFrame();
}
void GPU_DX9::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) {
@@ -242,7 +242,7 @@ void DrawEngineVulkan::FrameData::Destroy(VulkanContext *vulkan) {
}
void DrawEngineVulkan::DestroyDeviceObjects() {
for (int i = 0; i < 2; i++) {
for (int i = 0; i < VulkanContext::MAX_INFLIGHT_FRAMES; i++) {
frame_[i].Destroy(vulkan_);
}
if (depalSampler_ != VK_NULL_HANDLE)
@@ -60,20 +60,23 @@ void CreateImage(VulkanContext *vulkan, VkCommandBuffer cmd, VKRImage &img, int
res = vkCreateImageView(vulkan->GetDevice(), &ivci, nullptr, &img.imageView);
assert(res == VK_SUCCESS);
VkPipelineStageFlagBits dstStage;
VkPipelineStageFlags dstStage;
VkAccessFlagBits dstAccessMask;
switch (initialLayout) {
case VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL:
dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
dstStage = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT;
dstStage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
break;
case VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL:
dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
dstStage = VK_PIPELINE_STAGE_TRANSFER_BIT;
break;
case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
dstAccessMask = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
dstStage = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT;
dstStage = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT;
break;
default:
Crash();
break;
}
@@ -645,7 +648,7 @@ VkImageView VulkanRenderManager::BindFramebufferAsTexture(VKRFramebuffer *fb, in
void VulkanRenderManager::Flush() {
curRenderStep_ = nullptr;
curFramebuffer_ = VK_N;
curFramebuffer_ = VK_NULL_HANDLE;
int curFrame = vulkan_->GetCurFrame();
FrameData &frameData = frameData_[curFrame];
if (frameData.hasInitCommands) {

0 comments on commit 7312576

Please sign in to comment.