doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
12.79k stars 823 forks source link

Dose DXVK really works? dxgi.dll is loaded from system directory. #3685

Closed solaris111 closed 11 months ago

solaris111 commented 11 months ago

I'm using DXVK 2.3(x86) on win10(LSTC 21H2) with AMD 7840H(780M).I have copied d3d9.dll and dxgi.dll to game game directory.It seems worked,Judging by game(HL2 .eg) performance.But I also can see game load dxgi.dll from system directory,along with dx12.dll . Why? Is dxvk need your dxgi.dll? Here is the log and capture: info: Game: hl2.exe info: DXVK: v2.3 info: Vulkan: Found vkGetInstanceProcAddr in vulkan-1.dll @ 0x6ff816e0 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_D24_UNORM_S8_UINT -> VK_FORMAT_D32_SFLOAT_S8_UINT info: AMD Radeon 780M Graphics: info: Driver : AMD proprietary driver 2.0.283 info: Memory Heap[0]: info: Size: 3840 MiB info: Flags: 0x3 info: Memory Type[0]: Property Flags = 0x1 info: Memory Type[4]: Property Flags = 0xc1 info: Memory Type[8]: Property Flags = 0x1 info: Memory Type[12]: Property Flags = 0xc1 info: Memory Heap[1]: info: Size: 13922 MiB info: Flags: 0x0 info: Memory Type[1]: Property Flags = 0x6 info: Memory Type[3]: Property Flags = 0xe info: Memory Type[5]: Property Flags = 0xc6 info: Memory Type[7]: Property Flags = 0xce info: Memory Type[9]: Property Flags = 0x6 info: Memory Type[11]: Property Flags = 0xe info: Memory Type[13]: Property Flags = 0xc6 info: Memory Type[15]: Property Flags = 0xce info: Memory Heap[2]: info: Size: 256 MiB info: Flags: 0x3 info: Memory Type[2]: Property Flags = 0x7 info: Memory Type[6]: Property Flags = 0xc7 info: Memory Type[10]: Property Flags = 0x7 info: Memory Type[14]: Property Flags = 0xc7 info: Process set as DPI aware info: Device properties: info: Device : AMD Radeon 780M Graphics info: Driver : AMD proprietary driver 2.0.283 info: Enabled device extensions: info: VK_AMD_memory_overallocation_behavior info: VK_EXT_attachment_feedback_loop_layout info: VK_EXT_conservative_rasterization info: VK_EXT_custom_border_color info: VK_EXT_depth_clip_enable info: VK_EXT_extended_dynamic_state3 info: VK_EXT_full_screen_exclusive info: VK_EXT_hdr_metadata info: VK_EXT_memory_priority info: VK_EXT_non_seamless_cube_map 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_pipeline_library info: VK_KHR_swapchain info: VK_KHR_win32_keyed_mutex 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: wideLines : 0 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 : 1 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_depth_bias_control info: depthBiasControl : 0 info: leastRepresentableValueForceUnormRepresentation : 0 info: floatRepresentation : 0 info: depthBiasExact : 0 info: VK_EXT_extended_dynamic_state3 info: extDynamicState3AlphaToCoverageEnable : 1 info: extDynamicState3DepthClipEnable : 1 info: extDynamicState3RasterizationSamples : 1 info: extDynamicState3SampleMask : 1 info: extDynamicState3LineRasterizationMode : 1 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_line_rasterization info: rectangularLines : 0 info: smoothLines : 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 : 1 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_swapchain_colorspace info: extension supported : 0 info: VK_EXT_swapchain_maintenance1 info: swapchainMaintenance1 : 0 info: VK_EXT_hdr_metadata 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_KHR_maintenance5 info: maintenance5 : 0 info: VK_KHR_present_id info: presentId : 0 info: VK_KHR_present_wait info: presentWait : 0 info: VK_NVX_binary_import info: extension supported : 0 info: VK_NVX_image_view_handle info: extension supported : 0 info: VK_KHR_win32_keyed_mutex info: extension supported : 1 info: Queue families: info: Graphics : 0 info: Transfer : 2 info: Sparse : 0 info: DXVK: Read 1058 valid state cache entries info: DXVK: Graphics pipeline libraries not supported info: D3D9DeviceEx::ResetSwapChain: info: Requested Presentation Parameters info: - Width: 2560 info: - Height: 1600 info: - Format: D3D9Format::A8R8G8B8 info: - Auto Depth Stencil: true info: ^ Format: D3D9Format::D24S8 info: - Windowed: false info: - Swap effect: 1 info: Presenter: Actual swap chain properties: info: Format: VK_FORMAT_R8G8B8A8_UNORM info: Color space: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR info: Present mode: VK_PRESENT_MODE_IMMEDIATE_KHR (dynamic: no) info: Buffer size: 2560x1600 info: Image count: 3 info: Exclusive FS: 0 info: Setting display mode: 2560x1600@120 info: Setting display mode: 2560x1600@120 info: DXVK: Using 16 compiler threads info: Presenter: Actual swap chain properties: info: Format: VK_FORMAT_R8G8B8A8_UNORM info: Color space: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR info: Present mode: VK_PRESENT_MODE_FIFO_KHR (dynamic: no) info: Buffer size: 2560x1600 info: Image count: 3 info: Exclusive FS: 0 info: Restoring display mode: 2560x1600@60 info: Setting display mode: 2560x1600@60

图片

K0bin commented 11 months ago

DXVK is built for Linux. On Windows it works in some games but as you have discovered, some games insist on loading dxgi from system32.

That's not what's happening in your case though. From the looks of it, you're trying to run Half Life 2. Half Life 2 is a Direct3D9 game. D3D9 does not use DXGI. So you only need d3d9.dll as the game itself doesn't load dxgi.dll.

DXGI shows up in that list because the Vulkan loader and/or Vulkan driver loads it. We absolutely want that to load the system one in system32, otherwise you'd have an endless loop of DXVKs dxgi.dll trying to load itself.

So this is working fine. If you're unsure whether DXVK is working, enable the HUD by setting the DXVK_HUD environment variable to "1".