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

HiZ Buffer issues on Integrated GPUs (Intel, Apple Silicon) #940

Open
SRSaunders opened this issue Nov 7, 2024 · 0 comments
Open

HiZ Buffer issues on Integrated GPUs (Intel, Apple Silicon) #940

SRSaunders opened this issue Nov 7, 2024 · 0 comments

Comments

@SRSaunders
Copy link

SRSaunders commented Nov 7, 2024

When the Hierarchical Depth Buffer is enabled (either for the old SSAO, or the new Filmic Post FX passes), I see problems on Integrated GPUs as follows:

  1. On the master branch when running Vulkan on Linux + Intel iGPU: Game crashes after loading a level with a device lost error.
  2. On the push constants branch when running Vulkan on M1 Apple Silicon GPU: Game crashes after loading a level with device out of memory followed by device lost errors. I suspect this one does not show up on the master branch since the code is far too slow over there (< 10 fps). To get a reassonable frame rate I have to test on the push constants branch.

If I set r_useHierarchicalDepthBuffers = 0 the problem goes away for both cases above. I have looked at the mipmapgen shader code and played with the parameters a bit, but I don't see anything obviously wrong, other than potential memory issues. I am wondering whether there is a subtle sync + resource release delay problem that is exposed on iGPUs that are slower and have more limited memory.

If you don't want to research this, I can easily patch it by adding the following code to DeviceManager_VK.cpp:

	if( !otherGPUs.empty() )
	{
--->		//FIXME: On integrated GPUs disable HiZ buffer to avoid device out of memory/lost errors
--->		r_useHierarchicalDepthBuffer.SetBool( false );

		m_VulkanPhysicalDevice = otherGPUs[0];
		return true;
	}

Please let me know what you want to do with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant