protonscr

GTA IV Crash

dxvkclosed d3d9can't reproducewindows
doitsujin/dxvk#3110 · opened 2022-12-02 by psyopcskx-11 · updated 2023-05-28 · 12 comments · github
Ppsyopcskx-11 2022-12-02 github

hi, so this is my first time using github and i am not english, so please excuse me.
I used to use DXVK 1.9.4 for gta 4, and it worked perfectly with no issues.
I recently bought the complete edition, downgraded it, installed a bunch of mods and DXVK 2.0
The game now always starts in a weird windowed kind of mode
after i load into the game, it works as intended inside the safehouse (roman's)
as soon as i step out of the apartment, the game stutters and then crashes immediately
I've tried changing my settings, deleting some mods but it dosen't work.
I've included the things that are in GTAIV_d3d9, and everytime i see

warn: D3D9DeviceEx::SetRenderState: Unhandled render state 182
warn: D3D9DeviceEx::SetRenderState: Unhandled render state 183

It would be nice if you guys can help me out.

Software information

Name of the game - GTA IV
1366x768(60hz)
all graphics settings at medium
vsync-off

System information

  • GPU: Intel® Iris® Xe Graphics
  • Driver: 31.0.101.3802
  • using DXVK 2.0

Log files

  • d3d9.log:
    info: Game: GTAIV.exe
    info: DXVK: v2.0
    info: Found built-in config:
    info: d3d9.supportDFFormats = False
    info: dxgi.emulateUMA = True
    info: d3d9.customVendorId = 1002
    info: Effective configuration:
    info: d3d9.customVendorId = 1002
    info: dxgi.emulateUMA = True
    info: d3d9.supportDFFormats = False
    info: Built-in extension providers:
    info: Win32 WSI
    info: OpenVR
    info: OpenXR
    info: OpenVR: could not open registry key, status 2
    info: OpenVR: Failed to locate module
    info: Enabled instance extensions:
    info: VK_KHR_get_surface_capabilities2
    info: VK_KHR_surface
    info: VK_KHR_win32_surface
    info: D3D9: VK_FORMAT_D16_UNORM_S8_UINT -> VK_FORMAT_D24_UNORM_S8_UINT
    info: Intel(R) Iris(R) Xe Graphics:
    info: Driver: 103.730.0
    info: Vulkan: 1.3.228
    info: Memory Heap[0]:
    info: Size: 3917 MiB
    info: Flags: 0x1
    info: Memory Type[0]: Property Flags = 0x1
    info: Memory Type[1]: Property Flags = 0x7
    info: Memory Type[2]: Property Flags = 0xf
    info: Process set as DPI aware
    info: Device properties:
    info: Device name: : Intel(R) Iris(R) Xe Graphics
    info: Driver version : 103.730.0
    info: Enabled device extensions:
    info: VK_EXT_conservative_rasterization
    info: VK_EXT_custom_border_color
    info: VK_EXT_depth_clip_enable
    info: VK_EXT_fragment_shader_interlock
    info: VK_EXT_full_screen_exclusive
    info: VK_EXT_memory_priority
    info: VK_EXT_robustness2
    info: VK_EXT_shader_module_identifier
    info: VK_EXT_shader_stencil_export
    info: VK_EXT_transform_feedback
    info: VK_EXT_vertex_attribute_divisor
    info: VK_KHR_external_memory_win32
    info: VK_KHR_external_semaphore_win32
    info: VK_KHR_swapchain
    info: Device features:
    info: robustBufferAccess : 1
    info: fullDrawIndexUint32 : 1
    info: imageCubeArray : 1
    info: independentBlend : 1
    info: geometryShader : 1
    info: tessellationShader : 0
    info: sampleRateShading : 1
    info: dualSrcBlend : 0
    info: logicOp : 0
    info: multiDrawIndirect : 0
    info: drawIndirectFirstInstance : 0
    info: depthClamp : 1
    info: depthBiasClamp : 1
    info: fillModeNonSolid : 1
    info: depthBounds : 1
    info: multiViewport : 1
    info: samplerAnisotropy : 1
    info: textureCompressionBC : 1
    info: occlusionQueryPrecise : 1
    info: pipelineStatisticsQuery : 1
    info: vertexPipelineStoresAndAtomics : 1
    info: fragmentStoresAndAtomics : 0
    info: shaderImageGatherExtended : 0
    info: shaderClipDistance : 1
    info: shaderCullDistance : 1
    info: shaderFloat64 : 0
    info: shaderInt64 : 0
    info: variableMultisampleRate : 1
    info: shaderResourceResidency : 0
    info: shaderResourceMinLod : 0
    info: sparseBinding : 0
    info: sparseResidencyBuffer : 0
    info: sparseResidencyImage2D : 0
    info: sparseResidencyImage3D : 0
    info: sparseResidency2Samples : 0
    info: sparseResidency4Samples : 0
    info: sparseResidency8Samples : 0
    info: sparseResidency16Samples : 0
    info: sparseResidencyAliased : 0
    info: Vulkan 1.1
    info: shaderDrawParameters : 0
    info: Vulkan 1.2
    info: samplerMirrorClampToEdge : 1
    info: drawIndirectCount : 1
    info: samplerFilterMinmax : 0
    info: hostQueryReset : 1
    info: timelineSemaphore : 1
    info: bufferDeviceAddress : 0
    info: shaderOutputViewportIndex : 1
    info: shaderOutputLayer : 1
    info: vulkanMemoryModel : 1
    info: Vulkan 1.3
    info: robustImageAccess : 0
    info: pipelineCreationCacheControl : 1
    info: shaderDemoteToHelperInvocation : 1
    info: shaderZeroInitializeWorkgroupMemory : 0
    info: synchronization2 : 1
    info: dynamicRendering : 1
    info: VK_AMD_shader_fragment_mask
    info: extension supported : 0
    info: VK_EXT_attachment_feedback_loop_layout
    info: attachmentFeedbackLoopLayout : 0
    info: VK_EXT_conservative_rasterization
    info: extension supported : 1
    info: VK_EXT_custom_border_color
    info: customBorderColors : 1
    info: customBorderColorWithoutFormat : 1
    info: VK_EXT_depth_clip_enable
    info: depthClipEnable : 1
    info: VK_EXT_extended_dynamic_state3
    info: extendedDynamicState3DepthClipEnable : 0
    info: VK_EXT_fragment_shader_interlock
    info: fragmentShaderSampleInterlock : 0
    info: fragmentShaderPixelInterlock : 0
    info: VK_EXT_full_screen_exclusive
    info: extension supported : 1
    info: VK_EXT_graphics_pipeline_library
    info: graphicsPipelineLibrary : 0
    info: VK_EXT_memory_budget
    info: extension supported : 1
    info: VK_EXT_memory_priority
    info: memoryPriority : 1
    info: VK_EXT_non_seamless_cube_map
    info: nonSeamlessCubeMap : 0
    info: VK_EXT_robustness2
    info: robustBufferAccess2 : 1
    info: robustImageAccess2 : 1
    info: nullDescriptor : 1
    info: VK_EXT_shader_module_identifier
    info: shaderModuleIdentifier : 1
    info: VK_EXT_shader_stencil_export
    info: extension supported : 1
    info: VK_EXT_transform_feedback
    info: transformFeedback : 0
    info: geometryStreams : 0
    info: VK_EXT_vertex_attribute_divisor
    info: vertexAttributeInstanceRateDivisor : 1
    info: vertexAttributeInstanceRateZeroDivisor : 1
    info: VK_KHR_external_memory_win32
    info: extension supported : 1
    info: VK_KHR_external_semaphore_win32
    info: extension supported : 1
    info: VK_NVX_binary_import
    info: extension supported : 0
    info: VK_NVX_image_view_handle
    info: extension supported : 0
    info: Queue families:
    info: Graphics : 0
    info: Transfer : 0
    info: Sparse : 0
    info: DXVK: Read 354 valid state cache entries
    info: DXVK: Graphics pipeline libraries not supported
    info: D3D9DeviceEx::ResetSwapChain:
    info: Requested Presentation Parameters
    info: - Width: 1920
    info: - Height: 1080
    info: - Format: D3D9Format::A8R8G8B8
    info: - Auto Depth Stencil: false
    info: ^ Format: D3D9Format::D24S8
    info: - Windowed: false
    info: Presenter: Actual swap chain properties:
    info: Format: VK_FORMAT_R8G8B8A8_UNORM
    info: Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
    info: Buffer size: 1920x1050
    info: Image count: 2
    info: Exclusive FS: 0
    info: Setting display mode: 1920x1080@0
    info: Setting display mode: 1920x1080@0
    info: DXVK: Using 8 + 0 compiler threads
    info: Game: GTAIV.exe
    info: DXVK: v2.0
    info: Found built-in config:
    info: d3d9.supportDFFormats = False
    info: dxgi.emulateUMA = True
    info: d3d9.customVendorId = 1002
    info: Effective configuration:
    info: d3d9.customVendorId = 1002
    info: dxgi.emulateUMA = True
    info: d3d9.supportDFFormats = False
    info: Built-in extension providers:
    info: Win32 WSI
    info: OpenVR
    info: OpenXR
    info: OpenVR: could not open registry key, status 2
    info: OpenVR: Failed to locate module
    info: Enabled instance extensions:
    info: VK_KHR_get_surface_capabilities2
    info: VK_KHR_surface
    info: VK_KHR_win32_surface
    info: D3D9: VK_FORMAT_D16_UNORM_S8_UINT -> VK_FORMAT_D24_UNORM_S8_UINT
    info: Intel(R) Iris(R) Xe Graphics:
    info: Driver: 103.730.0
    info: Vulkan: 1.3.228
    info: Memory Heap[0]:
    info: Size: 3917 MiB
    info: Flags: 0x1
    info: Memory Type[0]: Property Flags = 0x1
    info: Memory Type[1]: Property Flags = 0x7
    info: Memory Type[2]: Property Flags = 0xf
    info: Process set as DPI aware
    info: D3D9DeviceEx::ResetSwapChain:
    info: Requested Presentation Parameters
    info: - Width: 1366
    info: - Height: 768
    info: - Format: D3D9Format::A8R8G8B8
    info: - Auto Depth Stencil: false
    info: ^ Format: D3D9Format::D24S8
    info: - Windowed: false
    info: Setting display mode: 1366x768@60
    info: Setting display mode: 1366x768@60
    info: Presenter: Actual swap chain properties:
    info: Format: VK_FORMAT_R8G8B8A8_UNORM
    info: Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
    info: Buffer size: 1366x768
    info: Image count: 2
    info: Exclusive FS: 0
    info: Presenter: Actual swap chain properties:
    info: Format: VK_FORMAT_R8G8B8A8_UNORM
    info: Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
    info: Buffer size: 1366x768
    info: Image count: 2
    info: Exclusive FS: 0
    info: D3D9DeviceEx::ResetSwapChain:
    info: Requested Presentation Parameters
    info: - Width: 1366
    info: - Height: 768
    info: - Format: D3D9Format::A8R8G8B8
    info: - Auto Depth Stencil: false
    info: ^ Format: D3D9Format::D24S8
    info: - Windowed: false
    info: Setting display mode: 1366x768@60
    info: Setting display mode: 1366x768@60
    info: Presenter: Actual swap chain properties:
    info: Format: VK_FORMAT_R8G8B8A8_UNORM
    info: Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR
    info: Buffer size: 2049x1152
    info: Image count: 2
    info: Exclusive FS: 0
    warn: D3D9DeviceEx::SetRenderState: Unhandled render state 182
    warn: D3D9DeviceEx::SetRenderState: Unhandled render state 183
BBlisto91 2022-12-02 github

Hello. As a quick test could you try making a file called dxvk.conf in the folder where the dxvk log file appeared and insert d3d9.textureMemory = 0 ? :slightly_smiling_face:

KK0bin maintainer 2022-12-02 github

I've personally given up on GTA IV.
The game has a million weird different problems with DXVK and none of them make any sense.

Don't expect this to get fixed.

Please make an apitrace.

Ppsyopcskx-11 2022-12-04 github

hi
I've added the dxvk.conf file to the game's root directory (where the log file was present
ran the game 4 times
the first time it worked
the 2nd 3rd and 4th time, it crashed just like before

Ppsyopcskx-11 2022-12-04 github

Oh my God.
this game is truly a shitshow of a pc port
the game works normally now after replacing the main files with the 32bit api trace files
it just lags a lot
wtf is wrong with this game?
i have been not able to reproduce my issue even after trying multiple times, sorry for that :(
do you still need the .trace file?

BBlisto91 2022-12-04 github

@psyopcskx-11 Hello.
Yes that is normal. The game won't be using dxvk while you are tracing and it tanking the fps is also normal as it is recording every single Direct3D api call. The devs can replay it themselves together with dxvk later to see if anything seems off.
So just trace the game past where the issue usually shows up.

Ii1u5 2022-12-10 github

Can't reproduce.

Using DXVK 2.0, I get the same warnings, but I've been able to play the whole game with no issues, the "weird windowed mode" you described happened a few times but simply restarting the game fixes it. I'm suspecting it could be a driver-related issue.

I play on the complete edition. Here's my dxvk.conf:

dxgi.maxFrameLatency = 1
d3d9.maxFrameLatency = 1
dxvk.hud = compiler,fps

My commandline.txt:

-availablevidmem=3966
-windowed
-managed

The game hasn't crashed a single time for me since the start until the last SP mission.

KK0bin maintainer 2022-12-20 github

@psyopcskx-11 As Blisto said, it's normal that you can't reproduce the issue with apitrace (and that it makes the game very slow).

Please just do what you'd normally do to reproduce the issue and upload the apitrace file.

Ppsyopcskx-11 2022-12-31 github

hello
sorry for my inactivity, i just gave up on the game till yesterday
good news is that i was able to reproduce the issue using apitrace this time around
anyways, here's the link
https://drive.google.com/file/d/1W3OufOkR0USpZ4MYk7n11C5Dq6pWTgjL/view?usp=sharing

KK0bin maintainer 2022-12-31 github

I'll try and take a look next week.

KK0bin maintainer 2023-01-02 github

The apitrace replays just fine.

BBlisto91 2023-05-06 github

@psyopcskx-11 Hello again. Could you try with latest master? You can download it here https://github.com/doitsujin/dxvk/actions/runs/4901825014

KK0bin maintainer 2023-05-28 github

Closing this because I suspect it's a driver bug. Either way, we can't really do anything about it as it's not reproducible.

Nothing extracted yet.