Giter Club home page Giter Club logo

d3d9on12's Introduction

D3D9On12

D3D9On12 is a mapping layer, which maps graphics commands from D3D9 to D3D12. D3D9On12 is not an implementation of the D3D9 API, but is instead an implementation of the D3D9 usermode DDI (device driver interface). That means it is not a binary named d3d9.dll, but is named d3d9on12.dll.

When an application creates a D3D9 device, they may choose for it to be a D3D9On12 device, rather than a native D3D9 device (see Direct3DCreate9On12 and Direct3DCreate9On12Ex). When this happens, d3d9on12.dll is loaded by the D3D9 runtime and initialized. When the application calls rendering commands, D3D9 will validate those commands, and then will convert those commands to the D3D9 DDI and send it to D3D9On12, just like any D3D9 driver. D3D9On12 will take these commands and convert them into D3D12 API calls, which are further validated by the D3D12 runtime, optionally including the D3D12 debug layer, which are then converted to the D3D12 DDI and sent to the D3D12 driver.

Note that D3D9On12 is an enlightened D3D9 driver, and there are several places where it receives additional information compared to a traditional D3D9 driver, either to enable it to provide API-level information to D3D12 rather than driver-level information (as is the case for shaders), or to enable interop scenarios. When a D3D9 device is created with D3D9On12, the device will expose an IDirect3DDevice9On12 interface which enables applications to submit work to both the D3D9 API and the D3D12 API with lightweight sharing and synchronization.

For more details about D3D9On12, see:

Make sure that you visit the DirectX Landing Page for more resources for DirectX developers.

How does it work?

The primary entrypoint to D3D9On12 is a custom version of the normal D3D9 driver OpenAdapter entrypoint, named OpenAdapter_Private, where D3D9 provides additional information to the mapping layer. In response to this, like a normal driver, D3D9On12 returns an adapter object, which exposes DDIs to create a device. The device is created like normal, but in addition to the normal DDI tables, D3D9on12 also exposes a set of DDIs defined by the D3D9ON12_PRIVATE_DDI_TABLE which can be retrieved by calling GetPrivateDDITable.

The device object internally uses an instance of the D3D12TranslationLayer immediate context to record commands. Similarly, most D3D9On12 objects are backed by an implementation from the D3D12TranslationLayer library. The code in this repository is largely an adaptor from the D3D9 DDI to the D3D12TranslationLayer library, where the real heavy lifting of converting to the D3D12 domain is done.

Building

In order to build D3D9On12, the WDK (Windows Driver Kit) must be installed, in order to provide d3d10umddi.h to D3D9On12, and in order to generate the D3D12TranslationLayer_WDK project, which hosts some code required to parse DXBC shaders and containers. The D3D12TranslationLayer and its subprojects, D3D12TranslationLayer_WDK and DXBCParser, will be fetched from GitHub when building with CMake if D3D12TranslationLayer_WDK isn't already included, such as by a parent CMakeLists.txt that has already entered that project. The DxbcSigner.dll will be pulled in automatically from NuGet.

If you had a local copy of the D3D12TranslationLayer project, your top level project would look something like this:

cmake_minimum_required(VERSION 3.14)
include(FetchContent)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

project(parent)

FetchContent_Declare(
    d3d12translationlayer
    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/D3D12TranslationLayer
)
FetchContent_MakeAvailable(d3d12translationlayer)

add_subdirectory(D3D9On12)

At the time of publishing, the D3D9On12 and D3D12TranslationLayer require insider versions of the SDK and WDK. Those can be found here.

D3D9On12 requires C++17, and only supports building with MSVC at the moment.

Troubleshoot building

A somewhat common issue when trying to build the mapping layers is that there are multiple Windows SDKs installed, but only a subset of them has a corresponding WDK also installed. You can specify which version of the SDK to use when generating the solution by adding the following to your cmake command: -DCMAKE_SYSTEM_VERSION=<SDK_VERSION>.

Usage

Note that in order to use your custom version of D3D9on12 you will also need to copy WinPixEventRuntime.dll (will automatically be placed in D3D9on12's build output) and dxbcsigner.dll along with it.

Why open source?

The D3D9On12 mapping layer is included as an operating system component of Windows 10. Over the years and Windows 10 releases, it has grown in functionality, to the point where it is a complete and relatively performant implementation of a D3D9 driver. We are choosing to release the source to this component for two primary reasons:

  1. To enable the community to contribute bugfixes and further performance improvements, which will improve the stability and performance of Windows 10. See CONTRIBUTING.
  2. To serve as an example of how to use the D3D12TranslationLayer library.

What can you do with this?

There are minor differences between binaries built out of this repository and the versions that are included in the OS. To that end, shipping applications should not attempt to override the OS version of D3D9On12 with versions that they have built. We will not guarantee that newer versions of Windows will continue to support older versions of D3D9On12, since it is an OS component which may be revised together with D3D9. However, developers are welcome to override the Windows version of D3D9On12 for local testing and experimentation.

Compatibility

When possible, we will attempt to maintain compatibility between D3D9 and D3D9On12. One should expect that the tip of D3D9On12's master branch should work nicely with the latest release of Windows 10. Support for configurations other than that are not guaranteed to work.

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.

Note however that no data collection is performed when using your private builds.

d3d9on12's People

Contributors

aazad-gfx avatar bhouse-intel avatar colta95 avatar haichund1 avatar iandunn-intel avatar ifzhang2 avatar jenatali avatar microsoft-github-policy-service[bot] avatar ppoppelr avatar sivileri avatar usernameak avatar vdwtanner avatar xottab-duty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d3d9on12's Issues

Text is not displaying in Empire Earth II

I'm developing an unofficial patch for Empire Earth II. I have recently received many messages from players who are unable to play the game, due that the text is not displaying in game. All these players have new laptops with Intel CPUs. Most of these players are refunding their laptops for this reason.

After reading this page, I learnt that Intel is now using D3D9On12 in their drivers:

We use a D3D9on12 mapping layer, which maps graphics commands from DX9 to DX12. We do extensive compatibility and performance testing, and partner closely with Microsoft* and ISV’s (Independent Software Vendors) to optimize this solution continuously. Intel has been shipping this solution since our 12th Gen Intel® Core™ processor launch in 2021, and we'll continue to invest heavily in this technology for both integrated and discrete graphics solutions.

I managed to re-produce the issue on my computer using ForceD3D9On12 d3d9.dll. My unofficial patch already supports d3d8to9, so d3d9.dll could be placed in the game folder and was loaded successfully.

Screenshots showing the issue:

image

image

Steps to reproduce the problem:

  • Install the game.
  • Install unofficial patch.
  • * Edit file UnofficialVersionConfig.txt and add: UseWorkingDirectoryWorkaround=1.
  • Paste d3d9.dll from ForceD3D9On12 to the game folder.

* This step is required, so the Launcher copies the game executable to to the main game folder (as EE3.exe), instead of starting the game process from a different location. This is needed because otherwise the game would load d3d9.dll from the SysWOW64 directory.

As the patch developer, I'm usually trying to fix similar issues myself, using dozens of workarounds, assembly, etc. However this time it looks like the problem is in D3D9On12 itself, so maybe somebody could please check if this can be resolved? After all, the issue is quite serious since players who buy new laptops can't play the game.

Doesn't seem to work

I tried it and this is the result:

D3D9ON12_ARGS arg = { };
arg.Enable9On12 = TRUE;
pD3d9 = Direct3DCreate9On12(D3D_SDK_VERSION, &arg, 1);

image

dxvk works perfectly in comparison

Picture is very bright, FPS is very poor

I was really hoping I could use this to interop with OpenXR (I'd been doing an OpenGL port with ANGLE for weeks when I stumbled across this on Wikipedia's WDDM page) except for some reason it's making my game app very bright (bright white colors) and the frame rate is very low, I can't say how low because I'm on a new PC with D3D12 that should run the app with frame rate to spare several times over, however D3D9on12 is running well below 60fps (the average is on lower side of 30-60fps with 60hz syncing.)

TEST RESULTS: For the record, with "vsync" disabled, plain D3D9 runs about 145fps and D3D9on12 runs about 45fps in this case.

EDITED: I should add I'm using the Windows SDK version of d3d9.dll, on up-to-date "fast ring" "insiders build" of Windows 10.

P.S. I was asked to refile this (microsoft/D3D12TranslationLayer#48) report here instead. BTW I think I intend to look into if D3D9 can share a D3D12 surface and draw to it since that may be the better approach than full translation if so. I'm not sure what the tradeoffs are if D3D12 doesn't enhance performance (my app may be pathological to D3D12) but for interop needs it seems surface sharing would normally do it.

fatal error LNK1107: invalid or corrupt file: cannot read at 0xDD2

Hi,
I got another link error. Could you please shed a light on this? Thanks!

C:\Users\celestil\D3DGFx\out\build\windows-default\packages\WinPixEventRuntime.1.0.190604001\build\WinPixEventRuntime.targets : fatal error LNK1107: invalid or corrupt file: cannot read at 0xDD2
ninja: build stopped: subcommand failed.

Performance in Mass Effect is one half to one third of native

I hope I can be excused if I don't sum up the entire problem directly here (are speed complaints accepted?)

It's just that this looks at least the same problem I experienced in doitsujin/dxvk#1845 (apitrace inside!)
Except that the performance hit from the uncached occlusions doesn't look as strong, because even when I stare at the empty wall with nothing behind framerate is already almost half of what I'd expect to begin with.

p.s. are reports from W10 still legit? dll version 10.0.19041.3636 doesn't even seem like a proper build number

BlobContainer.h/dxbcutils.h missing

I have to verify if the D3D9on12 patch fixes my issue, then I tried to build D3D9on12 on VS 2019. However, there're some header files missing. Could you please help tell me where to find them? Thanks

Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "BlobContainer.h" d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\include\DxbcBuilder.hpp 2
Error (active) E1696 cannot open source file "BlobContainer.h" d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 4
Error (active) E0020 identifier "DXBCFourCC" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\include\DxbcBuilder.hpp 56
Error (active) E0020 identifier "CDXBCParser" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\include\DxbcBuilder.hpp 60
Error (active) E0020 identifier "DXBCFourCC" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\include\DxbcBuilder.hpp 60
Error (active) E0020 identifier "DXBCBlobHeader" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\include\DxbcBuilder.hpp 77
Error (active) E0020 identifier "DXBCHeader" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 14
Error (active) E0020 identifier "DXBCFourCC" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 51
Error (active) E0020 identifier "DXBCBlobHeader" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 66
Error (active) E0020 identifier "DXBC_MAX_SIZE_IN_BYTES" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 73
Error (active) E0020 identifier "CDXBCParser" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 124
Error (active) E0020 identifier "DXBCFourCC" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 124
Error (active) E0020 identifier "DXBC_BLOB_NOT_FOUND" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 130
Error (active) E0020 identifier "DXBCHeader" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 167
Error (active) E0020 identifier "pHeader" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 167
Error (active) E0029 expected an expression d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 167
Error (active) E0065 expected a ';' d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 167
Error (active) E0020 identifier "DXBCBlobHeader" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 169
Error (active) E0020 identifier "pNextBlobHeader" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 169
Error (active) E0029 expected an expression d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 169
Error (active) E0029 expected an expression d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 179
Error (active) E0020 identifier "DXBC_FOURCC_NAME" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 187
Error (active) E0020 identifier "DXBC_MAJOR_VERSION" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 188
Error (active) E0020 identifier "DXBC_MINOR_VERSION" is undefined d3d12translationlayer_wdk.lib (_deps\d3d12translationlayer-build\src\d3d12translationlayer_wdk.lib) - windows-default C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 189
Error C1083 Cannot open include file: 'BlobContainer.h': No such file or directory C:\Users\celestil\D3DGFx\out\build\windows-default\D3DGFx C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\DxbcBuilder.cpp 4
Error C1083 Cannot open include file: 'dxbcutils.h': No such file or directory C:\Users\celestil\D3DGFx\out\build\windows-default\D3DGFx C:\Users\celestil\D3DGFx\D3D12TranslationLayer\src\ShaderParser.cpp 6
Error C1083 Cannot open include file: 'BlobContainer.h': No such file or directory C:\Users\celestil\D3DGFx\out\build\windows-default\D3DGFx C:\Users\celestil\D3DGFx\D3D9On12\include\pch.h 22

Multiplication fix-up doesn't handle -0

In CShaderAsmWrapper::PatchMultiplicandArgs, you have the following comment which accurately describes the code below it.

        // Assuming neither src's are safe as multiplicands, the emitted asm is:
        //
        // movc temp0, src0, src1, 0.0f
        // movc temp1, src1, src0, 0.0f
        //
        // This ensures that temp0 * temp1 == src0 * src1 except for cases when
        // either may have inf/nan. In these cases, the movc ensures that if the 
        // other multiplicand has 0, then the nan/inf will be overwritten with 0.0f

However, the D3D assembly docs for movc say:

                for each component in dest[.mask]
                    if the corresponding component in src0 (POS-swizzle)
                       has any bit set
                    {
                        copy this component (POS-swizzle) from src1 into dest
                    }
                    else
                    {
                        copy this component (POS-swizzle) from src2 into dest
                    }
                endfor

If this is accurate, then the fixup for multiplication won't handle the case of -0 * inf properly. You need an abs source modifier on the selector of each of your movc instructions. Hopefully, that doesn't cost more when it gets to the hardware.

0xC0000005 Crashed in 10.0.22000.652 build

A crash happened in d3d9on12.dll 10.0.22000.652 when my app call av_hwframe_transfer_data(in ffmpeg), while it worked fine in d3d9on12.dll 10.0.22000.593 and before build. Here is the dump file: https://1drv.ms/u/s!AqL91iUT-5JUgSTtlMoP4Sbybo0U?e=zE6y0P

Unhandled exception at 0x00007FFFC8E4D9DF (d3d9on12.dll) in ReadyFor.exe.19472.dmp: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

`

d3d9on12.dll!00007fffc8e4d9df()
d3d9on12.dll!00007fffc8e4d025()
d3d9on12.dll!00007fffc8e41a36()
d3d9on12.dll!00007fffc8e41b7a()
d3d9on12.dll!00007fffc8e413a9()
d3d9on12.dll!00007fffc8e0f837()
d3d9on12.dll!00007fffc8e0f44c()
d3d9.dll!00007fffc9106cbc()
d3d9.dll!00007fffc90130d7()
d3d9.dll!00007fffc902e2ab()
d3d9.dll!00007fffc90a382b()
avutil-57.dll!00007fffb6d4cfd8()
avutil-57.dll!00007fffb6d4d184()
avutil-57.dll!00007fffb6d48163()
avutil-57.dll!00007fffb6d481e7()
`

Application crashes when enabling graphics debug in Visual Studio 2022 on intel iris xe graphics card.

Application crashes when enabling graphics debug in Visual Studio 2022 on intel iris xe graphics card. Some information about the Intel iris Xe graphics card: https://www.tomshardware.com/news/intel-xe-arc-swap-to-dx9-emulation.

>	D3D12Core.dll!IUnknown::QueryInterface<struct IDXGIAdapter>(struct IDXGIAdapter * *)	Unknown
 	D3D12Core.dll!D3D12ValidateAndCreateDevice()	Unknown
 	D3D12.dll!00007fffd2b46c5b()	Unknown
 	DXCaptureReplay.dll!GRFXTool::CCompatibilityMode::_D3D12CreateDevice(long &,long (*)(struct IUnknown *,enum D3D_FEATURE_LEVEL,struct _GUID const &,void * *),struct IUnknown *,enum D3D_FEATURE_LEVEL,struct _GUID const &,void * *)	Unknown
 	DXCaptureReplay.dll!GRFXTool::GeneratedCaptureCall::Call__D3D12CreateDevice(class GRFXTool::CaptureToolLayer *,struct IUnknown *,enum D3D_FEATURE_LEVEL,struct _GUID const &,void * *)	Unknown
 	DXCaptureReplay.dll!GRFXTool::GeneratedCaptureWrapper::D3D12CreateDeviceRealGenerated(class GRFXTool::CaptureToolLayer *,struct IUnknown *,enum D3D_FEATURE_LEVEL,struct _GUID const &,void * *)	Unknown
 	DXCaptureReplay.dll!GRFXTool::GeneratedCaptureWrapper::D3D12CreateDeviceWrapGenerated(void *,struct IUnknown *,enum D3D_FEATURE_LEVEL,struct _GUID const &,void * *)	Unknown
 	DXCaptureReplay.dll!GRFXTool::GeneratedCaptureWrapper::D3D12CreateDeviceGenerated(struct IUnknown *,enum D3D_FEATURE_LEVEL,struct _GUID const &,void * *)	Unknown
 	D3D12.dll!00007fffd2b4662e()	Unknown
 	d3d9on12.dll!00007fffd2b74ae0()	Unknown
 	d3d9on12.dll!00007fffd2bedf7b()	Unknown
 	d3d9.dll!CreateDeviceLHDDI()	Unknown
 	d3d9.dll!D3D9CreateDirectDrawObject()	Unknown
 	d3d9.dll!FetchDirectDrawData()	Unknown
 	d3d9.dll!InternalDirectDrawCreate()	Unknown
 	d3d9.dll!CEnum::CEnum()	Unknown
 	d3d9.dll!Direct3DCreate9Impl()	Unknown
 	d3d9.dll!Direct3DCreate9()	Unknown
 	dxdiagn.dll!00007ff811a2d75d()	Unknown
 	dxdiagn.dll!00007ff811a0ff30()	Unknown
 	dxdiagn.dll!00007ff8119f51ae()	Unknown
 	dxdiagn.dll!00007ff8119fa88f()	Unknown
 	dxdiagn.dll!00007ff8119fa54a()	Unknown
 	VsGraphicsExperiment.dll!00007ff8161c9587()	Unknown
 	VsGraphicsExperiment.dll!00007ff8161ace1a()	Unknown
 	VsGraphicsExperiment.dll!00007ff8161acefd()	Unknown
 	ntdll.dll!RtlpTpWorkCallback()	Unknown
 	ntdll.dll!TppWorkerThread()	Unknown
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

Everything returns 0x887a0005 "GetDeviceRemovedReason" (GPU device instance suspended)

I was going to rebuild the test DLL from #2 because I found a bug that kicked in when changing the resolution that might be mistaken for a D3D9on12 bug. However, something I changed in the ensuing days have caused D3D9on12 to start returning an error code that is 0x887a0005 that seems to be returned by every function and so appears in random places. MSVC has the following tooltip for the HRESULT value:

0x887a0005 : "The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action."

I wonder what I changed to evoke the wrath of this problem. I've never seen D3D9 require a "device reset" in years of working with it. Normally this kind of error is returned by functions like Present and GetCooperativeLevel I believe. I don't know, maybe every function returns it but that seems like a programming nightmare for every function to return this kind of error. I've never seen it before so I'm unsure.

[Edited: I am considering building the D3D9on12 project to get debug stuff and see if I can contribute. It's interesting and would be very helpful to me if it gets to the point of working or if I can identify what gives it trouble in order to avoid it. I just don't know if I have room in my schedule to take an afternoon to see if it builds easily or not.]

When using 64-kb page size, application verifier reports APPLICATION_VERIFIER_LEAK_ALLOCATION in d3d9on12.dll

With 64-kb pages enabled, via 

HKLM,"SYSTEM\CurrentControlSet\Control\GraphicsDrivers\MemoryManager",Use64KPages, %REG_DWORD%, 0x1, application verifier reports APPLICATION_VERIFIER_LEAK_ALLOCATION in d3d9on12.dll

Some call stack information from various instances:

BREAKPOINT_AVRF_80000003_d3d9on12.dll!Unloaded
APPLICATION_VERIFIER_LEAK_ALLOCATION (900)
ntdll!RtlDebugAllocateHeap
ntdll!RtlpAllocateHeap
ntdll!RtlpAllocateHeapInternal
vrfcore!VfCoreRtlAllocateHeap
vfbasics!AVrfpRtlAllocateHeap
ucrtbase!_malloc_base
ucrtbase!__crt_state_management::wrapped_invoke
vfbasics!AVrfp_ucrt__o_malloc
d3d9on12!operator new
d3d9on12!ShaderConv::CCodeBlob::Create
d3d9on12!ShaderConv::CTranslator::TranslateTLVS
d3d9on12!ShaderConv::ShaderConverterAPI::ConvertTLShader
d3d9on12!D3D9on12::VertexShader::GetD3D12ShaderForTL
d3d9on12!D3D9on12::VertexStage::ResolveDeferredState

D3D9On12 -> UnwrapUnderlyingResource crashes on unwrapping IDirect3DTexture9 texture while created with D3DUSAGE_AUTOGENMIPMAP flag, while it unwrap successfully if texture is created without D3DUSAGE_AUTOGENMIPMAP flag.

Hi,

We are facing below issue. Please help.

D3D9On12 -> UnwrapUnderlyingResource crashes on unwrapping IDirect3DTexture9 texture while created with D3DUSAGE_AUTOGENMIPMAP flag, while it unwrap successfully if texture is created without D3DUSAGE_AUTOGENMIPMAP flag.

We are facing an issue of application crash with following steps :

1. We have a DX9 texture with autogenmipmap flag on is created on DX9 device using the following function:
D3DXCreateTexture(device,
Width,
Height,
D3DX_DEFAULT,
D3DUSAGE_RENDERTARGET|D3DUSAGE_AUTOGENMIPMAP,
D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT,
&OutTexture)
2. We use UnwrapUnderlyingResource() to open this texture on DX12 resource using DX9on12 device.
3. UnwrapUnderlyingResource() is crashing randomly and ID3D12CommandList::SetGraphicsRoot32BitConstant() function is shown in debug logs when DX12 debug layer is enabled.
4. Below is the call stack.
pastedImG
5. When we create DX9 texture without AutoGenMipMap flag the application does not crashes.

d3d9on12 black screen and Intel UHD Graphics translation (2 in 1)

I have bad news, for now I just want to report this, but we encountered black screen twice in different games when using d3d9on12, the first case is not related to Intel UHD, I just implemented d3d9on12 support through patches, but got a black screen (on nvidia 960m), then I gave up trying, but recently at a new job I also encountered a black screen (in another game) for players who were using Intel UHD Graphics, using the debugger I found out that to my surprise Intel started translating d3d9 to d3d9on12, which led to a similar black screen problem, but At the same time, the sounds and the game itself work, but you still see a black screen.

Here is the news on the Intel website
https://www.intel.com/content/www/us/en/support/articles/000089893/graphics.html

Overall there are serious problems with d3d9on12, it's still a raw product, I don't know why intel decided to use it.
As for identifying the black screen problem, I am ready to provide the necessary information to try to find out the cause.
Let me clarify that there are two different games on dx9, in one I use patches, and in the other the Intel driver does it, in both cases there is a black screen, that is, d3d9on12.dll instability.

When using x64dbg, I managed to catch some exceptions that were somehow related to the comparison test eax,eax and in some cases eax contained 0x80004005, I don’t know what this result is, but the point is that this is some kind of returned result, which further leads to throw exception (this is inside the d3d9on12.dll functions)
These exceptions are thrown constantly while the process is running, perhaps this is the reason why we have a black screen, but this is more a consequence than a cause.

Memory Leaks with d3d9on12 layer in DX9 Application

I am encountering memory leaks in my DX9 application when using the d3d9on12 layer. The memory leaks seem to be related to the d3d9on12 layer, as I'm not able to see call stacks related to my own code when using UMDH memory report.

Upon further investigation, I've noticed that some traces suggest leaks in the destructor of classes that contain DX9 smart pointers like IDirect3DVertexDeclaration9Ptr, or in FreeResource function where I set these smart pointers to NULL.

image

Seeking for your help regarding this.

Crash while unwrapping Dx9 Texture and using its resource in compute and trying to render the same dx9 texture

Hello,

I am currently using D3D9On12 and I'm facing a problem that I hope you can help me with.

I have a texture on DX9 which I unwrap on a DX12 resource. I then set it in compute where I read its data and calculate luminance. This part is working fine.

However, when I try to render the same DX9 texture in any way, it crashes. The call stack shows d3d9on12.dll instead of my code.

I would appreciate any guidance or suggestions you might have to resolve this issue. Thank you in advance for your help!

Attachments:

  1. Call Stack
    image

  2. Output Traces
    image

Crash with 0xc0000005 when use MAGNIFICATION.dll

I got a crash when I use MAGNIFICATION.dll to capture screen frame, it is often appears when Lock screen or get a UAC dialog

Operating system: Windows NT
10.0.19045 3693
CPU: x86
GenuineIntel family 6 model 154 stepping 4
12 CPUs

GPU: UNKNOWN

Crash reason: EXCEPTION_ACCESS_VIOLATION_READ
Crash address: 0x734c1108
Exception code: 0xc0000005
Process uptime: 3493 seconds

#97 Thread 14392 (crashed)
0 D3D12Core.dll + 0x4e1b7!CLayeredObject::CContainedObject::QueryInterface(_GUID const&, void**) + 0x37
eip = 0x5348e1b7 esp = 0x27a7cc4c ebp = 0x27a7cc6c ebx = 0x27a7cd9c
esi = 0x5348e180 edi = 0x279365b8 eax = 0x734c1108 ecx = 0x279362b0
edx = 0x10010010 efl = 0x00010286
Found by: given as instruction pointer in context
1 D3D12Core.dll + 0x4bd83!D3D12CoreCreateDevice + 0x262
eip = 0x5348bd83 esp = 0x27a7cc74 ebp = 0x27a7cd90
Found by: call frame info
2 d3d9on12.dll + 0x35c0!_GUID_0ec870a6_5d7e_4c22_8cfc_5baae07616ed + 0x10
eip = 0x72cf35c0 esp = 0x27a7cc7c ebp = 0x27a7cd90
Found by: stack scanning
3 D3D12Core.dll + 0x4c899!D3D12ValidateAndCreateDevice + 0x129
eip = 0x5348c899 esp = 0x27a7cd98 ebp = 0x27a7cddc
Found by: previous frame's frame pointer
4 d3d12.dll + 0x62e6!D3D12CreateDeviceImpl(IUnknown*, D3D_FEATURE_LEVEL, _GUID const&, void**) + 0x76
eip = 0x736c62e6 esp = 0x27a7cde4 ebp = 0x27a7ce24
Found by: call frame info
5 d3d12.dll + 0x5f49!D3D12CreateDevice + 0x29
eip = 0x736c5f49 esp = 0x27a7ce2c ebp = 0x27a7ce40
Found by: call frame info
6 d3d9on12.dll + 0xde24!D3D9on12::Adapter::Adapter(_D3DDDI_ADAPTERCALLBACKS const&, _LUID*, _D3D9ON12_CREATE_DEVICE_ARGS*) + 0x35b
eip = 0x72cfde24 esp = 0x27a7ce48 ebp = 0x27a7cff0
Found by: call frame info
7 d3d9on12.dll + 0xda65!D3D9on12::OpenAdapter_Private(_D3DDDIARG_OPENADAPTER*, LUID*, D3D9ON12_CREATE_DEVICE_ARGS*) + 0xe5
eip = 0x72cfda65 esp = 0x27a7cff8 ebp = 0x27a7d064
Found by: call frame info
8 d3d9.dll + 0x5748a!CreateDeviceLHDDI + 0x45f
eip = 0x6341748a esp = 0x27a7d06c ebp = 0x27a7dcd0
Found by: call frame info
9 d3d9.dll + 0x526c8!D3D9CreateDirectDrawObject + 0x1be
eip = 0x634126c8 esp = 0x27a7dcd8 ebp = 0x27a7e540
Found by: call frame info
10 d3d9.dll + 0x54f43!FetchDirectDrawData + 0x11c
eip = 0x63414f43 esp = 0x27a7e548 ebp = 0x27a7ea34
Found by: call frame info
11 d3d9.dll + 0x583de!InternalDirectDrawCreate + 0x19c
eip = 0x634183de esp = 0x27a7ea3c ebp = 0x27a7ea70
Found by: call frame info
12 d3d9.dll + 0x64800!CEnum::CEnum(unsigned int, int, D3D9ON12_ARGS*, unsigned int) + 0x2b0
eip = 0x63424800 esp = 0x27a7ea78 ebp = 0x27a7eca0
Found by: call frame info
13 d3d9.dll + 0x6451c!Direct3DCreate9Impl(unsigned int, int, IDirect3D9Ex**, D3D9ON12_ARGS*, unsigned int) + 0xae
eip = 0x6342451c esp = 0x27a7eca8 ebp = 0x27a7edfc
Found by: call frame info
14 d3d9.dll + 0x64467!Direct3DCreate9Ex + 0x17
eip = 0x63424467 esp = 0x27a7ee04 ebp = 0x27a7ee10
Found by: call frame info
15 MAGNIFICATION.dll + 0x52de!CMilMagnifier::CreateAdapterMonitorDevicesD3D9(HWND
*) + 0x50
eip = 0x739352de esp = 0x27a7ee18 ebp = 0x27a7efd4
Found by: call frame info
16 MAGNIFICATION.dll + 0x3a6d!CMilMagnifier::UpdateWindowSettingsInternal(void) + 0xca
eip = 0x73933a6d esp = 0x27a7efdc ebp = 0x27a7f070
Found by: call frame info
17 MAGNIFICATION.dll + 0x3c6c!CMilMagnifier::UpdateWindowSettings(unsigned short, unsigned short) + 0x9d
eip = 0x73933c6c esp = 0x27a7f078 ebp = 0x27a7f098
Found by: call frame info
18 MAGNIFICATION.dll + 0x26cc!Magnifier_WndProc(HWND
*, _WM_VALUE, unsigned int, long) + 0x20c
eip = 0x739326cc esp = 0x27a7f0a0 ebp = 0x27a7f110
Found by: call frame info

High GPU usage on using D3D9On12

Hello,

We are facing high GPU usage when we use D3D9On12. For testing we are using Tut06_Meshes tutorial given in DirectX9 SDK (Path: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Samples\C++\Direct3D\Tutorials\Tut06_Meshes).

When we run this sample our GPU usage for this application 2-3 while if i run the same sample enabling device D3D9On12, our GPU usage goes to 10-15 with this sample.

GPU usages difference in our application is up to 25-30% between DirectX9 and D3D9On12.

Below is code snippet showing how we are creating D3D9On12Device.

image

We followed https://devblogs.microsoft.com/directx/coming-to-directx-12-d3d9on12-and-d3d11on12-resource-interop-apis/ this devblog to convert our Engine from DirectX12 to D3D9On12.

Please help. !!!!!

Get IDXGISwapchain for a given IDirect3DSwapChain9 instance.

I would like to render directx9 content in a SwapChainPanel via D3D9On12, but I can't seem to figure out how to get access to the IDXGI_Swapchain. Is there any way to get the IDXGI_Swapchain for a given IDirect3DSwapChain9? If not, could you consider adding this as a feature.

Halo Custom Edition with Open Sauce crashes almost instantly

I don't know if this is the right place to post this. I am using Windows 11 Home Edition 21H2 22000.1042 on my laptop. It has an iGPU with Intel Iris Xe and a dGPU with Nvidia Geforce RTX 3050 Ti. I have read that Intel Iris Xe has removed true D3D9 support in favor of this module, not sure if this is true on Nvidia's end.

After installing the mod Open Sauce 4.0 onto a copy of Halo Custom Edition, I have found that when opening the game, it loads for a couple seconds and then silently crashes to the desktop. This occurs regardless of whether I have it set to render using the integrated graphics or the dedicated graphics. This crash does not occur if Open Sauce 4.0 is not installed. Nor does it occur if Open Sauce 4.0 is installed but I am using a graphics wrapper (either DGVoodoo2 or DXVK work). Since the crash affects both graphics cards, I'm wondering if this is the cause of the crash.

NULL_CLASS_PTR_READ_c0000005_d3d9on12.dll

Hello,

I've tried all known Intel Iris Xe drivers and they all get the same crash. I did a memory test with the app at https://memtest.org/ and it passed. When I disable the Intel Iris Xe device from the device manager, the problem is solved. The game usually crashes between 4 and 10 minutes.

Dmp file:
https://drive.google.com/file/d/1a431zmOc6HDgvfPXnaN1J_oDNTascK9J/view?usp=sharing

I downloaded and recompiled the library to follow up on the problem. I saved the value of pResource->GetDesc()->Width from the InputAssembly::SetVertexBuffer method to the file until the game crashed.

I tried this game on many computers with up-to-date hardware, none of them have this problem.

Driver problem or d3d9on12 mapping layer?

Intel Community Link :
https://community.intel.com/t5/Graphics/i7-12700H-Intel-Iris-Xe-Game-Crash-on-d3d9on12-dll/td-p/1426476

The last lines of the output (1)

bufferSize:112
bufferSize:112
bufferSize:112
bufferSize:112
bufferSize:112
bufferSize:32768
bufferSize:112
bufferSize:112
bufferSize:32768
bufferSize:112
bufferSize:32768
bufferSize:112
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:8810597777358030847 ->when it crashed

The last lines of the output (2)

bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:32768
bufferSize:16809754405499322002 -> when it crashed

    HRESULT InputAssembly::SetVertexBuffer(Device& device, Resource* pResource, UINT vbSlot, UINT offset, UINT stride)
    {
        HRESULT hr = S_OK;
        if (pResource) {
            LOG_("bufferSize", std::to_string(pResource->GetDesc().Width ? pResource->GetDesc().Width : 0));
        }

        const UINT64 bufferSize = pResource ? pResource->GetDesc().Width : 0;

        InputBuffer& inputBuffer = m_inputStreams[vbSlot];
        Resource* pPrevResource = m_inputStreams[vbSlot].GetAppResource();

System Information

  Time of this report: 11/10/2022, 17:51:30
         Machine name: ***
           Machine Id: {1867AEC7-407A-4918-9B2E-57E57CE1EC54}
     Operating System: Windows 11 Pro 64-bit (10.0, Build 22621) (22621.ni_release.220506-1250)
             Language: Turkish (Regional Setting: Turkish)
  System Manufacturer: HUAWEI
         System Model: RLEF-XX
                 BIOS: 1.23 (type: UEFI)
            Processor: 12th Gen Intel(R) Core(TM) i7-12700H (20 CPUs), ~2.3GHz
               Memory: 16384MB RAM
  Available OS Memory: 16110MB RAM
            Page File: 13580MB used, 6626MB available
          Windows Dir: C:\Windows
      DirectX Version: DirectX 12
  DX Setup Parameters: Not found
     User DPI Setting: 96 DPI (100 percent)
   System DPI Setting: 120 DPI (125 percent)
      DWM DPI Scaling: UnKnown
             Miracast: Available, with HDCP

Microsoft Graphics Hybrid: Not Supported
DirectX Database Version: 1.4.3
DxDiag Version: 10.00.22621.0001 64bit Unicode

Stack buffer overflow

We are seeing application crashes with stack buffer overflow error. Would you be able to check the issue?

BUGCHECK_STR:  APPLICATION_FAULT_STACK_BUFFER_OVERRUN_WRONG_SYMBOLS

PRIMARY_PROBLEM_CLASS:  STACK_BUFFER_OVERRUN

DEFAULT_BUCKET_ID:  STACK_BUFFER_OVERRUN

LAST_CONTROL_TRANSFER:  from 77b3e17b to 77b3eddb

STACK_TEXT:  
77b3eddb ucrtbase!abort+0x4b
77b3e17b ucrtbase!terminate+0x3b
77af7925 ucrtbase!NLG_Return+0x61e
77af7be7 ucrtbase!NLG_Return+0x8e0
77af6df6 ucrtbase!_CxxFrameHandler3+0x26
77dc8bb2 ntdll!RtlInterlockedCompareExchange64+0x1e2
77dc8b84 ntdll!RtlInterlockedCompareExchange64+0x1b4
77db5006 ntdll!KiUserExceptionDispatcher+0x26
77af6ea8 ucrtbase!CxxThrowException+0x68
51a90b2d d3d9on12!OpenAdapter+0xb1d
51acd46f d3d9on12!GetPrivateDDITable+0x3807f
51acd262 d3d9on12!GetPrivateDDITable+0x37e72
51acd63a d3d9on12!GetPrivateDDITable+0x3824a
51ac6737 d3d9on12!GetPrivateDDITable+0x31347
51ac1a90 d3d9on12!GetPrivateDDITable+0x2c6a0
51ac1a39 d3d9on12!GetPrivateDDITable+0x2c649
51ac1e30 d3d9on12!GetPrivateDDITable+0x2ca40
51ac1b7e d3d9on12!GetPrivateDDITable+0x2c78e
51a99dec d3d9on12!GetPrivateDDITable+0x49fc
51a9a2e8 d3d9on12!GetPrivateDDITable+0x4ef8
51a9a88b d3d9on12!GetPrivateDDITable+0x549b
51a9a979 d3d9on12!GetPrivateDDITable+0x5589
51b63c5f d3d9+0x53c5f
51bf2d64 d3d9!Ordinal23+0x1b1c4
51bf298b d3d9!Ordinal23+0x1adeb
54d53e9e wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x2ca4e
54d58a91 wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x31641
54d63b84 wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x3c734
54d542ad wpfgfx_v0400!RenderOptions_IsSoftwareRenderingForcedForProcess+0x2ce5d
54d0f4af wpfgfx_v0400!WgxConnection_Disconnect+0x798f
54ccbf56 wpfgfx_v0400!MILQueryInterface+0xdcc6
54ccbcff wpfgfx_v0400!MILQueryInterface+0xda6f
54ccbd5f wpfgfx_v0400!MILQueryInterface+0xdacf
54cb21c0 wpfgfx_v0400!MilComposition_PeekNextMessage+0xc380
54cb227e wpfgfx_v0400!MilComposition_PeekNextMessage+0xc43e
54cb11b7 wpfgfx_v0400!MilComposition_PeekNextMessage+0xb377
54cb148e wpfgfx_v0400!MilComposition_PeekNextMessage+0xb64e
54cb13aa wpfgfx_v0400!MilComposition_PeekNextMessage+0xb56a
54cb1386 wpfgfx_v0400!MilComposition_PeekNextMessage+0xb546
54cd9255 wpfgfx_v0400!MilVersionCheck+0xe5
75cc00f9 KERNEL32!BaseThreadInitThunk+0x19
77da7bbe ntdll!RtlGetAppContainerNamedObjectPath+0x11e
77da7b8e ntdll!RtlGetAppContainerNamedObjectPath+0xee

pls help crashed on intel uhd 770,windows 10, probably memory leak

Our game player reported one crash on intel uhd 770, windows10, our game is based d3d9 , Game engine error log has printed "ENGINE_INIT:RenderAPI Error:Context::DrawIndexed :hr = 80004005, primitive=0, base index=0, vertex count=20, start index=0, primitive count=10", and found stack crash on d3d9on12.dll, After profile the client, I find it probably exsist memory leak in d3d9on12, I also try use d3d dynamic vertex buffer and index buf with discard flag to draw dynamic vertex, still found memory grow in each frame lock buffer.
wpa1
lockleak
,

Teams.exe crashes with error in D3D9On12 module.

When I join the meeting in Teams Desktop on Windows 11 built 22483.1000 on ARM64 computer (Surface Pro X), the application crashes with error below in the module D3D9On12.dll . Teams is an ARM64 native application in this platform. The error happens from about a month. If I use web version of Teams through browser on the same device, there is no problem. Use of Teams with Calendar, chat etc, is not affected. This error renders Teams useless for meetings, which is one of the chief uses of it.

Faulting application name: Teams.exe, version: 1.4.0.26376, time stamp: 0x61041d09
Faulting module name: d3d9on12.dll, version: 10.0.22483.1000, time stamp: 0x3a2b3573
Exception code: 0xc0000005
Fault offset: 0x00000000000d54f0
Faulting process id: 0x3ddc
Faulting application start time: 0x01d7cb3d67352a6e
Faulting application path: C:\Users\mbalc\AppData\Local\Microsoft\Teams\current\Teams.exe
Faulting module path: C:\WINDOWS\SYSTEM32\d3d9on12.dll
Report Id: ad3d581b-26a7-4947-b402-bec5d78301b6
Faulting package full name:
Faulting package-relative application ID

Intermittently getting Error (0x8876086A) During calls to CreateDeviceEx()

We have a DX9 application running on an Intel Iris XE GPU (which uses D3D9on12 for Directx9 support). During calls to CreateDeviceEx() we intermittently get a 0x8876086A error code. As for our usage when we call:

DeviceType is D3DDEVTYPE_HAL
BehaviorFlags are set to “D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_NOWINDOWCHANGES | D3DCREATE_MULTITHREADED | D3DCREATE_FPU_PRESERVE”
pFullscreenDisplayMode is null
And these are the presentation parameters used:

pp.BackBufferWidth = 1;
pp.BackBufferHeight = 1;
pp.Windowed = TRUE;
pp.SwapEffect = D3DSWAPEFFECT_COPY;
pp.BackBufferFormat = D3DFMT_UNKNOWN;
pp.hDeviceWindow = hwnd;
pp.Flags = D3DPRESENTFLAG_VIDEO;
pp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;

Bugs with MPC-HC player

Player downloads and source code:
https://github.com/clsid2/mpc-hc

Users with Intel Xe graphics have reported these issues with DX9 renderers:

  1. Let video play until end. Then seek backwards to any place in the video. Video frame is then stuck, while everything else (audio) works normally.
  2. Color controls do not work properly (black video). Options > Miscellaneous > Color Controls

You can select affected renderers here:
Options > Playback > Output > Video Renderer
Use Enhanced Video Renderer (Custom Presenter) or VMR-9 (Renderless).

I don't have a recent gen Intel GPU myself to test on. It might be a driver bug. But it seems to affect mostly the recent GPU generation drivers that use d3d9on12.

Several crashes in d3d9on12:
https://drdump.com/Problem.aspx?ProblemID=785049 (you can login as guest)

Are DLL versions + crash offset enough? I can easily add those in a followup post. Otherwise I need an email address to send crash dumps to.

WPF 3D content not working on Intel Iris XE

Hey,

from all informations I have now I think this is the right place to discuss this problem.

The problem is that WPF 3D content will not work on intel graphics without D3D9 support like the iris XE.
The first thread I opened was this one:
https://community.intel.com/t5/Graphics/Graphics-failure-with-WPF-3D-content-and-Iris-XE/td-p/1415196
It describes the problem in detail.

As Intel itself could not reproduce this issue I opened another one at the WPF repo:
dotnet/wpf#7076

But now it turned out that Intel can also reproduce this issue:
https://community.intel.com/t5/Graphics/3D-rendering-issue-on-12th-gen-Intel-Core-i3/m-p/1407118/highlight/true#M109118

@IanDunn-Intel @vdwtanner can you please look into this. Looks like more people are getting this problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.