1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-23 19:54:16 +01:00

[d3d8] A few minor formatting adjustments

This commit is contained in:
WinterSnowfall 2025-02-13 23:14:26 +02:00 committed by Philip Rebohle
parent 3269f92138
commit 8efa3ed84a
4 changed files with 38 additions and 40 deletions

View File

@ -59,30 +59,30 @@ namespace dxvk {
// Add D3D8-specific caps: // Add D3D8-specific caps:
// Removed in D3D9, since it can always render windowed // Removed in D3D9, since it can always render windowed
pCaps8->Caps2 |= D3DCAPS2_CANRENDERWINDOWED; pCaps8->Caps2 |= D3DCAPS2_CANRENDERWINDOWED
// A remnant from a bygone age of ddraw interop most likely // A remnant from a bygone age of ddraw interop most likely
// | D3DCAPS2_NO2DDURING3DSCENE; /* | D3DCAPS2_NO2DDURING3DSCENE*/;
// Used in conjunction with D3DPRASTERCAPS_PAT, but generally unadvertised // Used in conjunction with D3DPRASTERCAPS_PAT, but generally unadvertised
//pCaps8->PrimitiveMiscCaps |= D3DPMISCCAPS_LINEPATTERNREP; /*pCaps8->PrimitiveMiscCaps |= D3DPMISCCAPS_LINEPATTERNREP;*/
// Replaced by D3DPRASTERCAPS_DEPTHBIAS in D3D9 // Replaced by D3DPRASTERCAPS_DEPTHBIAS in D3D9
pCaps8->RasterCaps |= D3DPRASTERCAPS_ZBIAS; pCaps8->RasterCaps |= D3DPRASTERCAPS_ZBIAS
// Advertised on Nvidia cards by modern drivers, but not on AMD or Intel // Advertised on Nvidia cards by modern drivers, but not on AMD or Intel
// | D3DPRASTERCAPS_ANTIALIASEDGES /* | D3DPRASTERCAPS_ANTIALIASEDGES*/
// Advertised on Nvidia cards, but not on AMD or Intel // Advertised on Nvidia cards, but not on AMD or Intel
// | D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE /* | D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE*/
// TODO: Implement D3DRS_LINEPATTERN - vkCmdSetLineRasterizationModeEXT // TODO: Implement D3DRS_LINEPATTERN - vkCmdSetLineRasterizationModeEXT
// | D3DPRASTERCAPS_PAT; /* | D3DPRASTERCAPS_PAT*/;
// MAG only filter caps, generally unsupported // MAG only filter caps, generally unsupported
//pCaps8->TextureFilterCaps |= D3DPTFILTERCAPS_MAGFAFLATCUBIC /*pCaps8->TextureFilterCaps |= D3DPTFILTERCAPS_MAGFAFLATCUBIC*/
// | D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC; /* | D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC;*/
//pCaps8->CubeTextureFilterCaps = pCaps8->TextureFilterCaps; /*pCaps8->CubeTextureFilterCaps = pCaps8->TextureFilterCaps;*/
//pCaps8->VolumeTextureFilterCaps = pCaps8->TextureFilterCaps; /*pCaps8->VolumeTextureFilterCaps = pCaps8->TextureFilterCaps;*/
// Not advertised on any modern hardware // Not advertised on any modern hardware
//pCaps8->VertexProcessingCaps |= D3DVTXPCAPS_NO_VSDT_UBYTE4; /*pCaps8->VertexProcessingCaps |= D3DVTXPCAPS_NO_VSDT_UBYTE4;*/
} }
// (9<-8) D3DD3DPRESENT_PARAMETERS: Returns D3D9's params given an input for D3D8 // (9<-8) D3DD3DPRESENT_PARAMETERS: Returns D3D9's params given an input for D3D8

View File

@ -63,21 +63,21 @@ interface DECLSPEC_UUID("4B8AAAFA-140F-42BA-9131-597EAFAA2EAD") IDirect3DVolumeT
#endif #endif
#ifdef __MINGW32__ #ifdef __MINGW32__
#define __CRT_UUID_DECL(type,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ #define __CRT_UUID_DECL(type,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
} \ } \
extern "C++" template<> struct __mingw_uuidof_s<d3d9::type> { static constexpr IID __uuid_inst = {l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8}}; }; \ extern "C++" template<> struct __mingw_uuidof_s<d3d9::type> { static constexpr IID __uuid_inst = {l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8}}; }; \
extern "C++" template<> constexpr const GUID &__mingw_uuidof<d3d9::type>() { return __mingw_uuidof_s<d3d9::type>::__uuid_inst; } \ extern "C++" template<> constexpr const GUID &__mingw_uuidof<d3d9::type>() { return __mingw_uuidof_s<d3d9::type>::__uuid_inst; } \
extern "C++" template<> constexpr const GUID &__mingw_uuidof<d3d9::type*>() { return __mingw_uuidof_s<d3d9::type>::__uuid_inst; } \ extern "C++" template<> constexpr const GUID &__mingw_uuidof<d3d9::type*>() { return __mingw_uuidof_s<d3d9::type>::__uuid_inst; } \
namespace d3d9 { namespace d3d9 {
#elif defined(__GNUC__) #elif defined(__GNUC__)
#define __CRT_UUID_DECL(type, a, b, c, d, e, f, g, h, i, j, k) \ #define __CRT_UUID_DECL(type, a, b, c, d, e, f, g, h, i, j, k) \
} \ } \
extern "C++" { template <> constexpr GUID __uuidof_helper<d3d9::type>() { return GUID{a,b,c,{d,e,f,g,h,i,j,k}}; } } \ extern "C++" { template <> constexpr GUID __uuidof_helper<d3d9::type>() { return GUID{a,b,c,{d,e,f,g,h,i,j,k}}; } } \
extern "C++" { template <> constexpr GUID __uuidof_helper<d3d9::type*>() { return __uuidof_helper<d3d9::type>(); } } \ extern "C++" { template <> constexpr GUID __uuidof_helper<d3d9::type*>() { return __uuidof_helper<d3d9::type>(); } } \
extern "C++" { template <> constexpr GUID __uuidof_helper<const d3d9::type*>() { return __uuidof_helper<d3d9::type>(); } } \ extern "C++" { template <> constexpr GUID __uuidof_helper<const d3d9::type*>() { return __uuidof_helper<d3d9::type>(); } } \
extern "C++" { template <> constexpr GUID __uuidof_helper<d3d9::type&>() { return __uuidof_helper<d3d9::type>(); } } \ extern "C++" { template <> constexpr GUID __uuidof_helper<d3d9::type&>() { return __uuidof_helper<d3d9::type>(); } } \
extern "C++" { template <> constexpr GUID __uuidof_helper<const d3d9::type&>() { return __uuidof_helper<d3d9::type>(); } } \ extern "C++" { template <> constexpr GUID __uuidof_helper<const d3d9::type&>() { return __uuidof_helper<d3d9::type>(); } } \
namespace d3d9 { namespace d3d9 {
#endif #endif
@ -126,27 +126,27 @@ namespace d3d9 {
// Missed definitions in Wine/MinGW. // Missed definitions in Wine/MinGW.
#ifndef D3DPRESENT_BACK_BUFFERS_MAX_EX #ifndef D3DPRESENT_BACK_BUFFERS_MAX_EX
#define D3DPRESENT_BACK_BUFFERS_MAX_EX 30 #define D3DPRESENT_BACK_BUFFERS_MAX_EX 30
#endif #endif
#ifndef D3DSI_OPCODE_MASK #ifndef D3DSI_OPCODE_MASK
#define D3DSI_OPCODE_MASK 0x0000FFFF #define D3DSI_OPCODE_MASK 0x0000FFFF
#endif #endif
#ifndef D3DSP_TEXTURETYPE_MASK #ifndef D3DSP_TEXTURETYPE_MASK
#define D3DSP_TEXTURETYPE_MASK 0x78000000 #define D3DSP_TEXTURETYPE_MASK 0x78000000
#endif #endif
#ifndef D3DUSAGE_AUTOGENMIPMAP #ifndef D3DUSAGE_AUTOGENMIPMAP
#define D3DUSAGE_AUTOGENMIPMAP 0x00000400L #define D3DUSAGE_AUTOGENMIPMAP 0x00000400L
#endif #endif
#ifndef D3DSP_DCL_USAGE_MASK #ifndef D3DSP_DCL_USAGE_MASK
#define D3DSP_DCL_USAGE_MASK 0x0000000f #define D3DSP_DCL_USAGE_MASK 0x0000000f
#endif #endif
#ifndef D3DSP_OPCODESPECIFICCONTROL_MASK #ifndef D3DSP_OPCODESPECIFICCONTROL_MASK
#define D3DSP_OPCODESPECIFICCONTROL_MASK 0x00ff0000 #define D3DSP_OPCODESPECIFICCONTROL_MASK 0x00ff0000
#endif #endif
#ifndef D3DSP_OPCODESPECIFICCONTROL_SHIFT #ifndef D3DSP_OPCODESPECIFICCONTROL_SHIFT
@ -154,31 +154,31 @@ namespace d3d9 {
#endif #endif
#ifndef D3DCURSOR_IMMEDIATE_UPDATE #ifndef D3DCURSOR_IMMEDIATE_UPDATE
#define D3DCURSOR_IMMEDIATE_UPDATE 0x00000001L #define D3DCURSOR_IMMEDIATE_UPDATE 0x00000001L
#endif #endif
#ifndef D3DPRESENT_FORCEIMMEDIATE #ifndef D3DPRESENT_FORCEIMMEDIATE
#define D3DPRESENT_FORCEIMMEDIATE 0x00000100L #define D3DPRESENT_FORCEIMMEDIATE 0x00000100L
#endif #endif
// From d3dtypes.h // From d3dtypes.h
#ifndef D3DDEVINFOID_TEXTUREMANAGER #ifndef D3DDEVINFOID_TEXTUREMANAGER
#define D3DDEVINFOID_TEXTUREMANAGER 1 #define D3DDEVINFOID_TEXTUREMANAGER 1
#endif #endif
#ifndef D3DDEVINFOID_D3DTEXTUREMANAGER #ifndef D3DDEVINFOID_D3DTEXTUREMANAGER
#define D3DDEVINFOID_D3DTEXTUREMANAGER 2 #define D3DDEVINFOID_D3DTEXTUREMANAGER 2
#endif #endif
#ifndef D3DDEVINFOID_TEXTURING #ifndef D3DDEVINFOID_TEXTURING
#define D3DDEVINFOID_TEXTURING 3 #define D3DDEVINFOID_TEXTURING 3
#endif #endif
// From d3dhal.h // From d3dhal.h
#ifndef D3DDEVINFOID_VCACHE #ifndef D3DDEVINFOID_VCACHE
#define D3DDEVINFOID_VCACHE 4 #define D3DDEVINFOID_VCACHE 4
#endif #endif
// MinGW headers are broken. Who'dve guessed? // MinGW headers are broken. Who'dve guessed?
@ -186,21 +186,21 @@ namespace d3d9 {
// Missing from d3d8types.h // Missing from d3d8types.h
#ifndef D3DDEVINFOID_RESOURCEMANAGER #ifndef D3DDEVINFOID_RESOURCEMANAGER
#define D3DDEVINFOID_RESOURCEMANAGER 5 #define D3DDEVINFOID_RESOURCEMANAGER 5
#endif #endif
#ifndef D3DDEVINFOID_VERTEXSTATS #ifndef D3DDEVINFOID_VERTEXSTATS
#define D3DDEVINFOID_VERTEXSTATS 6 // Aka D3DDEVINFOID_D3DVERTEXSTATS #define D3DDEVINFOID_VERTEXSTATS 6 // Aka D3DDEVINFOID_D3DVERTEXSTATS
#endif #endif
#ifndef D3DPRESENT_RATE_UNLIMITED #ifndef D3DPRESENT_RATE_UNLIMITED
#define D3DPRESENT_RATE_UNLIMITED 0x7FFFFFFF #define D3DPRESENT_RATE_UNLIMITED 0x7FFFFFFF
#endif #endif
#else // _MSC_VER #else // _MSC_VER
// These are enum typedefs in the MinGW headers, but not defined by Microsoft // These are enum typedefs in the MinGW headers, but not defined by Microsoft
#define D3DVSDT_TYPE DWORD #define D3DVSDT_TYPE DWORD
#define D3DVSDE_REGISTER DWORD #define D3DVSDE_REGISTER DWORD
#endif #endif

View File

@ -1,4 +1,3 @@
#include "d3d8_shader.h" #include "d3d8_shader.h"
#define VSD_SHIFT_MASK(token, field) ((token & field ## MASK) >> field ## SHIFT) #define VSD_SHIFT_MASK(token, field) ((token & field ## MASK) >> field ## SHIFT)

View File

@ -1,4 +1,3 @@
#include "d3d8_surface.h" #include "d3d8_surface.h"
#include "d3d8_device.h" #include "d3d8_device.h"