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

[REGRESSION] Attempting to bind a descriptor set (4) greater than what the hardware supports (4) #97341

Closed
darksylinc opened this issue Sep 22, 2024 · 1 comment · Fixed by #97554

Comments

@darksylinc
Copy link
Contributor

darksylinc commented Sep 22, 2024

Tested versions

  • Reproducible in 4.4-dev
  • Not Reproducible in 4.3

System information

Godot v4.4.dev (e4e024a) - Ubuntu 20.04.6 LTS (Focal Fossa) on X11 - X11 display driver, Multi-window, 2 monitors - Vulkan (Mobile) - dedicated AMD Radeon RX 6800 XT (RADV NAVI21) - AMD Ryzen 9 5900X 12-Core Processor (24 threads)

Issue description

When Godot is launched on a GPU where physical_device_properties.limits.maxBoundDescriptorSets = 4, Godot will crash, first spamming the error:

ERROR: Attempting to bind a descriptor set (4) greater than what the hardware supports (4).
   at: draw_list_bind_uniform_set (servers/rendering/rendering_device.cpp:3937)

and then more errors that are consequence of that.

This regression was introduced in PR #92797
commit a657ea4 by introducing INSTANCE_DATA_UNIFORM_SET = 4.

I'm afraid the minimum guaranteed value is physical_device_properties.limits.maxBoundDescriptorSets = 4 (very common in mobile) therefore this PR should either disable itself or be refactored to not use slot >= 4.

@DarioSamo tells me that this work was done because Push Constants were saturated.

However my next PR will involve TheForge's changes that move data out of push constants into UBOs. Perhaps this issue could be solved by leveraging such solution?

Steps to reproduce

  1. Run Godot in a GPU where physical_device_properties.limits.maxBoundDescriptorSets = 4, like most Android phones.
  2. Alternatively edit Godot to force it to think maxBoundDescriptorSets = 4:

In rendering_device_driver_vulkan.cpp

Error RenderingDeviceDriverVulkan::initialize(uint32_t p_device_index, uint32_t p_frame_count) {
	context_device = context_driver->device_get(p_device_index);
	physical_device = context_driver->physical_device_get(p_device_index);
	vkGetPhysicalDeviceProperties(physical_device, &physical_device_properties);
	physical_device_properties.limits.maxBoundDescriptorSets = 4; // This line is new.

Minimal reproduction project (MRP)

N / A

Godot crashes right away (see steps to reproduce).

@darksylinc
Copy link
Contributor Author

Aside from this, once this is fixed; I should submit a PR that forces maxBoundDescriptorSets = 4, so that we catch this problem early in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Immediate Blocker
Development

Successfully merging a pull request may close this issue.

4 participants