|
6 | 6 | */ |
7 | 7 |
|
8 | 8 | #include "DXShaderReflection.h" |
| 9 | +#include <d3dcommon.h> |
9 | 10 |
|
10 | 11 |
|
11 | 12 | namespace LLGL |
@@ -64,35 +65,32 @@ UniformType MapD3DShaderScalarTypeToUniformType(D3D_SHADER_VARIABLE_TYPE type) |
64 | 65 | { |
65 | 66 | switch (type) |
66 | 67 | { |
67 | | - case D3D_SVT_BOOL: return UniformType::Bool1; |
68 | | - case D3D_SVT_FLOAT: /*pass*/ |
69 | | - case D3D_SVT_FLOAT16: return UniformType::Float1; |
70 | | - case D3D_SVT_INT: return UniformType::Int1; |
71 | | - case D3D_SVT_UINT: return UniformType::UInt1; |
72 | | - default: return UniformType::Undefined; |
| 68 | + case D3D_SVT_BOOL: return UniformType::Bool1; |
| 69 | + case D3D_SVT_FLOAT: return UniformType::Float1; |
| 70 | + case D3D_SVT_INT: return UniformType::Int1; |
| 71 | + case D3D_SVT_UINT: return UniformType::UInt1; |
| 72 | + default: return UniformType::Undefined; |
73 | 73 | } |
74 | 74 | } |
75 | 75 |
|
76 | 76 | UniformType MapD3DShaderVectorTypeToUniformType(D3D_SHADER_VARIABLE_TYPE type, UINT elements) |
77 | 77 | { |
78 | 78 | switch (type) |
79 | 79 | { |
80 | | - case D3D_SVT_BOOL: return MakeUniformVectorType(UniformType::Bool1, elements); |
81 | | - case D3D_SVT_FLOAT: /*pass*/ |
82 | | - case D3D_SVT_FLOAT16: return MakeUniformVectorType(UniformType::Float1, elements); |
83 | | - case D3D_SVT_INT: return MakeUniformVectorType(UniformType::Int1, elements); |
84 | | - case D3D_SVT_UINT: return MakeUniformVectorType(UniformType::UInt1, elements); |
85 | | - default: return UniformType::Undefined; |
| 80 | + case D3D_SVT_BOOL: return MakeUniformVectorType(UniformType::Bool1, elements); |
| 81 | + case D3D_SVT_FLOAT: return MakeUniformVectorType(UniformType::Float1, elements); |
| 82 | + case D3D_SVT_INT: return MakeUniformVectorType(UniformType::Int1, elements); |
| 83 | + case D3D_SVT_UINT: return MakeUniformVectorType(UniformType::UInt1, elements); |
| 84 | + default: return UniformType::Undefined; |
86 | 85 | } |
87 | 86 | } |
88 | 87 |
|
89 | 88 | UniformType MapD3DShaderMatrixTypeToUniformType(D3D_SHADER_VARIABLE_TYPE type, UINT rows, UINT cols) |
90 | 89 | { |
91 | 90 | switch (type) |
92 | 91 | { |
93 | | - case D3D_SVT_FLOAT: /*pass*/ |
94 | | - case D3D_SVT_FLOAT16: return MakeUniformMatrixType(UniformType::Float2x2, rows, cols); |
95 | | - default: return UniformType::Undefined; |
| 92 | + case D3D_SVT_FLOAT: return MakeUniformMatrixType(UniformType::Float2x2, rows, cols); |
| 93 | + default: return UniformType::Undefined; |
96 | 94 | } |
97 | 95 | } |
98 | 96 |
|
|
0 commit comments