Commit 2fa1246
JoshJRive
fix(vulkan): Resolve driver crash on some mobile GPUs (#12403) 1deebb93aa
The tiled gms exposed a driver crash on some specific older mobile devices, which was due to the (valid) way we were binding samplers.
In order to work around this issue, in Vulkan the tesselate, atlas, grad, and image textures are now bound as COMBINED_IMAGE_SAMPLER so that the "immutable sampler" descriptor set goes away, as well as IMAGE_SAMPLER_IDX since now on (almost) all backends they're the same index (like with the other textures).
WebGPU, unfortunately, does not support combining samplers and textures into the same binding within a binding set, so it still uses separate indices for them (and a separate binding set for the immutable shaders like Vulkan used to), so it required some special-casing in the shaders (and adding some webgpu-specific shader compilations).
This also removes SAMPLER_MIPMAP which was unused, and renames TARGET_VULKAN to TARGET_SPIRV since that's a more-accurate name1 parent 4c735da commit 2fa1246
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Submodule rive-runtime updated 21 files
- .rive_head+1-1
- renderer/src/d3d11/render_context_d3d_impl.cpp+1-1
- renderer/src/metal/render_context_metal_impl.mm+2-2
- renderer/src/shaders/Makefile+21-8
- renderer/src/shaders/blit_texture_as_draw.glsl+3-2
- renderer/src/shaders/constants.glsl+14-9
- renderer/src/shaders/d3d/root.sig+1-1
- renderer/src/shaders/draw_mesh.frag+1-1
- renderer/src/shaders/draw_msaa_object.frag+1-1
- renderer/src/shaders/draw_path.vert-1
- renderer/src/shaders/draw_path_common.glsl+1-1
- renderer/src/shaders/glsl.glsl+30-19
- renderer/src/shaders/hlsl.glsl+2-2
- renderer/src/shaders/metal.glsl+2-2
- renderer/src/shaders/rhi.glsl+2-2
- renderer/src/vulkan/draw_pipeline_layout_vulkan.cpp+3-4
- renderer/src/vulkan/pipeline_manager_vulkan.cpp+10-80
- renderer/src/vulkan/pipeline_manager_vulkan.hpp-12
- renderer/src/vulkan/render_context_vulkan_impl.cpp+19-49
- renderer/src/vulkan/vkutil.cpp+1
- renderer/src/webgpu/render_context_webgpu_impl.cpp+51-51
0 commit comments