-2

The title says it all. But, are there too many files to be replaced and is there a risk? What I mean is, there are files like d3d11.dll. Could I replace the files with with something like d3d12.dll or something like that?

Lenin
  • 1
  • 1
  • 1
    The title actually doesn't say anything. What do you mean by replacing dx11 with dx12? – mateeeeeee Sep 06 '22 at 20:02
  • No you can't. The answer says it all I guess. d3d12 is not binary compatible from d3d11 at all. – Simon Mourier Sep 07 '22 at 05:49
  • This seems to be an XY problem. ¿What are you trying to achieve by replacing dlls? Switching any application from DirectX11 to DirectX12 would require a major rewriting of rendering code, not some dll swapping. – user7860670 Sep 07 '22 at 08:18
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 08 '22 at 03:09

1 Answers1

2

When code is compiled it uses 'headers' and usually links to 'libraries' which refer to functions inside the dll. When the game loads it maps the DLL into the address space of the executable so that the program can use features in the DLL. So if the Game does D3D11_DrawTriangles, it will end up calling that feature in d3d11.dll. Dropping in the DX12 DLL won't work because the expected function is no longer there (and besides, the executable would still be looking for the 11 DLL - it wouldn't even load). Upgrading from DX11 to DX12 is a major undertaking; the graphics APIs are very different.

Put another way: It's like someone dropped a Fiat engine into your Volvo. Would it work? How much effort would it be to rewire all the pipes and electronics to make it work?

cmaughan
  • 2,596
  • 5
  • 30
  • 35
  • Specifically, the ``d3d11.dll`` exports the function **D3D11CreateDevice**, and the ``d3d12.dll`` exports the function **D3D12CreateDevice**. They create unrelated COM interface objects. – Chuck Walbourn Sep 09 '22 at 05:36