Code Monkey home page Code Monkey logo

Comments (11)

GabrielMajeri avatar GabrielMajeri commented on May 17, 2024

The information on the Intel driver on the wiki applies to both Linux and Windows.

All Intel drivers currently lack depth bounds and UAVs, and without those features DXVK won't work.

from dxvk.

oscarbg avatar oscarbg commented on May 17, 2024

Ah OK I saw ANV driver not supported not remembered Windows driver is about the same..

from dxvk.

doitsujin avatar doitsujin commented on May 17, 2024

Can you post vulkaninfo output? My guess is that DXVK is trying to use some features that the driver doesn't support, which is actually the case on ANV driver at the moment.

from dxvk.

GabrielMajeri avatar GabrielMajeri commented on May 17, 2024

I'd recently wanted to find out whether there is a difference between Intel ANV and Intel for Windows.

I uploaded a GPU report for Windows here, and one on ArchLinux here. depthBounds are not supported on either.

Here's a diff of all the features.

diff windows linux 
27c27
< shaderInt16	true
---
> shaderInt16	false
29,30c29,30
< shaderResourceMinLod	true
< shaderResourceResidency	true
---
> shaderResourceMinLod	false
> shaderResourceResidency	false
35c35
< shaderStorageImageMultisample	true
---
> shaderStorageImageMultisample	false
40,48c40,48
< sparseBinding	true
< sparseResidency16Samples	true
< sparseResidency2Samples	true
< sparseResidency4Samples	true
< sparseResidency8Samples	true
< sparseResidencyAliased	true
< sparseResidencyBuffer	true
< sparseResidencyImage2D	true
< sparseResidencyImage3D	true
---
> sparseBinding	false
> sparseResidency16Samples	false
> sparseResidency2Samples	false
> sparseResidency4Samples	false
> sparseResidency8Samples	false
> sparseResidencyAliased	false
> sparseResidencyBuffer	false
> sparseResidencyImage2D	false
> sparseResidencyImage3D	false
53c53
< variableMultisampleRate	true
---
> variableMultisampleRate	false

from dxvk.

oscarbg avatar oscarbg commented on May 17, 2024

The issue is about calling vkCreateInstance on his driver ends up calling your dxgi CreateDXGIFactory or CreateDXGIFactory1 method which also ends up calling vkCreateInstance:
I solve assuming first call to CreateDXGIFactory* is from app others are from Intel Vulkan driver:
very crude hack:
feel free to improve:
note I have seen in AMD or Nvidia Vulkan driver binaries also DXGI and CreateDXGIFactory references but may be they end up loading correct DXGI from Windows system folder..
may be it's an Intel bug and should be pointed to them..

--- C:\dxvk\igpu2\dxvk\src\dxgi\dxgi_mainori - copia.cpp	2018-03-02 17:37:04.831000000 +0100
+++ C:\dxvk\igpu2\dxvk\src\dxgi\dxgi_main.cpp	2018-03-02 18:04:17.604000000 +0100
@@ -22,12 +22,39 @@
   }
 }
 
+typedef HRESULT (__stdcall PFN_trueCreateDXGIFactory1)(REFIID riid, _COM_Outptr_  void **ppFactory);
+typedef HRESULT(__stdcall PFN_trueCreateDXGIFactory)(REFIID riid, _COM_Outptr_  void **ppFactory);
+
 extern "C" {
+	static int counter1 = 0;
+	
   DLLEXPORT HRESULT __stdcall CreateDXGIFactory1(REFIID riid, void **ppFactory) {
-    return dxvk::createDxgiFactory(riid, ppFactory);
+	  counter1++;
+		if (counter1 > 1)
+		{
+			HMODULE lib = LoadLibrary("c:\\windows\\system32\\dxgi.dll");
+			PFN_trueCreateDXGIFactory1 *fp = (PFN_trueCreateDXGIFactory1*) GetProcAddress(lib, "CreateDXGIFactory1");
+			// cast p to the approriate function pointer type (fp) and call it
+
+			return fp(riid, ppFactory);
+			FreeLibrary(lib);
+		}
+		else
+			return dxvk::createDxgiFactory(riid, ppFactory);
   }
   
   DLLEXPORT HRESULT __stdcall CreateDXGIFactory(REFIID riid, void **ppFactory) {
+	  counter1++;
+		if (counter1 > 1)
+		{
+			HMODULE lib = LoadLibrary("c:\\windows\\system32\\dxgi.dll");
+			PFN_trueCreateDXGIFactory *fp = (PFN_trueCreateDXGIFactory*)GetProcAddress(lib, "CreateDXGIFactory");
+			// cast p to the approriate function pointer type (fp) and call it
+
+			return fp(riid, ppFactory);
+			FreeLibrary(lib);
+		}
+		else
     return dxvk::createDxgiFactory(riid, ppFactory);
   }
 }
\ No newline at end of file

from dxvk.

doitsujin avatar doitsujin commented on May 17, 2024

I'll close this as I have no intention to support a workaround only for Intel's Windows driver.

from dxvk.

kaydenl avatar kaydenl commented on May 17, 2024

To clarify...Intel GPU hardware doesn't support depth bounds test. Drivers would have to emulate the feature with software, and none of them - on any OS - do that today. So, this resolution basically means "DXVK won't work on Intel GPUs".

It seems a bit odd to require a feature that's optional even in DX12...

from dxvk.

doitsujin avatar doitsujin commented on May 17, 2024

@kaydenl The depth bounds requirement was a mistake that I fixed several months ago, and DXVK works on ANV (sort of). It doesn't work on the Windows driver because it tries to create a DXGI factory, but it does so with DXVK's dxgi.dll and not the one provided by Microsoft, which results in an infinite recursion.

from dxvk.

kaydenl avatar kaydenl commented on May 17, 2024

Oh, nevermind then. Thanks! Someone was confused and asking us to support that feature for DXVK. Sounds like we don't need to.

from dxvk.

ryao avatar ryao commented on May 17, 2024

@doitsujin That someone was me. @kaydenl Thanks for taking the time to comment on this. I appreciate it. :)

from dxvk.

oscarbg avatar oscarbg commented on May 17, 2024

I have pinged @SlawomirCn of Intel Win Vulkan team on twitter.. let'see if it can help..
also seems is @scygan user of github?
also seems slawomir.grajewski 'at' intel.com is another dev who can possibly help..
mailing later if no response..

from dxvk.

Related Issues (20)

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.