Skip to content

Vulkan: Avoid allocating depth images for stuff like temp copies, depal buffers etc.#16099

Merged
unknownbrackets merged 2 commits into
masterfrom
vulkan-dont-always-alloc-depth
Sep 25, 2022
Merged

Vulkan: Avoid allocating depth images for stuff like temp copies, depal buffers etc.#16099
unknownbrackets merged 2 commits into
masterfrom
vulkan-dont-always-alloc-depth

Conversation

@hrydgard

@hrydgard hrydgard commented Sep 24, 2022

Copy link
Copy Markdown
Owner

Pretty small memory savings, but good to do and pretty easy now. Other backends already do this.

An interesting extension of this would upconvert framebuffers in the FramebufferManager to have a depth buffer the first time depth is used on them, but this doesn't do that yet.

…al buffers etc.

Pretty small impact, but good to do.

An interesting extension of this would upconvert framebuffers in the
FramebufferManager to have a depth buffer the first time depth is used on them,
but this doesn't do that yet.
@hrydgard hrydgard added this to the v1.14.0 milestone Sep 24, 2022
CreateImage(vulkan_, initCmd, depth, width, height, vulkan_->GetDeviceInfo().preferredDepthStencilFormat, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, false, tag);
vulkan_->SetDebugName(depth.image, VK_OBJECT_TYPE_IMAGE, StringFromFormat("fb_depth_%s", tag).c_str());
} else {
NOTICE_LOG(G3D, "creating target without depth: %dx%d", _width, _height);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe should reduce level or remove?

-[Unknown]

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that wasn't meant to be committed, oops...

…, for fb clut + fb texture. Plus a couple asserts.
@unknownbrackets unknownbrackets merged commit e6db0be into master Sep 25, 2022
@unknownbrackets unknownbrackets deleted the vulkan-dont-always-alloc-depth branch September 25, 2022 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants