forked from themrdemonized/xray-monolith
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHWCaps.h
More file actions
75 lines (62 loc) · 1.25 KB
/
HWCaps.h
File metadata and controls
75 lines (62 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef _HW_CAPS_
#define _HW_CAPS_
#pragma once
#define CAP_VERSION(a,b) (u32(a)*10 + u32(b))
class CHWCaps
{
public:
enum
{
MAX_GPUS = 8
};
public:
struct caps_Geometry
{
u32 dwRegisters : 16;
u32 dwInstructions : 16;
u32 bSoftware : 1;
u32 bPointSprites : 1;
u32 bVTF : 1; // vertex-texture-fetch
u32 bNPatches : 1;
u32 dwClipPlanes : 4;
u32 dwVertexCache : 8;
};
struct caps_Raster
{
u32 dwRegisters : 16;
u32 dwInstructions : 16;
u32 dwStages : 4; // number of tex-stages
u32 dwMRT_count : 4;
u32 b_MRT_mixdepth : 1;
u32 bNonPow2 : 1;
u32 bCubemap : 1;
};
public:
// force flags
BOOL bForceGPU_REF;
BOOL bForceGPU_SW;
BOOL bForceGPU_NonPure;
BOOL SceneMode;
u32 iGPUNum;
// device format
D3DFORMAT fTarget;
D3DFORMAT fDepth;
u32 dwRefreshRate;
// caps itself
u16 geometry_major;
u16 geometry_minor;
caps_Geometry geometry;
u16 raster_major;
u16 raster_minor;
caps_Raster raster;
u32 id_vendor;
u32 id_device;
BOOL bStencil; // stencil buffer present
BOOL bScissor; // scissor rect supported
BOOL bTableFog; //
// some precalculated values
D3DSTENCILOP soDec, soInc; // best stencil OPs for shadows
u32 dwMaxStencilValue; // maximum value the stencil buffer can hold
void Update(void);
};
#endif