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

Use Argument Buffers for binding_array on Metal #3334

Closed
Tracked by #3637
cwfitzgerald opened this issue Dec 26, 2022 · 3 comments · Fixed by #6751
Closed
Tracked by #3637

Use Argument Buffers for binding_array on Metal #3334

cwfitzgerald opened this issue Dec 26, 2022 · 3 comments · Fixed by #6751
Labels
backend: metal Issues with Metal feature: bindless Issues with Bindless Native Feature type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Dec 26, 2022

This is a major change for our binding model on Mac, but would allow us to support bindless in it's true form by letting us bind up to a million textures and buffers on modern chips.

Argument buffers are unconditionally supported for our target, so we can just universally change the API usage.

This isn't true, it requires Mac 10.13 and WebGPU is minimum 10.12. There are also issues with write resources on tier 1 hardware. I suspect we should just use argument buffer for bindless arrays.

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request backend: metal Issues with Metal labels Dec 26, 2022
@kanerogers
Copy link

According to @cwfitzgerald WebGPU minimum is now 10.13, which should ameliorate the compatibility issues.

@kanerogers
Copy link

I've made some progress on this issue, which I've documented on the corresponding naga issue.

@cwfitzgerald
Copy link
Member Author

I think this can be scoped down to just rewriting the binding_array to argument buffers.

@cwfitzgerald cwfitzgerald changed the title Use Argument Buffers on Metal Use Argument Buffers for binding_array on Metal Dec 12, 2024
@cwfitzgerald cwfitzgerald added the feature: bindless Issues with Bindless Native Feature label Dec 14, 2024
pcwalton added a commit to pcwalton/bevy that referenced this issue Dec 18, 2024
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.
github-merge-queue bot pushed a commit to bevyengine/bevy that referenced this issue Dec 22, 2024
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, in particular the `depth_of_field` example.
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.
ecoskey pushed a commit to ecoskey/bevy that referenced this issue Jan 6, 2025
)

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, in particular the `depth_of_field` example.
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.
mrchantey pushed a commit to mrchantey/bevy that referenced this issue Feb 4, 2025
)

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, in particular the `depth_of_field` example.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: metal Issues with Metal feature: bindless Issues with Bindless Native Feature type: enhancement New feature or request
Projects
None yet
2 participants