| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <array> |
| 7 |
|
| 8 |
#include "Common/CommonTypes.h" |
| 9 |
|
| 10 |
|
| 11 |
using float4 = std::array<float, 4>; |
| 12 |
using uint4 = std::array<u32, 4>; |
| 13 |
using int4 = std::array<s32, 4>; |
| 14 |
|
| 15 |
enum class DstBlendFactor : u32; |
| 16 |
enum class SrcBlendFactor : u32; |
| 17 |
enum class ZTexOp : u32; |
| 18 |
enum class LogicOp : u32; |
| 19 |
|
| 20 |
struct alignas(16) PixelShaderConstants |
| 21 |
{ |
| 22 |
std::array<int4, 4> colors; |
| 23 |
std::array<int4, 4> kcolors; |
| 24 |
int4 alpha; |
| 25 |
std::array<uint4, 8> texdims; |
| 26 |
std::array<int4, 2> zbias; |
| 27 |
std::array<int4, 2> indtexscale; |
| 28 |
std::array<int4, 6> indtexmtx; |
| 29 |
int4 fogcolor; |
| 30 |
int4 fogi; |
| 31 |
float4 fogf; |
| 32 |
std::array<float4, 3> fogrange; |
| 33 |
float4 zslope; |
| 34 |
std::array<float, 2> efbscale; |
| 35 |
|
| 36 |
|
| 37 |
u32 genmode; |
| 38 |
u32 alphaTest; |
| 39 |
u32 fogParam3; |
| 40 |
u32 fogRangeBase; |
| 41 |
u32 dstalpha; |
| 42 |
ZTexOp ztex_op; |
| 43 |
u32 late_ztest; |
| 44 |
u32 rgba6_format; |
| 45 |
u32 dither; |
| 46 |
u32 bounding_box; |
| 47 |
std::array<uint4, 16> pack1; |
| 48 |
std::array<uint4, 8> pack2; |
| 49 |
std::array<int4, 32> konst; |
| 50 |
|
| 51 |
u32 blend_enable; |
| 52 |
SrcBlendFactor blend_src_factor; |
| 53 |
SrcBlendFactor blend_src_factor_alpha; |
| 54 |
DstBlendFactor blend_dst_factor; |
| 55 |
DstBlendFactor blend_dst_factor_alpha; |
| 56 |
u32 blend_subtract; |
| 57 |
u32 blend_subtract_alpha; |
| 58 |
|
| 59 |
u32 logic_op_enable; |
| 60 |
LogicOp logic_op_mode; |
| 61 |
|
| 62 |
u32 time_ms; |
| 63 |
}; |
| 64 |
|
| 65 |
struct alignas(16) VertexShaderConstants |
| 66 |
{ |
| 67 |
u32 components; |
| 68 |
u32 xfmem_dualTexInfo; |
| 69 |
u32 xfmem_numColorChans; |
| 70 |
u32 missing_color_hex; |
| 71 |
float4 missing_color_value; |
| 72 |
|
| 73 |
std::array<float4, 6> posnormalmatrix; |
| 74 |
std::array<float4, 4> projection; |
| 75 |
std::array<int4, 4> materials; |
| 76 |
struct Light |
| 77 |
{ |
| 78 |
int4 color; |
| 79 |
float4 cosatt; |
| 80 |
float4 distatt; |
| 81 |
float4 pos; |
| 82 |
float4 dir; |
| 83 |
}; |
| 84 |
std::array<Light, 8> lights; |
| 85 |
std::array<float4, 24> texmatrices; |
| 86 |
std::array<float4, 64> transformmatrices; |
| 87 |
std::array<float4, 32> normalmatrices; |
| 88 |
std::array<float4, 64> posttransformmatrices; |
| 89 |
float4 pixelcentercorrection; |
| 90 |
std::array<float, 2> viewport; |
| 91 |
std::array<float, 2> pad2; |
| 92 |
|
| 93 |
|
| 94 |
std::array<uint4, 8> xfmem_pack1; |
| 95 |
|
| 96 |
float4 cached_normal; |
| 97 |
float4 cached_tangent; |
| 98 |
float4 cached_binormal; |
| 99 |
|
| 100 |
u32 vertex_stride; |
| 101 |
std::array<u32, 3> vertex_offset_normals; |
| 102 |
u32 vertex_offset_position; |
| 103 |
u32 vertex_offset_posmtx; |
| 104 |
std::array<u32, 2> vertex_offset_colors; |
| 105 |
std::array<u32, 8> vertex_offset_texcoords; |
| 106 |
}; |
| 107 |
|
| 108 |
enum class VSExpand : u32 |
| 109 |
{ |
| 110 |
None = 0, |
| 111 |
Point, |
| 112 |
Line, |
| 113 |
}; |
| 114 |
|
| 115 |
struct alignas(16) GeometryShaderConstants |
| 116 |
{ |
| 117 |
float4 stereoparams; |
| 118 |
float4 lineptparams; |
| 119 |
int4 texoffset; |
| 120 |
VSExpand vs_expand; |
| 121 |
u32 pad[3]; |
| 122 |
}; |