Closed parasyte closed 2 years ago
I just tried the ash
triangle example, and it crashes in the same manner. (Had to install Vulkan Validation Layers to run this example.)
I disabled the vulkan
backend entirely with the patch below, and the gles
backend works, mostly!
disable-vulkan.patch
With this patch, wgpu-info
prints:
Adapter 0:
Backend: Gl
Name: "D3D12 (NVIDIA GeForce RTX 3090)"
VendorID: 0
DeviceID: 0
Type: DiscreteGpu
Compliant: false
Features:
DEPTH_CLIP_CONTROL: true
TEXTURE_COMPRESSION_BC: false
INDIRECT_FIRST_INSTANCE: false
TIMESTAMP_QUERY: false
PIPELINE_STATISTICS_QUERY: false
MAPPABLE_PRIMARY_BUFFERS: false
TEXTURE_BINDING_ARRAY: false
BUFFER_BINDING_ARRAY: false
STORAGE_RESOURCE_BINDING_ARRAY: false
SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING: false
UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING: false
PARTIALLY_BOUND_BINDING_ARRAY: false
UNSIZED_BINDING_ARRAY: false
MULTI_DRAW_INDIRECT: false
MULTI_DRAW_INDIRECT_COUNT: false
PUSH_CONSTANTS: false
ADDRESS_MODE_CLAMP_TO_BORDER: false
POLYGON_MODE_LINE: false
POLYGON_MODE_POINT: false
TEXTURE_COMPRESSION_ETC2: true
TEXTURE_COMPRESSION_ASTC_LDR: false
TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES: true
SHADER_FLOAT64: false
VERTEX_ATTRIBUTE_64BIT: false
CONSERVATIVE_RASTERIZATION: false
VERTEX_WRITABLE_STORAGE: false
CLEAR_COMMANDS: true
SPIRV_SHADER_PASSTHROUGH: false
SHADER_PRIMITIVE_INDEX: false
MULTIVIEW: false
Limits:
Max Texture Dimension 1d: 16384
Max Texture Dimension 2d: 16384
Max Texture Dimension 3d: 1024
Max Texture Array Layers: 16384
Max Bind Groups: 8
Max Dynamic Uniform Buffers Per Pipeline Layout: 12
Max Dynamic Storage Buffers Per Pipeline Layout: 0
Max Sampled Textures Per Shader Stage: 16
Max Samplers Per Shader Stage: 16
Max Storage Buffers Per Shader Stage: 0
Max Storage Textures Per Shader Stage: 0
Max Uniform Buffers Per Shader Stage: 12
Max Uniform Buffer Binding Size: 65536
Max Storage Buffer Binding Size: 0
Max Vertex Buffers: 16
Max Vertex Attributes: 16
Max Vertex Buffer Array Stride: 4294967295
Max Push Constant Size: 0
Min Uniform Buffer Offset Alignment: 256
Min Storage Buffer Offset Alignment: 256
Max Compute Workgroup Size X: 0
Max Compute Workgroup Size Y: 0
Max Compute Workgroup Size Z: 0
Max Compute Workgroups Per Dimmension: 0
Downlevel Properties:
Shader Model: Sm5
COMPUTE_SHADERS: false
FRAGMENT_WRITABLE_STORAGE: false
INDIRECT_EXECUTION: false
BASE_VERTEX: false
READ_ONLY_DEPTH_STENCIL: false
DEVICE_LOCAL_IMAGE_COPIES: true
NON_POWER_OF_TWO_MIPMAPPED_TEXTURES: true
CUBE_ARRAY_TEXTURES: true
COMPARISON_SAMPLERS: true
INDEPENDENT_BLENDING: true
VERTEX_STORAGE: false
ANISOTROPIC_FILTERING: false
FRAGMENT_STORAGE: false
You should be able to disable Vulkan by just changing the flags passed to wgpu::Instance::new
, without any code changes.
Good thing to call out! I tried the WGPU_BACKEND
env var without success but didn't realize that hello-triangle
does not use the framework: https://github.com/gfx-rs/wgpu/blob/943145b4df9dd4c0bc236a76ef96acd13c46fead/wgpu/examples/framework.rs#L125-L127
I do know that wgpu-info
is hardcoded with all backends, though. https://github.com/gfx-rs/wgpu/blob/943145b4df9dd4c0bc236a76ef96acd13c46fead/wgpu-info/src/main.rs#L104
For me, need to install sudo apt-get install libxcursor-dev libegl1
to get rendering on x11 working. Wayland still not working for me because of a random error in winit.
Instance { context: Context { type: "Native" } }
AdapterInfo { name: "D3D12 (NVIDIA GeForce RTX 3050 Laptop GPU)", vendor: 0, device: 0, device_type: DiscreteGpu, backend: Gl }
Also installed kisak-mesa, but currently didn't really know if it was really needed.
Update: Uninstalled kisak-mesa again and seems to be working as before with default packages.
Update2: To get wayland working for me, I need to install libxkbcommon-dev libegl1 libwayland-dev
.
Updating Mesa fixes the segfault. In short:
$ sudo add-apt-repository ppa:kisak/kisak-mesa
$ sudo apt update
$ sudo apt upgrade
Not a wgpu
bug! 🎉
always got the following err 2022-03-09T14:16:35.695354Z ERROR wgpu_hal::vulkan::instance: GENERAL [Loader Message (0x0)] setupLoaderTermPhysDevs: Failed to detect any valid GPUs in the current config any idea how to fix it?
Description
I was excited to finally try out WSLg on Windows 11, but it just crashes in the Vulkan driver.
Repro steps
Run the
hello-triangle
example (main branch) on Ubuntu 20.04, making sure to follow the instructions provided in the Microsoft article. (Also,winit
requires thelibxkbcommon-dev
to workaround https://github.com/rust-windowing/winit/issues/1760)The
x11-apps
do work:xcalc
,xclock
,xedit
,xeyes
,xlogo
...Expected vs observed behavior
Here's a backtrace from
gdb
:Extra materials
N/A
Platform
510.06
GPU shows up in Ubuntu as: