gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 548 forks source link

Validation error in colour-uniform example #3625

Closed csnewman closed 3 years ago

csnewman commented 3 years ago

Short info header:

The following validation error is printed every frame in the colour-uniform example project.

cargo run --bin colour-uniform --features=vulkan

Chosen: AdapterInfo { name: "GeForce GTX 1050 Ti with Max-Q Design", vendor: 4318, device: 7308, device_type: DiscreteGpu }
AdapterInfo { name: "Intel(R) UHD Graphics 630", vendor: 32902, device: 16027, device_type: IntegratedGpu }
Limits { max_image_1d_size: 32768, max_image_2d_size: 32768, max_image_3d_size: 16384, max_image_cube_size: 32768, max_image_array_layers: 2048, max_texel_elements: 134217728, max_uniform_buffer_range: 65536, max_storage_buffer_range: 4294967295, max_push_constants_size: 256, max_memory_allocation_count: 4096, max_sampler_allocation_count: 4000, max_bound_descriptor_sets: 32, max_framebuffer_layers: 2048, max_per_stage_descriptor_samplers: 1048576, max_per_stage_descriptor_uniform_buffers: 15, max_per_stage_descriptor_storage_buffers: 1048576, max_per_stage_descriptor_sampled_images: 1048576, max_per_stage_descriptor_storage_images: 1048576, max_per_stage_descriptor_input_attachments: 1048576, max_per_stage_resources: 4294967295, max_descriptor_set_samplers: 1048576, max_descriptor_set_uniform_buffers: 90, max_descriptor_set_uniform_buffers_dynamic: 15, max_descriptor_set_storage_buffers: 1048576, max_descriptor_set_storage_buffers_dynamic: 16, max_descriptor_set_sampled_images: 1048576, max_descriptor_set_storage_images: 1048576, max_descriptor_set_input_attachments: 1048576, max_vertex_input_attributes: 32, max_vertex_input_bindings: 32, max_vertex_input_attribute_offset: 2047, max_vertex_input_binding_stride: 2048, max_vertex_output_components: 128, max_patch_size: 32, max_geometry_shader_invocations: 32, max_geometry_input_components: 128, max_geometry_output_components: 128, max_geometry_output_vertices: 1024, max_geometry_total_output_components: 1024, max_fragment_input_components: 128, max_fragment_output_attachments: 8, max_fragment_dual_source_attachments: 1, max_fragment_combined_output_resources: 16, max_compute_shared_memory_size: 49152, max_compute_work_group_count: [2147483647, 65535, 65535], max_compute_work_group_invocations: 1536, max_compute_work_group_size: [1536, 1024, 64], max_draw_indexed_index_value: 4294967295, max_draw_indirect_count: 4294967295, max_sampler_lod_bias: 15.0, max_sampler_anisotropy: 16.0, max_viewports: 16, max_viewport_dimensions: [32768, 32768], max_framebuffer_extent: Extent { width: 32768, height: 32768, depth: 2048 }, min_memory_map_alignment: 64, buffer_image_granularity: 1024, min_texel_buffer_offset_alignment: 16, min_uniform_buffer_offset_alignment: 256, min_storage_buffer_offset_alignment: 16, framebuffer_color_sample_counts: 15, framebuffer_depth_sample_counts: 15, framebuffer_stencil_sample_counts: 31, timestamp_compute_and_graphics: true, timestamp_period: 1.0, max_color_attachments: 8, standard_sample_locations: true, optimal_buffer_copy_offset_alignment: 1, optimal_buffer_copy_pitch_alignment: 1, non_coherent_atom_size: 64, min_vertex_input_binding_stride_alignment: 1, max_draw_mesh_tasks_count: 0, max_task_work_group_invocations: 0, max_task_work_group_size: [0, 0, 0], max_task_total_memory_size: 0, max_task_output_count: 0, max_mesh_work_group_invocations: 0, max_mesh_work_group_size: [0, 0, 0], max_mesh_total_memory_size: 0, max_mesh_output_vertices: 0, max_mesh_output_primitives: 0, max_mesh_multiview_view_count: 0, mesh_output_per_vertex_granularity: 0, mesh_output_per_primitive_granularity: 0 }
Memory types: [MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: (empty), heap_index: 1 }, MemoryType { properties: DEVICE_LOCAL, heap_index: 0 }, MemoryType { properties: CPU_VISIBLE | COHERENT, heap_index: 1 }, MemoryType { properties: CPU_VISIBLE | COHERENT | CPU_CACHED, heap_index: 1 }, MemoryType { properties: DEVICE_LOCAL | CPU_VISIBLE | COHERENT, heap_index: 2 }]
formats: Some([Bgra8Unorm, Bgra8Srgb, A2b10g10r10Unorm])
Surface format: Bgra8Srgb

Instructions:
        Choose whether to change the (R)ed, (G)reen or (B)lue color by pressing the appropriate key.
        Type in the value you want to change it to, where 0 is nothing, 255 is normal and 510 is double, ect.
        Then press C to change the (C)lear colour or (Enter) for the image color.
        Set Red color to: 0 (press enter/C to confirm)
[2021-01-31T18:19:14Z ERROR gfx_backend_vulkan]
    VALIDATION [VUID-vkResetCommandPool-commandPool-00040 (-1254218959)] : Validation Error: [ VUID-vkResetCommandPool-commandPool-00040 ] Object 0: handle = 0x1b997a0e008, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xb53e2331 | Attempt to reset command pool with VkCommandBuffer 0x1b997a0e008[] which is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://vulkan.lunarg.com/doc/view/1.2.162.1/windows/1.2-extensions/vkspec.html#VUID-vkResetCommandPool-commandPool-00040)
    cmd buf info: done
    object info: (type: COMMAND_BUFFER, hndl: 1896624480264)

[2021-01-31T18:19:14Z ERROR gfx_backend_vulkan]
    VALIDATION [VUID-vkResetCommandPool-commandPool-00040 (-1254218959)] : Validation Error: [ VUID-vkResetCommandPool-commandPool-00040 ] Object 0: handle = 0x1b997eceec8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xb53e2331 | Attempt to reset command pool with VkCommandBuffer 0x1b997eceec8[] which is in use. The Vulkan spec states: All VkCommandBuffer objects allocated from commandPool must not be in the pending state (https://vulkan.lunarg.com/doc/view/1.2.162.1/windows/1.2-extensions/vkspec.html#VUID-vkResetCommandPool-commandPool-00040)
    cmd buf info: done
    object info: (type: COMMAND_BUFFER, hndl: 1896629464776)
kvark commented 3 years ago

Interesting! Should be easy to fix.