protonscr

Alan Wake Remastered - exploding vertices

vkd3dclosed
HansKristian-Work/vkd3d-proton#1587 · opened 2023-06-04 by jkrhu · updated 2023-06-25 · 6 comments · github
Jjkrhu 2023-06-04 github

The game has many instances of exploding vertices from meshes. Sometimes small, sometimes covering the screen. Makes the game unplayable.

Screenshot 1
Screenshot 2

Have a video with timestamps for you as well:
https://youtu.be/sdX9y7mzaes

Software information

Alan Wake Remastered, high settings. Doesn't matter if I enable DXR1.1, NVAPI, DX12_2 etc. Launched through Heroic Games Launcher with Steam Proton Experimental.

System information

  • GPU: Nvidia RTX 3060 12GB
  • Driver: Nvidia Proprietary 530.41.03
  • Wine version: Proton experimental-8.0-20230531
  • VKD3D-Proton version: vkd3d-proton 2.9.0, build: 99e556b56666c9f

Log files

Please attach Proton or Wine logs as a text file:

Alan Wake Remastered Proton log.txt

Alan Wake Remastered vkd3d-proton log.txt

BBlisto91 2023-06-04 github

Hello. Do you know if this works with older vkd3d-proton versions or drivers?

Jjkrhu 2023-06-04 github

Hello. Do you know if this works with older vkd3d-proton versions or drivers?

I've checked a few older GE Proton builds. It happened for every one I checked. The oldest I checked was GE Proton 7-10 dating back to March 19th 2022 with vkd3d-proton build: 63530501a5a604a

As for drivers I haven't checked previous ones. Will let you know if the 535 series fixes it, once it gets to stable.

HHansKristian-Work maintainer 2023-06-06 github

I was able to observe the glitch on AMD.
However, with capture layer active it does not reproduce for me anymore. When I captured the game, I found that replaying hung the GPU. I traced that down to a vertex shader which loaded a bogus loop counter from a CBV. The shader then ends up reading a pointer out of bounds

9669b1e8eb331a35.dxil

	[   0..   3] = { 0000000f, 00000000, ea4d5b00, ffffffff }
	[   4..   7] = { 15736510, 15736500, 00ab9b1b, 3ea0cd70 }
	[   8..  11] = { 00000000, 00000000, 00000000, 00000000 }
	[  12..  15] = { 00000000, 00000000, 00000000, 00000000 }
	[  16..  19] = { 3988d5bd, 39cd041b, 3a0543ad, bc33d876 }
	[  20..  23] = { 3f6f10c7, b15464f8, 3eb71fec, 454aea48 }
	[  24..  27] = { 3cf19ab9, 3f7f20cf, bd9db46d, c280f60b }
	[  28..  31] = { beb68045, 3da8e040, 3f6e405b, c37300ec }
	[  32..  35] = { 3c059af3, 0020ffff, ea4d6300, ffffffff }


PGM_MEM:

    pgm[1@0x80000015ea64 + 0x0   ] = 0xbe860381		s_mov_b32 s6, 1                                            	
    pgm[1@0x80000015ea64 + 0x4   ] = 0xbfa10001		s_clause 0x1                                               	
    pgm[1@0x80000015ea64 + 0x8   ] = 0xf4080201		s_load_dwordx4 s[8:11], s[2:3], s5                         	
    pgm[1@0x80000015ea64 + 0xc   ] = 0x0a000000	;;                                                          	
    pgm[1@0x80000015ea64 + 0x10  ] = 0xf4080301		s_load_dwordx4 s[12:15], s[2:3], s4                        	
    pgm[1@0x80000015ea64 + 0x14  ] = 0x08000000	;;                                                          	
    pgm[1@0x80000015ea64 + 0x18  ] = 0xbf032006		s_cmp_ge_i32 s6, s32                                       	
    pgm[1@0x80000015ea64 + 0x1c  ] = 0xbf8cc07f		s_waitcnt lgkmcnt(0)                                       	
 *  pgm[1@0x80000015ea64 + 0x20  ] = 0x081a2208		v_sub_f32_e32 v13, s8, v17                                 	
    pgm[1@0x80000015ea64 + 0x24  ] = 0x082c1209		v_sub_f32_e32 v22, s9, v9                                  	
    pgm[1@0x80000015ea64 + 0x28  ] = 0x082e060a		v_sub_f32_e32 v23, s10, v3                                 	
    pgm[1@0x80000015ea64 + 0x2c  ] = 0x101a1b0d		v_mul_f32_e32 v13, v13, v13                                	
    pgm[1@0x80000015ea64 + 0x30  ] = 0x561a2d16		v_fmac_f32_e32 v13, v22, v22                               	
    pgm[1@0x80000015ea64 + 0x34  ] = 0x561a2f17		v_fmac_f32_e32 v13, v23, v23                               	
    pgm[1@0x80000015ea64 + 0x38  ] = 0x7e1a670d		v_sqrt_f32_e32 v13, v13                                    	
    pgm[1@0x80000015ea64 + 0x3c  ] = 0x101a1aff	...                                                         	
End of disassembly.

My theory is that there is a race condition in the game with CBV updates, which points to a game issue. The loop counter s32 is about a billion and the page fault happens eventually as s6 gets large enough (it loops millions of times here).

[ 4869.852165] amdgpu 0000:0b:00.0: amdgpu:   in page starting at address 0x0000ffffffc0c000 from client 0x1b (UTCL2)
VA found: timestamp=4859098713841, VA=0000ffffff600000-0000ffffffc0c000, destroyed=0, is_virtual=0

I correlated which addresses the application pushed vs which addresses renderdoc push in case there was a bug there, but it seemed to check out, so not sure what to do about this issue.

RRareMv 2023-06-18 github

Important to note Alan Wake Remastered doesn't need either DXR or DX12_2. Works just fine with DX12_0.

Jjkrhu 2023-06-25 github

That's unfortunate, but nonetheless thank you for investigating this. I'd say we can close this issue, as this turned out not to be related to vkd3d-proton.

Proton versions