Skip to content

Commit 9fb6a2d

Browse files
[meta] Add a driver dll entry for Intel
1 parent bb4e7c3 commit 9fb6a2d

4 files changed

Lines changed: 21 additions & 13 deletions

File tree

‎src/ddraw/ddraw4/ddraw4_interface.cpp‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,20 +844,21 @@ namespace dxvk {
844844
const d3d9::D3DADAPTER_IDENTIFIER9* adapterIdentifier9 = m_commonIntf->GetAdapterIdentifier();
845845
// This is the "2D accelerator" device in the system
846846
if (unlikely(dwFlags & DDGDI_GETHOSTIDENTIFIER)) {
847-
static const char* CompatHostDriver = "vga.dll";
847+
static constexpr uint16_t CompatHostVendorID = static_cast<uint16_t>(DDrawGpuVendor::VGA);
848+
static const char* CompatHostDriver = GetDriverDLL(CompatHostVendorID);
848849
// The Matrox G400 TechDemo expects the description to be aligned with native
849850
static const char* CompatHostDescription = "DirectDraw HAL";
850851

851852
CopyToStringArray(pDDDI->szDriver, CompatHostDriver);
852853
CopyToStringArray(pDDDI->szDescription, CompatHostDescription);
853854
pDDDI->liDriverVersion.QuadPart = 0;
854-
pDDDI->dwVendorId = 0;
855+
pDDDI->dwVendorId = CompatHostVendorID;
855856
pDDDI->dwDeviceId = 0;
856857
pDDDI->dwSubSysId = 0;
857858
pDDDI->dwRevision = 0;
858859
pDDDI->guidDeviceIdentifier = pDDDIproxy.guidDeviceIdentifier;
859860
} else if (unlikely(m_commonIntf->GetOptions()->glideCompatibilityMode)) {
860-
static constexpr uint16_t Compat3dfxVendorID = static_cast<uint16_t>(DDrawGpuVendor::C3dfx);
861+
static constexpr uint16_t Compat3dfxVendorID = static_cast<uint16_t>(DDrawGpuVendor::Зdfx);
861862
static constexpr uint16_t Compat3dfXDeviceID = 0x0009; // Voodoo 4 4500
862863
static const char* Compat3dfxDriver = GetDriverDLL(Compat3dfxVendorID);
863864
static const char* Compat3dfxDescription = "3dfx Voodoo Series";

‎src/ddraw/ddraw7/ddraw7_interface.cpp‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -823,21 +823,22 @@ namespace dxvk {
823823
const d3d9::D3DADAPTER_IDENTIFIER9* adapterIdentifier9 = m_commonIntf->GetAdapterIdentifier();
824824
// This is the "2D accelerator" device in the system
825825
if (unlikely(dwFlags & DDGDI_GETHOSTIDENTIFIER)) {
826-
static const char* CompatHostDriver = "vga.dll";
826+
static constexpr uint16_t CompatHostVendorID = static_cast<uint16_t>(DDrawGpuVendor::VGA);
827+
static const char* CompatHostDriver = GetDriverDLL(CompatHostVendorID);
827828
// The Matrox G400 TechDemo expects the description to be aligned with native
828829
static const char* CompatHostDescription = "DirectDraw HAL";
829830

830831
CopyToStringArray(pDDDI->szDriver, CompatHostDriver);
831832
CopyToStringArray(pDDDI->szDescription, CompatHostDescription);
832833
pDDDI->liDriverVersion.QuadPart = 0;
833-
pDDDI->dwVendorId = 0;
834+
pDDDI->dwVendorId = CompatHostVendorID;
834835
pDDDI->dwDeviceId = 0;
835836
pDDDI->dwSubSysId = 0;
836837
pDDDI->dwRevision = 0;
837838
pDDDI->guidDeviceIdentifier = pDDDIproxy.guidDeviceIdentifier;
838839
pDDDI->dwWHQLLevel = 0;
839840
} else if (unlikely(m_commonIntf->GetOptions()->glideCompatibilityMode)) {
840-
static constexpr uint16_t Compat3dfxVendorID = static_cast<uint16_t>(DDrawGpuVendor::C3dfx);
841+
static constexpr uint16_t Compat3dfxVendorID = static_cast<uint16_t>(DDrawGpuVendor::Зdfx);
841842
static constexpr uint16_t Compat3dfXDeviceID = 0x0009; // Voodoo 4 4500
842843
static const char* Compat3dfxDriver = GetDriverDLL(Compat3dfxVendorID);
843844
static const char* Compat3dfxDescription = "3dfx Voodoo Series";

‎src/ddraw/ddraw_include.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ __CRT_UUID_DECL(d3d9::IDirect3DDevice9Ex, 0xB18B10CE, 0x2649, 0x405A, 0
155155
#define DLLEXPORT
156156
#endif
157157

158-
// Don't use any SSE2 specific paths when compiling for ARM(64)
159-
#if !defined(_ARM_) && !defined(_M_ARM)
160-
#define DXVK_SWVP_SSE2 TRUE
158+
// Don't use SSE2 specific paths when compiling for non x86(-64) architectures
159+
#if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)
160+
#define DXVK_SWVP_SSE2
161161
#endif
162162

163163

‎src/ddraw/ddraw_util.h‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
namespace dxvk {
1313

1414
enum class DDrawGpuVendor : uint16_t {
15+
VGA = 0x0000, // Standard 2D host adapter
1516
ATI = 0x1002,
1617
Nvidia = 0x10DE,
17-
C3dfx = 0x121A,
18+
Зdfx = 0x121A,
19+
Intel = 0x8086,
1820
};
1921

2022
struct PackedVertexBuffer {
@@ -142,14 +144,18 @@ namespace dxvk {
142144

143145
inline const char* GetDriverDLL(uint16_t vendor) {
144146
switch (DDrawGpuVendor(vendor)) {
145-
// Windows XP Nvidia driver dll name
146-
case DDrawGpuVendor::Nvidia: return "nv4_disp.dll";
147+
// Standard 2D host adapter driver dll name
148+
case DDrawGpuVendor::VGA: return "vga.dll";
147149
default:
148150
// Radeon era ATI(/AMD) driver dll name
149151
case DDrawGpuVendor::ATI: return "ati2dvag.dll";
152+
// Windows XP Nvidia driver dll name
153+
case DDrawGpuVendor::Nvidia: return "nv4_disp.dll";
150154
// 3dfx driver dll name
151155
// TODO: Check on an actual/emulated Voodoo card
152-
case DDrawGpuVendor::C3dfx: return "3dfx32vs.dll";
156+
case DDrawGpuVendor::Зdfx: return "3dfx32vs.dll";
157+
// Masked by default
158+
case DDrawGpuVendor::Intel: return "igxprd32.dll";
153159
}
154160
}
155161

0 commit comments

Comments
 (0)