roderickc / wine-vulkan

Other
53 stars 7 forks source link

Vulkan extensions missing with latest master #10

Closed ChristophHaag closed 6 years ago

ChristophHaag commented 6 years ago

See this issue: https://github.com/doitsujin/dxvk/issues/44

Tl;dr: running with wine-vulkan b31f4a1b66803f88edc78507d7d16240ddf08d58, almost all the Device extensions are missing:

vulkaninfo.exe with wine-vulkan:

Device Extensions   count = 1
    VK_KHR_swapchain                    : extension revision 68

native linux vulkaninfo:

Device Extensions   count = 28
    VK_KHR_bind_memory2                 : extension revision  1
    VK_KHR_dedicated_allocation         : extension revision  1
    VK_KHR_descriptor_update_template   : extension revision  1
    VK_KHR_external_fence               : extension revision  1
    VK_KHR_external_fence_fd            : extension revision  1
    VK_KHR_external_memory              : extension revision  1
    VK_KHR_external_memory_fd           : extension revision  1
    VK_KHR_external_semaphore           : extension revision  1
    VK_KHR_external_semaphore_fd        : extension revision  1
    VK_KHR_get_memory_requirements2     : extension revision  1
    VK_KHR_image_format_list            : extension revision  1
    VK_KHR_incremental_present          : extension revision  1
    VK_KHR_maintenance1                 : extension revision  1
    VK_KHR_maintenance2                 : extension revision  1
    VK_KHR_push_descriptor              : extension revision  1
    VK_KHR_relaxed_block_layout         : extension revision  1
    VK_KHR_sampler_mirror_clamp_to_edge : extension revision  1
    VK_KHR_shader_draw_parameters       : extension revision  1
    VK_KHR_storage_buffer_storage_class : extension revision  1
    VK_KHR_swapchain                    : extension revision 68
    VK_KHR_variable_pointers            : extension revision  1
    VK_KHX_multiview                    : extension revision  1
    VK_EXT_discard_rectangles           : extension revision  1
    VK_EXT_external_memory_dma_buf      : extension revision  1
    VK_EXT_global_priority              : extension revision  1
    VK_AMD_draw_indirect_count          : extension revision  1
    VK_AMD_rasterization_order          : extension revision  1
    VK_AMD_shader_info                  : extension revision  1

That's with latest radv git on RX 480.

Otherwise vulkan seems to work, i.e. the cube.exe demo runs fine.

roderickc commented 6 years ago

Correct extensions are currently missing. Many are about to be added soon up to vulkan 1.51 due to licensing issues (hopefully resolved soon).

The main goal so far has been to get the core in a good state. Even without extensions Wolfenstein and other games look stunning though.

On Feb 1, 2018 9:07 AM, "Christoph Haag" notifications@github.com wrote:

See this issue: doitsujin/dxvk#44 https://github.com/doitsujin/dxvk/issues/44

Tl;dr: running with wine-vulkan b31f4a1 https://github.com/roderickc/wine-vulkan/commit/b31f4a1b66803f88edc78507d7d16240ddf08d58, almost all the Device extensions are missing:

vulkaninfo.exe with wine-vulkan:

Device Extensions count = 1 VK_KHR_swapchain : extension revision 68

native linux vulkaninfo:

Device Extensions count = 28 VK_KHR_bind_memory2 : extension revision 1 VK_KHR_dedicated_allocation : extension revision 1 VK_KHR_descriptor_update_template : extension revision 1 VK_KHR_external_fence : extension revision 1 VK_KHR_external_fence_fd : extension revision 1 VK_KHR_external_memory : extension revision 1 VK_KHR_external_memory_fd : extension revision 1 VK_KHR_external_semaphore : extension revision 1 VK_KHR_external_semaphore_fd : extension revision 1 VK_KHR_get_memory_requirements2 : extension revision 1 VK_KHR_image_format_list : extension revision 1 VK_KHR_incremental_present : extension revision 1 VK_KHR_maintenance1 : extension revision 1 VK_KHR_maintenance2 : extension revision 1 VK_KHR_push_descriptor : extension revision 1 VK_KHR_relaxed_block_layout : extension revision 1 VK_KHR_sampler_mirror_clamp_to_edge : extension revision 1 VK_KHR_shader_draw_parameters : extension revision 1 VK_KHR_storage_buffer_storage_class : extension revision 1 VK_KHR_swapchain : extension revision 68 VK_KHR_variable_pointers : extension revision 1 VK_KHX_multiview : extension revision 1 VK_EXT_discard_rectangles : extension revision 1 VK_EXT_external_memory_dma_buf : extension revision 1 VK_EXT_global_priority : extension revision 1 VK_AMD_draw_indirect_count : extension revision 1 VK_AMD_rasterization_order : extension revision 1 VK_AMD_shader_info : extension revision 1

That's with latest radv git on RX 480.

Otherwise vulkan seems to work, i.e. the cube.exe demo runs fine.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/roderickc/wine-vulkan/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/ATd3y-3ZvVXsIiWVbREOXT1GqGu9-9L7ks5tQe9EgaJpZM4R19ZG .

ChristophHaag commented 6 years ago

Did you recently remove them? Because people with older wine-vulkan builds could run dxvk stuff, but now it just complains about missing extensions. I have not tried to use dxvk with wine-vulkan before so I don't really know how it behaved previously.

warn:  DxgiAdapter: DXGI_FORMAT_D24_UNORM_S8_UINT -> VK_FORMAT_D32_SFLOAT_S8_UINT
info:  D3D11CreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
err:   Required Vulkan extension VK_KHR_maintenance1 not supported
warn:  Vulkan extension VK_KHR_maintenance2 not supported
err:   Required Vulkan extension VK_KHR_shader_draw_parameters not supported
err:   DxvkAdapter: Failed to create device
err:   D3D11CreateDevice: Failed to create DXGI device
Failed to create D3D11 device
roderickc commented 6 years ago

I kind of removed extensions, but it was more a side effect that they were there. Basically I forgot to filter the device extension enumeration api. Before it exposed extensions even when I lacked the api wrappers for calling convention conversion.

In other words I exposed extensions, but except for the ones, which didn't add apis they would fail.

On Feb 1, 2018 9:16 AM, "Christoph Haag" notifications@github.com wrote:

Did you recently remove them? Because people with older wine-vulkan builds could run dxvk stuff, but now it just complains about missing extensions. I have not tried to use dxvk with wine-vulkan before so I don't really know how it behaved previously.

warn: DxgiAdapter: DXGI_FORMAT_D24_UNORM_S8_UINT -> VK_FORMAT_D32_SFLOAT_S8_UINT info: D3D11CreateDevice: Probing D3D_FEATURE_LEVEL_11_0 info: D3D11CreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0 err: Required Vulkan extension VK_KHR_maintenance1 not supported warn: Vulkan extension VK_KHR_maintenance2 not supported err: Required Vulkan extension VK_KHR_shader_draw_parameters not supported err: DxvkAdapter: Failed to create device err: D3D11CreateDevice: Failed to create DXGI device Failed to create D3D11 device

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/roderickc/wine-vulkan/issues/10#issuecomment-362337398, or mute the thread https://github.com/notifications/unsubscribe-auth/ATd3y3fbCUP4BeFFiOaRhSJPI00pHaUbks5tQfGEgaJpZM4R19ZG .

doitsujin commented 6 years ago

None of the extensions used in DXVK (except for VK_KHR_swapchain) actually add new Vulkan functions, so it worked fine with previous builds of wine-vulkan. Exposing them should not cause any issues.

roderickc commented 6 years ago

I will add the extensions. I just need to sanity check my changes as not all extensions are safe to expose as some are not just type changes or simple pass-through.

Even if an extension only exposes new types they often need at least struct conversion for 32bit.

roderickc commented 6 years ago

The maintenance2 extension is likely tricky. There are many new types and they are not in vulkan 1.0.51 as the extension was added in 1.0.61 I think. I bet many of the structs also need conversion for use on 32bit.

roderickc commented 6 years ago

I have added support for various extensions I can safely add from vk.xml from 1.0.51.

Just for reference the reason I can't add other extensions if they don't add new functions is because of struct alignment differences between 32-bit windows and linux, which happen in many structures. See all the conversion nightmare in vulkan_thunks.c.

I can't support past Vulkan 1.0.51 which has I think some of the extensions you want, because past 1.0.51 vk.xml is Apache licensed as opposed to BSD. I'm working with Khronos on resolving this, but it is a slow process.

pingubot commented 6 years ago

@roderickc :thanks for your super fast action :) . I can use dxvk again now. So the really mandatory extensions seem to work now. Not sure if perf are anything else is affected by not having all of the wanted extensions available.

roderickc commented 6 years ago

I removed a few more extensions (NVX / KHX) as they are experimental, but they should not affect dxvk I think. Let me know if things still work. Also wine-vulkan is now on Wine 3.1 as well.

pingubot commented 6 years ago

did some quick tests and dxvk still seems to work. hope you can get 1.0.65 with extensions upand running soon :)

roderickc commented 6 years ago

Thanks marking this issue as resolved then :)