-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix several regressions from recent rendering changes. #16890
Fix several regressions from recent rendering changes. #16890
Conversation
This commit fixes the following regressions: 1. Transmission-specific calls to shader lighting functions didn't pass the `enable_diffuse` parameter, breaking the `transmission` example. 2. The combination of bindless `StandardMaterial` and bindless lightmaps caused us to blow past the 128 texture limit on M1/M2 chips in some cases. gfx-rs/wgpu#3334 should fix this, but in the meantime this patch reduces the number of bindless lightmaps from 16 to 4 in order to stay under the limit. 3. The renderer was crashing on startup on Adreno 610 chips. This PR simply disables bindless on Adreno 610 and lower.
I've started an example-runner test run for this :) We should expect diffs though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not qualified to review most of the rendering changes, but:
- Confirmed that this fixes
depth_of_field
on my m1 mac - Confirmed that this fixes
transmission
- Changes related to Android make sense to me, but I can't test
- Didn't seem to cause any additional problems in the example run (but mobile screenshots are still not running?)
@@ -71,7 +72,7 @@ pub const LIGHTMAP_SHADER_HANDLE: Handle<Shader> = | |||
/// | |||
/// If bindless textures aren't in use, then only a single lightmap can be bound | |||
/// at a time. | |||
pub const LIGHTMAPS_PER_SLAB: usize = 16; | |||
pub const LIGHTMAPS_PER_SLAB: usize = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for the 4 specifically or is it just a nice number that happens to still work because it's small enough??
I haven't tested anything locally, but the changes LGTM |
This commit fixes the following regressions:
Transmission-specific calls to shader lighting functions didn't pass the
enable_diffuse
parameter, breaking thetransmission
example.The combination of bindless
StandardMaterial
and bindless lightmaps caused us to blow past the 128 texture limit on M1/M2 chips in some cases, in particular thedepth_of_field
example. Use Argument Buffers forbinding_array
on Metal gfx-rs/wgpu#3334 should fix this, but in the meantime this patch reduces the number of bindless lightmaps from 16 to 4 in order to stay under the limit.The renderer was crashing on startup on Adreno 610 chips. This PR simply disables bindless on Adreno 610 and lower.