Skip to content

Enable SHADER_F16 feature only when available#3183

Merged
hecrj merged 1 commit intoiced-rs:masterfrom
playtron-os:fix/webgl
Jan 19, 2026
Merged

Enable SHADER_F16 feature only when available#3183
hecrj merged 1 commit intoiced-rs:masterfrom
playtron-os:fix/webgl

Conversation

@Ericky14
Copy link
Copy Markdown

@Ericky14 Ericky14 commented Jan 6, 2026

Recent Shader_F16 broke WASM, this should fix it

@miredirex
Copy link
Copy Markdown

miredirex commented Jan 7, 2026

And it also broke WGPU_BACKEND=dx12 cargo run on Windows somehow, even though I'm on a very modern Nvidia GPU. Haven't tested with this PR, just rolled back to commit fd25ff1 for the time being. Attached some logs:

Logs
(...there is more wgpu debug logs above that I decided not to include...)

[DEBUG wgpu_core::instance] Found 3 compatible adapters. Sorted by preference:
[DEBUG wgpu_core::instance] * AdapterInfo { name: "NVIDIA GeForce RTX 4070 Ti SUPER", vendor: 4318, device: 9989, device_type: DiscreteGpu, driver: "32.0.15.8180", driver_info: "", backend: Dx12 }
[DEBUG wgpu_core::instance] * AdapterInfo { name: "Intel(R) UHD Graphics 770", vendor: 32902, device: 42880, device_type: IntegratedGpu, driver: "32.0.101.7040", driver_info: "", backend: Dx12 }
[DEBUG wgpu_core::instance] * AdapterInfo { name: "Microsoft Basic Render Driver", vendor: 5140, device: 140, device_type: Cpu, driver: "10.0.26100.7309", driver_info: "", backend: Dx12 }
[DEBUG wgpu_core::instance] Request adapter result AdapterInfo { name: "NVIDIA GeForce RTX 4070 Ti SUPER", vendor: 4318, device: 9989, device_type: DiscreteGpu, driver: "32.0.15.8180", driver_info: "", backend: Dx12 }
[INFO  iced_wgpu::window::compositor] Selected: AdapterInfo {
        name: "NVIDIA GeForce RTX 4070 Ti SUPER",
        vendor: 4318,
        device: 9989,
        device_type: DiscreteGpu,
        driver: "32.0.15.8180",
        driver_info: "",
        backend: Dx12,
    }
[INFO  iced_wgpu::window::compositor] Available formats: Copied {
        it: Iter(
            [
                Bgra8UnormSrgb,
                Rgba8UnormSrgb,
                Bgra8Unorm,
                Rgba8Unorm,
                Rgb10a2Unorm,
                Rgba16Float,
            ],
        ),
    }
[INFO  iced_wgpu::window::compositor] Available alpha modes: [
        Opaque,
    ]
[INFO  iced_wgpu::window::compositor] Selected format: Bgra8Unorm with alpha mode: Auto
Error: GraphicsCreationFailed(GraphicsAdapterNotFound { backend: "wgpu", reason: RequestFailed("no device request succeeded: [(Limits { max_texture_dimension_1d: 8192, max_texture_dimension_2d: 8192, max_texture_dimension_3d: 2048, max_texture_array_layers: 256, max_bind_groups: 2, max_bindings_per_bind_group: 1000, max_dynamic_uniform_buffers_per_pipeline_layout: 8, max_dynamic_storage_buffers_per_pipeline_layout: 4, max_sampled_textures_per_shader_stage: 16, max_samplers_per_shader_stage: 16, max_storage_buffers_per_shader_stage: 8, max_storage_textures_per_shader_stage: 4, max_uniform_buffers_per_shader_stage: 12, max_binding_array_elements_per_shader_stage: 0, max_binding_array_sampler_elements_per_shader_stage: 0, max_uniform_buffer_binding_size: 65536, max_storage_buffer_binding_size: 134217728, max_vertex_buffers: 8, max_buffer_size: 268435456, max_vertex_attributes: 16, max_vertex_buffer_array_stride: 2048, min_uniform_buffer_offset_alignment: 256, min_storage_buffer_offset_alignment: 256, max_inter_stage_shader_components: 60, max_color_attachments: 8, max_color_attachment_bytes_per_sample: 32, max_compute_workgroup_storage_size: 16384, max_compute_invocations_per_workgroup: 256, max_compute_workgroup_size_x: 256, max_compute_workgroup_size_y: 256, max_compute_workgroup_size_z: 64, max_compute_workgroups_per_dimension: 65535, min_subgroup_size: 0, max_subgroup_size: 0, max_push_constant_size: 0, max_non_sampler_bindings: 2048, max_task_workgroup_total_count: 0, max_task_workgroups_per_dimension: 0, max_mesh_output_layers: 0, max_mesh_multiview_count: 0, max_blas_primitive_count: 0, max_blas_geometry_count: 0, max_tlas_instance_count: 0, max_acceleration_structures_per_shader_stage: 0 }, RequestDeviceError { inner: Core(UnsupportedFeature(Features { features_wgpu: FeaturesWGPU(0x0), features_webgpu: FeaturesWebGPU(SHADER_F16) })) }), (Limits { max_texture_dimension_1d: 2048, max_texture_dimension_2d: 2048, max_texture_dimension_3d: 256, max_texture_array_layers: 256, max_bind_groups: 2, max_bindings_per_bind_group: 1000, max_dynamic_uniform_buffers_per_pipeline_layout: 8, max_dynamic_storage_buffers_per_pipeline_layout: 4, max_sampled_textures_per_shader_stage: 16, max_samplers_per_shader_stage: 16, max_storage_buffers_per_shader_stage: 4, max_storage_textures_per_shader_stage: 4, max_uniform_buffers_per_shader_stage: 12, max_binding_array_elements_per_shader_stage: 0, max_binding_array_sampler_elements_per_shader_stage: 0, max_uniform_buffer_binding_size: 16384, max_storage_buffer_binding_size: 134217728, max_vertex_buffers: 8, max_buffer_size: 268435456, max_vertex_attributes: 16, max_vertex_buffer_array_stride: 2048, min_uniform_buffer_offset_alignment: 256, min_storage_buffer_offset_alignment: 256, max_inter_stage_shader_components: 60, max_color_attachments: 4, max_color_attachment_bytes_per_sample: 32, max_compute_workgroup_storage_size: 16352, max_compute_invocations_per_workgroup: 256, max_compute_workgroup_size_x: 256, max_compute_workgroup_size_y: 256, max_compute_workgroup_size_z: 64, max_compute_workgroups_per_dimension: 65535, min_subgroup_size: 0, max_subgroup_size: 0, max_push_constant_size: 0, max_non_sampler_bindings: 2048, max_task_workgroup_total_count: 0, max_task_workgroups_per_dimension: 0, max_mesh_output_layers: 0, max_mesh_multiview_count: 0, max_blas_primitive_count: 0, max_blas_geometry_count: 0, max_tlas_instance_count: 0, max_acceleration_structures_per_shader_stage: 0 }, RequestDeviceError { inner: Core(UnsupportedFeature(Features { features_wgpu: FeaturesWGPU(0x0), features_webgpu: FeaturesWebGPU(SHADER_F16) })) })]") })
error: process didn't exit successfully: `target\debug\program.exe` (exit code: 1)

@badosu
Copy link
Copy Markdown

badosu commented Jan 19, 2026

Maybe related: squidowl/halloy#1411 (comment)

Edit: I tested and confirmed that the PR fixes the issue above for me. Polaris architecture amd gpus should be affected as well (mine is RX580).

@hecrj hecrj added this to the 0.15 milestone Jan 19, 2026
@hecrj hecrj added bug Something isn't working rendering wgpu fix labels Jan 19, 2026
@hecrj hecrj enabled auto-merge January 19, 2026 21:34
@hecrj hecrj changed the title Make shader_f16 optional because it does not work in webgl Enable SHADER_F16 feature only when available Jan 19, 2026
@hecrj hecrj merged commit c443802 into iced-rs:master Jan 19, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix rendering wgpu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants