protonscr

DXVK 1.1.1 broke "hacky" MoltenVK support..

dxvkclosed
doitsujin/dxvk#1077 · opened 2019-05-25 by oscarbg · updated 2019-08-14 · 10 comments · github
Ooscarbg 2019-05-25 github

until recently DXVK+MoltenVK was working..
but now using latest MoltenVK 1.0.35 with the "known patches" for getting MoltenVK support i.e. advertising:

 _features.shaderCullDistance = true;
 _features.geometryShader = true;
 _features.logicOp = true;

at least d3d11-triangle was working OK..

since DXVK 1.1.1 it fails:

[mvk-error] VK_ERROR_FEATURE_NOT_PRESENT: vkCreateEvent(): Vukan events are not supported.
err:   DXVK: Failed to create query reset event

as MoltenVK doesn't support event APIs like: vkCreateEvent..

I'm in doubt if it DXVK version>1.1 uses events (vkCreateEvent()) unconditionally or if it's because since recently MoltenVK exposes VK_EXT_host_query_reset and in that case it calls vkCreateEvent..
What's the recommended path asking to MoltenVK devs to support event calls or some fix in DXVK for MoltenVK case..
thanks..

Ddoitsujin maintainer 2019-05-25 github

So, are you using a MoltenVK version that supports VK_EXT_host_query_reset? If not, there's your problem.
Also, why not post the DXVK logs?

Note that event queries still require Vulkan events, so anything using those isn't going to work.

Ooscarbg 2019-05-25 github

yes it supports VK_EXT_host_query_reset as I'm using MoltenVK compiled from master yesterday (so it reports 1.0.35).. and since 1.0.34 VK_EXT_host_query_reset is supported..
See:
https://github.com/KhronosGroup/MoltenVK/releases/tag/v1.0.34
"Support the VK_EXT_host_query_reset extension."

I attach full log below altough is not much use (also DXVK log is mixed with MoltenVK log)..
we need also:
export MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE=1
with that DXVK 1.0 for ex runs:
dxvk10
but with DXVK 1.1.1 I get log:

wine d3d11-triangle

info:  Game: d3d11-triangle.exe
info:  DXVK: v1.1.1
warn:  OpenVR: Failed to locate module
info:  Enabled instance extensions:
info:    VK_KHR_get_physical_device_properties2
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
[mvk-info] MoltenVK version 1.0.35. Vulkan version 1.0.106.
	The following 33 Vulkan extensions are supported:
		VK_KHR_16bit_storage v1
		VK_KHR_8bit_storage v1
		VK_KHR_bind_memory2 v1
		VK_KHR_dedicated_allocation v3
		VK_KHR_descriptor_update_template v1
		VK_KHR_get_memory_requirements2 v1
		VK_KHR_get_physical_device_properties2 v1
		VK_KHR_get_surface_capabilities2 v1
		VK_KHR_image_format_list v1
		VK_KHR_maintenance1 v2
		VK_KHR_maintenance2 v1
		VK_KHR_maintenance3 v1
		VK_KHR_push_descriptor v2
		VK_KHR_relaxed_block_layout v1
		VK_KHR_sampler_mirror_clamp_to_edge v1
		VK_KHR_shader_draw_parameters v1
		VK_KHR_shader_float16_int8 v1
		VK_KHR_storage_buffer_storage_class v1
		VK_KHR_surface v25
		VK_KHR_swapchain v70
		VK_KHR_swapchain_mutable_format v1
		VK_KHR_variable_pointers v1
		VK_EXT_debug_report v9
		VK_EXT_host_query_reset v1
		VK_EXT_memory_budget v1
		VK_EXT_shader_viewport_index_layer v1
		VK_EXT_vertex_attribute_divisor v3
		VK_EXTX_portability_subset v1
		VK_MVK_macos_surface v2
		VK_MVK_moltenvk v20
		VK_AMD_gpu_shader_half_float v1
		VK_AMD_negative_viewport_height v1
		VK_NV_glsl_shader v1
[mvk-error] VK_ERROR_INCOMPATIBLE_DRIVER: Request for Vulkan version 1.1.0 is not compatible with supported version 1.0.106.
[mvk-info] GPU device:
		model: AMD Radeon RX Vega 64
		type: Discrete
		vendorID: 0x1002
		deviceID: 0x687f
		pipelineCacheUUID: 00002733-0000-2715-C125-BBD2482815F2
	supports Metal Shading Language version 2.1 and the following Metal Feature Sets:
		macOS GPU Family 2 v1
		macOS GPU Family 1 v4
		macOS GPU Family 1 v3
		macOS GPU Family 1 v2
		macOS GPU Family 1 v1
[mvk-info] Created VkInstance with the following 3 Vulkan extensions enabled:
		VK_KHR_get_physical_device_properties2 v1
		VK_KHR_surface v25
		VK_MVK_macos_surface v2
004a:err:vulkan:wine_vkCreateInstance Failed to create instance, res=-9
warn:  Failed to create Vulkan 1.1 instance, falling back to 1.0
[mvk-info] MoltenVK version 1.0.35. Vulkan version 1.0.106.
	The following 33 Vulkan extensions are supported:
		VK_KHR_16bit_storage v1
		VK_KHR_8bit_storage v1
		VK_KHR_bind_memory2 v1
		VK_KHR_dedicated_allocation v3
		VK_KHR_descriptor_update_template v1
		VK_KHR_get_memory_requirements2 v1
		VK_KHR_get_physical_device_properties2 v1
		VK_KHR_get_surface_capabilities2 v1
		VK_KHR_image_format_list v1
		VK_KHR_maintenance1 v2
		VK_KHR_maintenance2 v1
		VK_KHR_maintenance3 v1
		VK_KHR_push_descriptor v2
		VK_KHR_relaxed_block_layout v1
		VK_KHR_sampler_mirror_clamp_to_edge v1
		VK_KHR_shader_draw_parameters v1
		VK_KHR_shader_float16_int8 v1
		VK_KHR_storage_buffer_storage_class v1
		VK_KHR_surface v25
		VK_KHR_swapchain v70
		VK_KHR_swapchain_mutable_format v1
		VK_KHR_variable_pointers v1
		VK_EXT_debug_report v9
		VK_EXT_host_query_reset v1
		VK_EXT_memory_budget v1
		VK_EXT_shader_viewport_index_layer v1
		VK_EXT_vertex_attribute_divisor v3
		VK_EXTX_portability_subset v1
		VK_MVK_macos_surface v2
		VK_MVK_moltenvk v20
		VK_AMD_gpu_shader_half_float v1
		VK_AMD_negative_viewport_height v1
		VK_NV_glsl_shader v1
[mvk-info] GPU device:
		model: AMD Radeon RX Vega 64
		type: Discrete
		vendorID: 0x1002
		deviceID: 0x687f
		pipelineCacheUUID: 00002733-0000-2715-C125-BBD2482815F2
	supports Metal Shading Language version 2.1 and the following Metal Feature Sets:
		macOS GPU Family 2 v1
		macOS GPU Family 1 v4
		macOS GPU Family 1 v3
		macOS GPU Family 1 v2
		macOS GPU Family 1 v1
[mvk-info] Created VkInstance with the following 3 Vulkan extensions enabled:
		VK_KHR_get_physical_device_properties2 v1
		VK_KHR_surface v25
		VK_MVK_macos_surface v2
info:  AMD Radeon RX Vega 64:
info:    Driver: 0.2.1843
info:    Vulkan: 1.0.106
info:    Memory Heap[0]: 
info:      Size: 8176 MiB
info:      Flags: 0x1
info:      Memory Type[0]: Property Flags = 0x1
info:      Memory Type[1]: Property Flags = 0xb
info:      Memory Type[2]: Property Flags = 0xf
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
info:  Enabled device extensions:
info:    VK_EXT_shader_viewport_index_layer
info:    VK_EXT_vertex_attribute_divisor
info:    VK_KHR_dedicated_allocation
info:    VK_KHR_descriptor_update_template
info:    VK_KHR_get_memory_requirements2
info:    VK_KHR_image_format_list
info:    VK_KHR_maintenance1
info:    VK_KHR_maintenance2
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_shader_draw_parameters
info:    VK_KHR_swapchain
004a:fixme:vulkan:wine_vk_device_convert_create_info Application requested a linked structure of type 0x3b9db032.
[mvk-info] Created VkDevice to run on GPU AMD Radeon RX Vega 64 with the following 11 Vulkan extensions enabled:
		VK_KHR_dedicated_allocation v3
		VK_KHR_descriptor_update_template v1
		VK_KHR_get_memory_requirements2 v1
		VK_KHR_image_format_list v1
		VK_KHR_maintenance1 v2
		VK_KHR_maintenance2 v1
		VK_KHR_sampler_mirror_clamp_to_edge v1
		VK_KHR_shader_draw_parameters v1
		VK_KHR_swapchain v70
		VK_EXT_shader_viewport_index_layer v1
		VK_EXT_vertex_attribute_divisor v3
info:  DXVK: Read 0 valid state cache entries
info:  DXVK: Using 2 compiler threads
[mvk-info] vkCreate_PLATFORM_SurfaceMVK(): You are not calling this function from the main thread. PLATFORM_VIEW_CLASS should only be accessed from the main thread. When using this function outside the main thread, consider passing the CAMetalLayer itself in Vk_PLATFORM_SurfaceCreateInfoMVK::pView, instead of the PLATFORM_VIEW_CLASS.
info:  Presenter: Actual swap chain properties:
  Format:       VK_FORMAT_B8G8R8A8_SRGB
  Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
  Buffer size:  632x453
  Image count:  2
[mvk-info] Created 2 swapchain images with initial size (632, 453).
info:  Presenter: Actual swap chain properties:
  Format:       VK_FORMAT_B8G8R8A8_SRGB
  Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
  Buffer size:  1024x600
  Image count:  3
[mvk-info] Created 3 swapchain images with initial size (1024, 600).
[mvk-error] VK_ERROR_FEATURE_NOT_PRESENT: vkCreateEvent(): Vukan events are not supported.
err:   DXVK: Failed to create query reset event
wine: Unhandled page fault on execute access to 0x00000000 at address 0x0 (thread 004f), starting debugger...
Unhandled exception: page fault on execute access to 0x00000000 in 64-bit code (0x0000000000000000).
Register dump:
 rip:0000000000000000 rsp:000000000117fb48 rbp:0000000000000000 eflags:00010246 (  R- --  I  Z- -P- )
 rax:00000000005244a0 rbx:000000000053bf40 rcx:0000000000075f80 rdx:0000000000000000
 rsi:0000000000570ed0 rdi:0000000000000000  r8:0000000000000000  r9:0000000000000001 r10:0000000000000001
 r11:0000000000000202 r12:0000000000000000 r13:00000000005434d8 r14:0000000000557bc0 r15:0000000000557e50
Stack dump:
0x000000000117fb48:  000000006a3c3e7a 0000000000543490
0x000000000117fb58:  0000000000543cf0 0000000000000000
0x000000000117fb68:  0000000000557e50 0000025800000400
0x000000000117fb78:  000000006a3b489f 0000000000000000
0x000000000117fb88:  0000000000000000 0000000000000000
0x000000000117fb98:  0000000000000000 0000000000000000
0x000000000117fba8:  0000000000000000 00000000005434d8
0x000000000117fbb8:  0000000000000000 0000000000544598
0x000000000117fbc8:  000000000117fd80 000000000117fd70
0x000000000117fbd8:  000000006a3c3ffd 0000000000000009
0x000000000117fbe8:  000000006a3b06e9 0000000000000000
0x000000000117fbf8:  0000000000543490 0000000000000000
Backtrace:
=>0 0x0000000000000000 (0x0000000000000000)
0x0000000000000000: -- no code accessible --
Modules:
Module	Address					Debug info	Name (17 modules)
PE	          400000-          4e0000	Deferred        d3d11-triangle
PE	        401e0000-        401e4000	Deferred        vulkan-1
PE	        40550000-        40554000	Deferred        winevulkan
PE	        40590000-        40594000	Deferred        version
PE	        405d0000-        405d4000	Deferred        imm32
PE	        42150000-        4222a000	Deferred        user32
PE	        423c0000-        423c4000	Deferred        gdi32
PE	        42560000-        42564000	Deferred        advapi32
PE	        42600000-        42604000	Deferred        msvcrt
PE	        43810000-        43814000	Deferred        rpcrt4
PE	        43960000-        43964000	Deferred        winemac
PE	        6a340000-        6a58b000	Deferred        d3d11
PE	        6f200000-        6f384000	Deferred        dxgi
PE	        7b410000-        7b469000	Deferred        kernel32
PE	        7bc10000-        7bc14000	Deferred        ntdll
ELF	        7bf00000-        7bf03000	Deferred        <wine-loader>
PE	       180000000-       180404000	Deferred        d3dcompiler_47
Threads:
process  tid      prio (all id:s are in hex)
00000008 NewColossus_x64vk.exe
	00000034   -1
	00000033   -1
	00000031    2
	00000030    2
	0000002f    0
	0000002e    0
	0000002d    2
	0000002c    2
	0000002b    2
	0000002a   -1
	00000029    0
	00000009    0
0000000e services.exe
	00000020    0
	0000001b    0
	00000013    0
	00000010    0
	0000000f    0
00000011 winedevice.exe
	00000018    0
	00000017    0
	00000016    0
	00000012    0
00000019 plugplay.exe
	0000001d    0
	0000001c    0
	0000001a    0
0000001e winedevice.exe
	00000025    0
	00000022    0
	00000021    0
	0000001f    0
00000023 explorer.exe
	00000028    0
	00000027    0
	00000026    0
	00000024    0
00000049 (D) Z:\Users\oscar\21\dxvk\dxvk-1.1.1\x64\d3d11-triangle.exe
	0000004f    0 <==
	0000004e    0
	0000004d    0
	0000004c   -2
	0000004b   -2
	0000004a    0
System information:
    Wine build: wine-3.18-50-ga303f9cd10
    Platform: x86_64
    Version: Windows 7
    Host system: Darwin
    Host version: 18.6.0
Ooscarbg 2019-05-25 github

DXVK logs attached below as you requested but just a question:
is there any mechanism to force DXVK not using an optional VK extension altough supported by Vulkan driver.. like VK_EXT_host_query_reset.. i.e. similar as to DXVK allows overriding GPU vendor/device id and device name.. can ask if not to MoltenVK devs a mechanism to hide exposed/supported extensions..

Here DXVK logs:
d3d11-triangle_d3d11.log
d3d11-triangle_dxgi.log

KK0bin maintainer 2019-05-25 github

DXVK 1.1 has a new query implementation that relies on Vulkan Events.
You'll have to implement those in MoltenVK.

Ooscarbg 2019-05-25 github

Ok guess can close now..

Ppchome 2019-05-25 github

[mvk-error] VK_ERROR_INCOMPATIBLE_DRIVER: Request for Vulkan version 1.1.0 is not compatible with supported version 1.0.106.

1.0.106 not a typo ? 1.1.106 maybe? Just wondering.

EDIT: Well, it could be weird version numeration.
[1.1.x.x/1.0.x.x] - supported/used spec
[x.x.106.x] - version
1.0.68.0 - was last 1.0 version, before 1.1 was introduced.
1.1.70.0 - was first 1.1 version

Or typo :)

Ooscarbg 2019-05-25 github

no MoltenVK support is 1.0 right now..
things like subgroup ops missing or some other VK 1.1 ext..
this is no problem for DXVK 1.0 working

Ddoitsujin maintainer 2019-05-26 github

@K0bin it doesn't rely on Vulkan events if the extension is supported.

@oscarbg your issue is that while your MoltenVK seems to support the extension, your wine doesn't (among a ton of other extensions that seem to be missing).

Ooscarbg 2019-05-27 github

@doitsujin yep updated to Wine 4.9 and now works.. false alarm.. sorry for wasting your time :-(

KkristofferR 2019-08-14 github

Support for Vulkan Events just dropped in MoltenVK btw:
https://github.com/KhronosGroup/MoltenVK/issues/192#issuecomment-520115778

Upstream links