protonscr

CoD Warzone (Modern Warfare)

vkd3dclosed
HansKristian-Work/vkd3d-proton#370 · opened 2020-11-07 by K0bin · updated 2022-11-06 · 3 comments · github
KK0bin 2020-11-07 github

I did some digging with CoD Warzone. All findings should also apply to Modern Warfare because it's the same engine and the executable and process is even called ModernWarfare. I don't own that however. The testing was done on Windows with VKD3D-Proton 2.0.

It crashes on a black screen before the main menu. This seems to be caused by an issue around ref counting or object lifetimes.
If I never destroy the device in d3d12_device_Release, it gets into the main menu, renders a mouse cursor and I start hearing music.
The instance seems to be the problem. Commenting out vkd3d_instance_decref in d3d12_device_destroy, is enough to make it work.

At that point I encounter a bunch of validation errors:

23104:err:vkd3d_debug_messenger_callback: "Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x1c4f7681878, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: Expected arithmetic operands to have the same dimension as Result Type: ISub operand index 2\
  %2948 = OpISub %v2uint %uint_31 %2947\
"
23660:warn:vkd3d_debug_messenger_callback: "Validation Warning: [ UNASSIGNED-CoreValidation-Shader-InputNotProduced ] Object 0: handle = 0xa83ece0000027d16, name = 5630f053ad1a3b61, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 | Attachment 1 not written by fragment shader; undefined values will be written to attachment"
23104:err:vkd3d_debug_messenger_callback: "Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x1c4f7681878, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: Pointer operand 1012[%1012] must be a memory object declaration\
  %1018 = OpFunctionCall %void %fork1_epilogue %1012 %1013 %1014 %1015 %1016 %1017\
"
23660:err:vkd3d_debug_messenger_callback: "Validation Error: [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object 0: handle = 0x1c4f7681878, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x6bbb14 | SPIR-V module not valid: Return must appear in a block\
  OpReturn\
"
22024:err:vkd3d_debug_messenger_callback: "Validation Error: [ VUID-VkDescriptorBufferInfo-buffer-02999 ] Object 0: handle = 0x24f8a50e138, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x2a730454 | vkCmdPushDescriptorSetKHR(): if pDescriptorWrites[13].buffer is VK_NULL_HANDLE, offset (llu) must be zero and range (llu) must be VK_WHOLE_SIZE. The Vulkan spec states: If buffer is VK_NULL_HANDLE, offset must be zero and range must be VK_WHOLE_SIZE (https://vulkan.lunarg.com/doc/view/1.2.148.0/windows/1.2-extensions/vkspec.html#VUID-VkDescriptorBu"...

I only managed to dump one of the problematic shaders.
warzone_shaders.zip

Ddave-juicelabs 2021-01-27 github

In the latest builds of COD: Warzone, it seems that D3D12.1 is required. Forcing support allows me to get through the menus and in to the game but the rendering in the game is psychedelic. This I assume is either something not quite right in vkd3d or the missing support for ROVs and ConservativeRaterizationTier. Not sure which at the moment.

RRiantAnda 2021-07-17 github

@dave-juicelabs Could you describe what you did to get the game running?
When I launch the game, there is just the "Run In Safe Mode?" question, then the game exits.

Maybe additional vkd3d logs could help the devs?

KK0bin 2022-11-06 github

Outdated and the game won't work because of the anti cheat anyway.

Proton versions