kvark / blade

Sharp and simple graphics library
MIT License
490 stars 31 forks source link

Rejected adapter is not printed out #111

Open theofficialgman opened 4 months ago

theofficialgman commented 4 months ago

llvmpipe is selected by blade instead of the hardware vulkan capable gpu

vulkaninfo

Devices:
========
GPU0:
    apiVersion         = 1.1.85
    driverVersion      = 32.3.1.0
    vendorID           = 0x10de
    deviceID           = 0x92ba03d7
    deviceType         = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
    deviceName         = NVIDIA Tegra X1 (nvgpu)
    driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
    driverName         = NVIDIA
    driverInfo         = 32.3.1
    conformanceVersion = 1.1.2.0
GPU1:
    apiVersion         = 1.3.274
    driverVersion      = 0.0.1
    vendorID           = 0x10005
    deviceID           = 0x0000
    deviceType         = PHYSICAL_DEVICE_TYPE_CPU
    deviceName         = llvmpipe (LLVM 17.0.6, 128 bits)
    driverID           = DRIVER_ID_MESA_LLVMPIPE
    driverName         = llvmpipe
    driverInfo         = Mesa 24.0.5-1ubuntu1 (LLVM 17.0.6)
    conformanceVersion = 1.3.1.1
    deviceUUID         = 6d657361-3234-2e30-2e35-2d3175627500
    driverUUID         = 6c6c766d-7069-7065-5555-494400000000

bunnymark with logging

gman@switch:/tmp/blade$ RUST_LOG=blade_graphics=debug RUST_BACKTRACE=1 cargo run --example bunnymark
    Finished dev [unoptimized + debuginfo] target(s) in 0.80s
     Running `target/debug/examples/bunnymark`
[2024-04-19T00:05:16Z WARN  blade_graphics::hal::init] Requested layer is not found: "VK_LAYER_KHRONOS_validation"
[2024-04-19T00:05:16Z DEBUG blade_graphics::hal::init] Bugs SystemBugs {
        intel_unable_to_present: false,
    }
[2024-04-19T00:05:16Z WARN  blade_graphics::hal::init] Rejected for device extension "VK_KHR_timeline_semaphore" not supported
[2024-04-19T00:05:16Z INFO  blade_graphics::hal::init] Adapter "llvmpipe (LLVM 17.0.6, 128 bits)"
[2024-04-19T00:05:16Z INFO  blade_graphics::hal::init] No ray tracing extensions are supported
[2024-04-19T00:05:16Z DEBUG blade_graphics::hal::init] Adapter AdapterCapabilities {
        api_version: 4206866,
        properties: PhysicalDeviceProperties {
            api_version: 4206866,
            driver_version: 1,
            vendor_id: 65541,
            device_id: 0,
            device_type: CPU,
            device_name: Ok(
                "llvmpipe (LLVM 17.0.6, 128 bits)",
            ),
            pipeline_cache_uuid: [
                50,
                52,
                46,
                48,
                46,
                53,
                45,
                49,
                117,
                98,
                117,
                110,
                116,
                117,
                49,
                97,
            ],
            limits: PhysicalDeviceLimits {
                max_image_dimension1_d: 16384,
                max_image_dimension2_d: 16384,
                max_image_dimension3_d: 4096,
                max_image_dimension_cube: 32768,
                max_image_array_layers: 2048,
                max_texel_buffer_elements: 134217728,
                max_uniform_buffer_range: 65536,
                max_storage_buffer_range: 134217728,
                max_push_constants_size: 256,
                max_memory_allocation_count: 4294967295,
                max_sampler_allocation_count: 32768,
                buffer_image_granularity: 64,
                sparse_address_space_size: 0,
                max_bound_descriptor_sets: 8,
                max_per_stage_descriptor_samplers: 1000000,
                max_per_stage_descriptor_uniform_buffers: 1000000,
                max_per_stage_descriptor_storage_buffers: 1000000,
                max_per_stage_descriptor_sampled_images: 1000000,
                max_per_stage_descriptor_storage_images: 1000000,
                max_per_stage_descriptor_input_attachments: 1000000,
                max_per_stage_resources: 1000000,
                max_descriptor_set_samplers: 1000000,
                max_descriptor_set_uniform_buffers: 1000000,
                max_descriptor_set_uniform_buffers_dynamic: 1000000,
                max_descriptor_set_storage_buffers: 1000000,
                max_descriptor_set_storage_buffers_dynamic: 1000000,
                max_descriptor_set_sampled_images: 1000000,
                max_descriptor_set_storage_images: 1000000,
                max_descriptor_set_input_attachments: 1000000,
                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_tessellation_generation_level: 64,
                max_tessellation_patch_size: 32,
                max_tessellation_control_per_vertex_input_components: 128,
                max_tessellation_control_per_vertex_output_components: 128,
                max_tessellation_control_per_patch_output_components: 128,
                max_tessellation_control_total_output_components: 4096,
                max_tessellation_evaluation_input_components: 128,
                max_tessellation_evaluation_output_components: 128,
                max_geometry_shader_invocations: 32,
                max_geometry_input_components: 64,
                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_src_attachments: 2,
                max_fragment_combined_output_resources: 104,
                max_compute_shared_memory_size: 32768,
                max_compute_work_group_count: [
                    65535,
                    65535,
                    65535,
                ],
                max_compute_work_group_invocations: 1024,
                max_compute_work_group_size: [
                    1024,
                    1024,
                    1024,
                ],
                sub_pixel_precision_bits: 8,
                sub_texel_precision_bits: 8,
                mipmap_precision_bits: 4,
                max_draw_indexed_index_value: 4294967295,
                max_draw_indirect_count: 4294967295,
                max_sampler_lod_bias: 16.0,
                max_sampler_anisotropy: 16.0,
                max_viewports: 16,
                max_viewport_dimensions: [
                    16384,
                    16384,
                ],
                viewport_bounds_range: [
                    -32768.0,
                    32768.0,
                ],
                viewport_sub_pixel_bits: 0,
                min_memory_map_alignment: 64,
                min_texel_buffer_offset_alignment: 16,
                min_uniform_buffer_offset_alignment: 16,
                min_storage_buffer_offset_alignment: 16,
                min_texel_offset: -32,
                max_texel_offset: 31,
                min_texel_gather_offset: -32,
                max_texel_gather_offset: 31,
                min_interpolation_offset: -2.0,
                max_interpolation_offset: 2.0,
                sub_pixel_interpolation_offset_bits: 8,
                max_framebuffer_width: 16384,
                max_framebuffer_height: 16384,
                max_framebuffer_layers: 2048,
                framebuffer_color_sample_counts: TYPE_1 | TYPE_4,
                framebuffer_depth_sample_counts: TYPE_1 | TYPE_4,
                framebuffer_stencil_sample_counts: TYPE_1 | TYPE_4,
                framebuffer_no_attachments_sample_counts: TYPE_1 | TYPE_4,
                max_color_attachments: 8,
                sampled_image_color_sample_counts: TYPE_1 | TYPE_4,
                sampled_image_integer_sample_counts: TYPE_1 | TYPE_4,
                sampled_image_depth_sample_counts: TYPE_1 | TYPE_4,
                sampled_image_stencil_sample_counts: TYPE_1 | TYPE_4,
                storage_image_sample_counts: TYPE_1 | TYPE_4,
                max_sample_mask_words: 1,
                timestamp_compute_and_graphics: 1,
                timestamp_period: 1.0,
                max_clip_distances: 8,
                max_cull_distances: 8,
                max_combined_clip_and_cull_distances: 8,
                discrete_queue_priorities: 2,
                point_size_range: [
                    0.0,
                    255.0,
                ],
                line_width_range: [
                    1.0,
                    255.0,
                ],
                point_size_granularity: 0.125,
                line_width_granularity: 0.0078125,
                strict_lines: 1,
                standard_sample_locations: 1,
                optimal_buffer_copy_offset_alignment: 128,
                optimal_buffer_copy_row_pitch_alignment: 128,
                non_coherent_atom_size: 64,
            },
            sparse_properties: PhysicalDeviceSparseProperties {
                residency_standard2_d_block_shape: 0,
                residency_standard2_d_multisample_block_shape: 0,
                residency_standard3_d_block_shape: 0,
                residency_aligned_mip_size: 0,
                residency_non_resident_strict: 0,
            },
        },
        queue_family_index: 0,
        layered: false,
        ray_tracing: false,
        buffer_marker: false,
        shader_info: false,
    }
[2024-04-19T00:05:16Z INFO  blade_graphics::hal::init] Using surface present mode MAILBOX
[2024-04-19T00:05:16Z DEBUG blade_graphics::shader] Processing vertex argument: vertex
[2024-04-19T00:05:16Z DEBUG blade_graphics::shader] Assigning location(0) for member 'pos' to be using input 0:0
[2024-04-19T00:05:16Z INFO  blade_graphics::hal::resource] Creating texture 0x55793b9310 of size 1x1x1 and format Rgba8Unorm, name 'texutre', handle 0
[2024-04-19T00:05:16Z INFO  blade_graphics::hal::resource] Creating buffer 0x55793cff60 of size 4, name 'staging', handle 1
[2024-04-19T00:05:16Z INFO  blade_graphics::hal::resource] Creating buffer 0x55794d26d0 of size 32, name 'vertex', handle 2
[2024-04-19T00:05:16Z INFO  blade_graphics::hal::resource] Destroying buffer 0x55793cff60, handle 1
Avg frame time 14.189078ms
[2024-04-19T00:05:17Z INFO  blade_graphics::hal::resource] Destroying buffer 0x55794d26d0, handle 2
[2024-04-19T00:05:17Z INFO  blade_graphics::hal::resource] Destroying texture 0x55793b9310, handle 0
theofficialgman commented 4 months ago

it seems that the hardware gpu was rejected due to missing a required extension

[2024-04-19T00:05:16Z WARN  blade_graphics::hal::init] Rejected for device extension "VK_KHR_timeline_semaphore" not supported

however the adapter in question that was rejected was never printed. that should be corrected.

kvark commented 4 months ago

Thanks for the report! Indeed it would be good to print the adapter being rejected. It would also be good if you could update the driver and verify if the extension is now present.