kodi
EffectStateBase11.h
1 //--------------------------------------------------------------------------------------
2 // File: EffectStateBase11.h
3 //
4 // Direct3D 11 Effects States Header
5 //
6 // Copyright (c) Microsoft Corporation.
7 // Licensed under the MIT License.
8 //
9 // http://go.microsoft.com/fwlink/p/?LinkId=271568
10 //--------------------------------------------------------------------------------------
11 
12 #pragma once
13 
14 namespace D3DX11Effects
15 {
16 
18 // Effect HLSL states and late resolve lists
20 
21 struct RValue
22 {
23  const char *m_pName;
24  uint32_t m_Value;
25 };
26 
27 #define RVALUE_END() { nullptr, 0U }
28 #define RVALUE_ENTRY(prefix, x) { #x, (uint32_t)prefix##x }
29 
30 enum ELhsType : int;
31 
32 struct LValue
33 {
34  const char *m_pName; // name of the LHS side of expression
35  EBlockType m_BlockType; // type of block it can appear in
36  D3D_SHADER_VARIABLE_TYPE m_Type; // data type allows
37  uint32_t m_Cols; // number of [m_Type]'s required (1 for a scalar, 4 for a vector)
38  uint32_t m_Indices; // max index allowable (if LHS is an array; otherwise this is 1)
39  bool m_VectorScalar; // can be both vector and scalar (setting as a scalar sets all m_Indices values simultaneously)
40  const RValue *m_pRValue; // pointer to table of allowable RHS "late resolve" values
41  ELhsType m_LhsType; // ELHS_* enum value that corresponds to this entry
42  uint32_t m_Offset; // offset into the given block type where this value should be written
43  uint32_t m_Stride; // for vectors, byte stride between two consecutive values. if 0, m_Type's size is used
44 };
45 
46 #define LVALUE_END() { nullptr, D3D_SVT_UINT, 0, 0, 0, nullptr }
47 
48 extern const LValue g_lvGeneral[];
49 extern const uint32_t g_lvGeneralCount;
50 
51 } // end namespace D3DX11Effects
Definition: EffectStateBase11.h:21
Definition: EffectStateBase11.h:32
Definition: EffectBinaryFormat.h:16