Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Sep 25, 2022

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Sep 24, 2022

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
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
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.

None yet

2 participants