wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

"Failed to find an appropriate adapter" when running example

Open ModProg opened this issue 1 year ago • 5 comments

Description Running the hello_triangle example, I get a white window and then exits with a panic: "Failed to find an appropriate adapter."

Platform Windows 11 Dual Graphics with an Intel Core i5-4210U Intel HD Graphics 4400 and an NVIDIA GeForce GT 840M.

logs
PS E:\> .\wgpu-examples.exe hello_triangle
[2024-01-30T19:18:15Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_swapchain_colorspace
[2024-01-30T19:18:15Z WARN  wgpu_hal::vulkan::instance] Unable to find extension: VK_KHR_get_physical_device_properties2
[2024-01-30T19:18:15Z DEBUG wgpu_hal::vulkan::instance] Instance version: 0x400000
[2024-01-30T19:18:15Z INFO  wgpu_hal::vulkan::instance] Debug utils not enabled: debug_utils_user_data not passed to Instance::from_raw
[2024-01-30T19:18:15Z DEBUG wgpu_core::instance] Instance::new: created Vulkan backend
[2024-01-30T19:18:15Z DEBUG wgpu_hal::dx12::instance] Using FXC for shader compilation
[2024-01-30T19:18:15Z DEBUG wgpu_core::instance] Instance::new: created Dx12 backend
[2024-01-30T19:18:16Z DEBUG wgpu_core::instance] Instance::new: created Gl backend
[2024-01-30T19:18:16Z TRACE wgpu_core::storage] User is inserting SurfaceId(0,1,_)
[2024-01-30T19:18:16Z TRACE wgpu_core::instance] Instance::request_adapter
[2024-01-30T19:18:16Z WARN  wgpu_hal::vulkan::adapter] viewport Y-flip is not supported, hiding adapter: 840M
[2024-01-30T19:18:16Z DEBUG wgpu_hal::gles::adapter] Vendor: Intel
[2024-01-30T19:18:16Z DEBUG wgpu_hal::gles::adapter] Renderer: Intel(R) HD Graphics 4400
[2024-01-30T19:18:16Z DEBUG wgpu_hal::gles::adapter] Version: 4.3.0 - Build 20.19.15.4531
[2024-01-30T19:18:16Z TRACE wgpu_hal::gles::adapter] Profile: Compatibility
[2024-01-30T19:18:16Z DEBUG wgpu_hal::gles::adapter] SL version: 4.30 - Build 20.19.15.4531
[2024-01-30T19:18:16Z DEBUG wgpu_hal::gles::adapter] Supported GL Extensions: {
        "GL_ARB_shader_storage_buffer_object",
        "WGL_ARB_framebuffer_sRGB",
        "GL_ARB_shadow",
        "GL_EXT_texture_integer",
        "GL_ARB_point_parameters",
        "GL_EXT_blend_color",
        "GL_EXT_abgr",
        "GL_ARB_occlusion_query",
        "GL_ARB_texture_rectangle",
        "GL_ARB_draw_elements_base_vertex",
        "GL_EXT_blend_subtract",
        "GL_EXT_texture_storage",
        "GL_ARB_framebuffer_no_attachments",
        "GL_ARB_conservative_depth",
        "GL_EXT_framebuffer_object",
        "GL_ARB_texture_env_add",
        "GL_EXT_texture_swizzle",
        "WGL_EXT_extensions_string",
        "WGL_ARB_create_context",
        "GL_ARB_transpose_matrix",
        "GL_ARB_draw_buffers",
        "GL_EXT_texture_shared_exponent",
        "GL_ARB_internalformat_query",
        "GL_ARB_texture_multisample",
        "GL_ARB_vertex_type_2_10_10_10_rev",
        "GL_ARB_internalformat_query2",
        "GL_ARB_separate_shader_objects",
        "GL_ARB_shader_precision",
        "GL_EXT_secondary_color",
        "GL_ARB_texture_env_combine",
        "GL_ARB_draw_buffers_blend",
        "GL_ARB_window_pos",
        "GL_ARB_texture_non_power_of_two",
        "GL_ARB_texture_compression",
        "GL_ARB_texture_query_levels",
        "WGL_NV_DX_interop2",
        "GL_ARB_texture_float",
        "GL_ARB_map_buffer_range",
        "GL_EXT_multi_draw_arrays",
        "GL_EXT_clip_volume_hint",
        "GL_EXT_blend_equation_separate",
        "GL_NV_conditional_render",
        "GL_ARB_texture_buffer_range",
        "GL_ARB_shader_bit_encoding",
        "GL_ARB_vertex_array_object",
        "GL_ARB_gpu_shader5",
        "GL_EXT_texture_snorm",
        "GL_EXT_rescale_normal",
        "GL_ARB_vertex_attrib_64bit",
        "GL_ARB_compressed_texture_pixel_storage",
        "GL_ARB_query_buffer_object",
        "WGL_NV_DX_interop",
        "GL_ARB_sample_shading",
        "GL_ARB_map_buffer_alignment",
        "GL_EXT_draw_range_elements",
        "GL_ARB_depth_buffer_float",
        "GL_ARB_compatibility",
        "GL_EXT_texture_lod_bias",
        "GL_NV_blend_square",
        "GL_EXT_blend_func_separate",
        "GL_ARB_vertex_buffer_object",
        "GL_EXT_stencil_two_side",
        "GL_ARB_seamless_cubemap_per_texture",
        "GL_ARB_fragment_program_shadow",
        "GL_ARB_draw_instanced",
        "GL_WIN_swap_hint",
        "GL_ARB_texture_env_dot3",
        "GL_ARB_texture_swizzle",
        "GL_ARB_shader_image_load_store",
        "GL_ARB_fragment_layer_viewport",
        "GL_EXT_gpu_shader4",
        "GL_ARB_clear_texture",
        "GL_ARB_debug_output",
        "WGL_ARB_pixel_format",
        "GL_ARB_geometry_shader4",
        "GL_3DFX_texture_compression_FXT1",
        "GL_EXT_stencil_wrap",
        "GL_NV_texgen_reflection",
        "GL_ARB_tessellation_shader",
        "GL_ARB_indirect_parameters",
        "WGL_ARB_make_current_read",
        "WGL_EXT_swap_control",
        "GL_ARB_arrays_of_arrays",
        "WGL_ARB_create_context_profile",
        "GL_EXT_packed_pixels",
        "GL_KHR_debug",
        "GL_EXT_direct_state_access",
        "GL_INTEL_map_texture",
        "GL_ARB_fragment_shader_interlock",
        "GL_ARB_draw_indirect",
        "GL_ARB_texture_stencil8",
        "GL_ARB_sampler_objects",
        "GL_ARB_uniform_buffer_object",
        "GL_EXT_framebuffer_multisample",
        "GL_EXT_shader_integer_mix",
        "WGL_ARB_create_context_robustness",
        "GL_ARB_copy_image",
        "GL_ARB_texture_query_lod",
        "GL_EXT_texture_compression_s3tc",
        "GL_EXT_geometry_shader4",
        "GL_ARB_vertex_array_bgra",
        "GL_ARB_shader_image_size",
        "GL_ARB_occlusion_query2",
        "GL_AMD_vertex_shader_viewport_index",
        "GL_ARB_clear_buffer_object",
        "WGL_ARB_pixel_format_float",
        "WGL_ARB_multisample",
        "GL_INTEL_performance_query",
        "GL_ARB_invalidate_subdata",
        "GL_EXT_texture_sRGB",
        "GL_EXT_transform_feedback",
        "GL_ARB_clip_control",
        "GL_ARB_ES3_compatibility",
        "GL_ARB_stencil_texturing",
        "GL_ARB_shader_subroutine",
        "GL_ARB_base_instance",
        "GL_ARB_ES2_compatibility",
        "GL_ARB_sync",
        "GL_ARB_texture_view",
        "GL_ARB_texture_compression_rgtc",
        "GL_ARB_seamless_cube_map",
        "GL_ARB_point_sprite",
        "GL_ARB_texture_cube_map",
        "GL_ARB_program_interface_query",
        "WGL_ARB_extensions_string",
        "WGL_EXT_pixel_format_packed_float",
        "GL_ARB_texture_mirror_clamp_to_edge",
        "WGL_EXT_create_context_es2_profile",
        "GL_EXT_texture_rectangle",
        "GL_ARB_vertex_type_10f_11f_11f_rev",
        "GL_ARB_transform_feedback2",
        "GL_EXT_compiled_vertex_array",
        "GL_EXT_blend_minmax",
        "GL_SGIS_texture_edge_clamp",
        "GL_ARB_timer_query",
        "GL_EXT_polygon_offset_clamp",
        "GL_ARB_enhanced_layouts",
        "GL_ARB_texture_mirrored_repeat",
        "GL_ARB_multi_draw_indirect",
        "GL_ARB_multitexture",
        "GL_EXT_packed_depth_stencil",
        "GL_ARB_texture_barrier",
        "GL_EXT_texture_env_combine",
        "GL_ARB_texture_cube_map_array",
        "WGL_EXT_create_context_es_profile",
        "GL_ARB_framebuffer_sRGB",
        "WGL_EXT_depth_float",
        "WGL_INTEL_cl_sharing",
        "GL_ARB_multisample",
        "GL_ARB_viewport_array",
        "WGL_EXT_swap_control_tear",
        "GL_ARB_texture_gather",
        "GL_EXT_timer_query",
        "GL_ARB_fragment_coord_conventions",
        "GL_ARB_shading_language_420pack",
        "GL_AMD_vertex_shader_layer",
        "GL_ARB_vertex_attrib_binding",
        "GL_ARB_buffer_storage",
        "GL_EXT_packed_float",
        "GL_EXT_bgra",
        "GL_SUN_multi_draw_arrays",
        "GL_ARB_texture_rg",
        "GL_EXT_gpu_program_parameters",
        "GL_ARB_vertex_program",
        "GL_SGIS_generate_mipmap",
        "GL_ARB_copy_buffer",
        "GL_NV_primitive_restart",
        "GL_ARB_texture_storage_multisample",
        "GL_ARB_robust_buffer_access_behavior",
        "GL_EXT_texture_sRGB_decode",
        "GL_ARB_instanced_arrays",
        "GL_EXT_texture_env_add",
        "GL_EXT_texture_edge_clamp",
        "GL_IBM_texture_mirrored_repeat",
        "GL_ATI_separate_stencil",
        "GL_ARB_shader_objects",
        "GL_ARB_vertex_shader",
        "GL_ARB_texture_buffer_object_rgb32",
        "GL_EXT_separate_specular_color",
        "GL_ARB_texture_border_clamp",
        "GL_ARB_get_program_binary",
        "GL_EXT_texture3D",
        "GL_KHR_blend_equation_advanced",
        "GL_SGIS_texture_lod",
        "GL_ARB_compute_shader",
        "GL_ARB_pixel_buffer_object",
        "GL_ARB_half_float_vertex",
        "GL_ARB_color_buffer_float",
        "GL_ARB_depth_clamp",
        "GL_ARB_shading_language_100",
        "GL_INTEL_fragment_shader_ordering",
        "GL_ARB_cl_event",
        "GL_ARB_explicit_attrib_location",
        "GL_EXT_texture_filter_anisotropic",
        "GL_ARB_texture_env_crossbar",
        "GL_ARB_multi_bind",
        "GL_ARB_half_float_pixel",
        "GL_EXT_framebuffer_blit",
        "GL_EXT_texture_array",
        "GL_ARB_transform_feedback_instanced",
        "GL_ARB_blend_func_extended",
        "GL_ARB_shading_language_packing",
        "GL_EXT_shadow_funcs",
        "GL_ARB_fragment_shader",
        "GL_ARB_depth_texture",
        "GL_ARB_explicit_uniform_location",
        "GL_EXT_fog_coord",
        "GL_ARB_gpu_shader_fp64",
        "GL_ARB_shader_atomic_counters",
        "GL_ARB_texture_rgb10_a2ui",
        "GL_ARB_texture_storage",
        "GL_ARB_robustness",
        "GL_EXT_draw_buffers2",
        "WGL_ARB_buffer_region",
        "WGL_ARB_pbuffer",
        "GL_ARB_fragment_program",
        "GL_ARB_texture_compression_bptc",
        "GL_ARB_provoking_vertex",
        "GL_ARB_transform_feedback3",
        "GL_ARB_framebuffer_object",
    }
[2024-01-30T19:18:16Z WARN  wgpu_hal::gles::adapter] Max vertex attribute stride unknown. Assuming it is 2048
thread 'main' panicked at 'Failed to find an appropriate adapter', examples/src/hello_triangle/mod.rs:24:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2024-01-30T19:18:16Z TRACE wgpu_core::global] Global::drop
PS E:\>

ModProg avatar Jan 30 '24 19:01 ModProg

same issue on my old archlinux laptop.

wgpu version: 0.19.1

device info:

AdapterInfo { name: "AMD Radeon R5 M435 (RADV HAINAN)", vendor: 4098, device: 26213, device_type: DiscreteGpu, driver: "radv", driver_info: "Mesa 23.3.5-arch1.1", backend: Vulkan }

wgpu 0.18 no issue

alexniver avatar Feb 25 '24 09:02 alexniver

wgpu 0.19.4

[2024-04-27T09:31:23Z WARN wgpu_hal::vulkan::adapter] Adapter is not Vulkan compliant, hiding adapter: AMD Radeon HD 8500M (RADV HAINAN)

vulkaninfo.txt

msparkles avatar Apr 27 '24 09:04 msparkles

there were a few fixes around surface creation which may affect what adapters can be chosen but we can't backport then since there's some api breaking changes interwoven. Do any of these still show up with the latest version on main?

Wumpf avatar Apr 27 '24 14:04 Wumpf

there were a few fixes around surface creation which may affect what adapters can be chosen but we can't backport then since there's some api breaking changes interwoven. Do any of these still show up with the latest version on main?

on my old computer and branch trunk this issue fixed. here is out put

Compiling wgpu-examples v0.20.0 (/home/dev/github/wgpu/examples)
    Finished dev [unoptimized + debuginfo] target(s) in 2m 04s
     Running `target/debug/wgpu-examples hello_triangle`
WARNING: radv is not a conformant Vulkan implementation, testing use only.

alexniver avatar Apr 30 '24 09:04 alexniver

I will try next week when I have access to the old windows laptop of mine, but sounds promising.

ModProg avatar Apr 30 '24 11:04 ModProg

https://github.com/gfx-rs/wgpu/pull/5535 most likely fixed this, please reopen if that's not the case.

teoxoy avatar Jul 03 '24 16:07 teoxoy