SwapChain errors with wgpu applications
As noted in this comment, this is a low priority issue.
I compiled v3dv
#357bd7 on device and cross compiled wgpu-rs #8ac614 examples.
Many Sascha Willems demos work. wgpu
hello
and hello-compute
examples work. wgpu
examples that display something error on SwapChain
creation. The same error occurs in an upstream library, nannou. Hence, I suspect SwapChains are created differently by wgpu-rs
or something is wrong with cross compilation (libx11-dev:armhf
is 2:1.6.7-1
on raspberry vs 2:1.6.3-1ubuntu2.1
in cross container).
The following is a traced run of the cube
example's stdout/stderr and trace.ron
.
$ WGPU_TRACE=trace DISPLAY=:0 ./cube (empty lines stripped)
vk: error: v3dv_GetPhysicalDeviceProperties2: ignored VkStructureType 1000212000:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT
WARNING: v3dv is neither a complete nor a conformant Vulkan implementation. Testing use only.
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
vk: error: v3dv_GetPhysicalDeviceImageFormatProperties2: ignored VkStructureType 1000158002:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
thread 'main' panicked at 'Failed to acquire next swap chain texture!: Timeout', examples/cube/../framework.rs:280:25
trace/trace.ron
[
Init(
desc: (
features: (
bits: 0,
),
limits: (
max_bind_groups: 4,
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_uniform_buffer_binding_size: 16384,
max_push_constant_size: 0,
),
shader_validation: true,
),
backend: Vulkan,
),
CreateSwapChain(Id(0, 1, Vulkan), (
usage: (
bits: 16,
),
format: Bgra8UnormSrgb,
width: 800,
height: 600,
present_mode: Mailbox,
)),
CreateBuffer(Id(0, 1, Vulkan), (
label: "Vertex Buffer",
size: 580,
usage: (
bits: 40,
),
mapped_at_creation: false,
)),
WriteBuffer(
id: Id(0, 1, Vulkan),
data: "data1.bin",
range: (
start: 0,
end: 580,
),
queued: true,
),
CreateBuffer(Id(1, 1, Vulkan), (
label: "Index Buffer",
size: 76,
usage: (
bits: 24,
),
mapped_at_creation: false,
)),
WriteBuffer(
id: Id(1, 1, Vulkan),
data: "data2.bin",
range: (
start: 0,
end: 76,
),
queued: true,
),
CreateBindGroupLayout(Id(0, 1, Vulkan), (
label: None,
entries: [
(
binding: 0,
visibility: (
bits: 1,
),
ty: UniformBuffer(
dynamic: false,
min_binding_size: Some(64),
),
count: None,
),
(
binding: 1,
visibility: (
bits: 2,
),
ty: SampledTexture(
dimension: D2,
component_type: Float,
multisampled: false,
),
count: None,
),
(
binding: 2,
visibility: (
bits: 2,
),
ty: Sampler(
comparison: false,
),
count: None,
),
],
)),
CreatePipelineLayout(Id(0, 1, Vulkan), (
bind_group_layouts: [
Id(0, 1, Vulkan),
],
push_constant_ranges: [],
)),
CreateTexture(Id(0, 1, Vulkan), (
label: "",
size: (
width: 256,
height: 256,
depth: 1,
),
mip_level_count: 1,
sample_count: 1,
dimension: D2,
format: Rgba8UnormSrgb,
usage: (
bits: 6,
),
)),
CreateTextureView(
id: Id(0, 1, Vulkan),
parent_id: Id(0, 1, Vulkan),
desc: None,
),
WriteTexture(
to: (
texture: Id(0, 1, Vulkan),
mip_level: 0,
origin: (
x: 0,
y: 0,
z: 0,
),
),
data: "data3.bin",
layout: (
offset: 0,
bytes_per_row: 1024,
rows_per_image: 0,
),
size: (
width: 256,
height: 256,
depth: 1,
),
),
CreateSampler(Id(0, 1, Vulkan), (
label: "",
address_mode_u: ClampToEdge,
address_mode_v: ClampToEdge,
address_mode_w: ClampToEdge,
mag_filter: Nearest,
min_filter: Linear,
mipmap_filter: Nearest,
lod_min_clamp: 0,
lod_max_clamp: 340282350000000000000000000000000000000,
compare: None,
anisotropy_clamp: None,
)),
CreateBuffer(Id(2, 1, Vulkan), (
label: "Uniform Buffer",
size: 68,
usage: (
bits: 72,
),
mapped_at_creation: false,
)),
WriteBuffer(
id: Id(2, 1, Vulkan),
data: "data4.bin",
range: (
start: 0,
end: 68,
),
queued: true,
),
CreateBindGroup(Id(0, 1, Vulkan), (
label: None,
layout: Id(0, 1, Vulkan),
entries: [
(
binding: 0,
resource: Buffer((
buffer_id: Id(2, 1, Vulkan),
offset: 0,
size: None,
)),
),
(
binding: 1,
resource: TextureView(Id(0, 1, Vulkan)),
),
(
binding: 2,
resource: Sampler(Id(0, 1, Vulkan)),
),
],
)),
CreateShaderModule(
id: Id(0, 1, Vulkan),
data: "data5.spv",
),
CreateShaderModule(
id: Id(1, 1, Vulkan),
data: "data6.spv",
),
CreateRenderPipeline(Id(0, 1, Vulkan), (
layout: Id(0, 1, Vulkan),
vertex_stage: (
module: Id(0, 1, Vulkan),
entry_point: "main",
),
fragment_stage: Some((
module: Id(1, 1, Vulkan),
entry_point: "main",
)),
rasterization_state: Some((
front_face: Ccw,
cull_mode: Back,
clamp_depth: false,
depth_bias: 0,
depth_bias_slope_scale: 0,
depth_bias_clamp: 0,
)),
primitive_topology: TriangleList,
color_states: [
(
format: Bgra8UnormSrgb,
alpha_blend: (
src_factor: One,
dst_factor: Zero,
operation: Add,
),
color_blend: (
src_factor: One,
dst_factor: Zero,
operation: Add,
),
write_mask: (
bits: 15,
),
),
],
depth_stencil_state: None,
vertex_state: (
index_format: Uint16,
vertex_buffers: [
(
stride: 24,
step_mode: Vertex,
attributes: [
(
offset: 0,
format: Float4,
shader_location: 0,
),
(
offset: 16,
format: Float2,
shader_location: 1,
),
],
),
],
),
sample_count: 1,
sample_mask: 4294967295,
alpha_to_coverage_enabled: false,
)),
DestroyShaderModule(Id(1, 1, Vulkan)),
DestroyShaderModule(Id(0, 1, Vulkan)),
WriteBuffer(
id: Id(2, 1, Vulkan),
data: "data7.bin",
range: (
start: 0,
end: 64,
),
queued: true,
),
CreateSwapChain(Id(0, 1, Vulkan), (
usage: (
bits: 16,
),
format: Bgra8UnormSrgb,
width: 800,
height: 600,
present_mode: Mailbox,
)),
GetSwapChainTexture(
id: None,
parent_id: Id(0, 1, Vulkan),
),
CreateSwapChain(Id(0, 1, Vulkan), (
usage: (
bits: 16,
),
format: Bgra8UnormSrgb,
width: 800,
height: 600,
present_mode: Mailbox,
)),
GetSwapChainTexture(
id: None,
parent_id: Id(0, 1, Vulkan),
),
]
The pixel format looks fine. I attached the other binaries in trace/
. A cursory look is appreciated!