14 #include "EffectBinaryFormat.h" 15 #include "IUnknownImp.h" 18 extern void __cdecl D3DXDebugPrintf(UINT lvl, _In_z_ _Printf_format_string_ LPCSTR szFormat, ...);
19 #define DPF D3DXDebugPrintf 25 #pragma warning(disable : 4481) 42 struct SClassInstance;
44 struct SShaderResource;
45 struct SUnorderedAccessView;
46 struct SRenderTargetView;
47 struct SDepthStencilView;
49 struct SDepthStencilBlock;
51 struct SRasterizerBlock;
53 struct SD3DShaderVTable;
54 struct SClassInstanceGlobalVariable;
60 struct SConstantBuffer;
81 float _11, _12, _13, _14;
82 float _21, _22, _23, _24;
83 float _31, _32, _33, _34;
84 float _41, _42, _43, _44;
103 float *pNumericFloat;
104 uint32_t *pNumericDword;
128 MDT_DepthStencilState,
132 MDT_ShaderResourceView,
137 EMemberDataType Type;
141 ID3D11ClassInstance *pD3DClassInstance;
142 ID3D11BlendState *pD3DEffectsManagedBlendState;
143 ID3D11DepthStencilState *pD3DEffectsManagedDepthStencilState;
144 ID3D11RasterizerState *pD3DEffectsManagedRasterizerState;
145 ID3D11SamplerState *pD3DEffectsManagedSamplerState;
146 ID3D11Buffer *pD3DEffectsManagedConstantBuffer;
147 ID3D11ShaderResourceView*pD3DEffectsManagedTextureBuffer;
151 struct SType :
public ID3DX11EffectType
153 static const UINT_PTR c_InvalidIndex = (uint32_t) -1;
154 static const uint32_t c_ScalarSize =
sizeof(uint32_t);
157 static const uint32_t c_ScalarsPerRegister = 4;
158 static const uint32_t c_RegisterSize = c_ScalarsPerRegister * c_ScalarSize;
188 EObjectType ObjectType;
193 BOOL ImplementsInterface;
201 VarType(EVT_Invalid),
209 static_assert(
sizeof(NumericType) <=
sizeof(StructType),
"SType union issue");
210 static_assert(
sizeof(ObjectType) <=
sizeof(StructType),
"SType union issue");
211 static_assert(
sizeof(InterfaceType) <=
sizeof(StructType),
"SType union issue");
214 bool IsEqual(
SType *pOtherType)
const;
216 bool IsObjectType(EObjectType ObjType)
const 218 return IsObjectTypeHelper(VarType, ObjectType, ObjType);
220 bool IsShader()
const 222 return IsShaderHelper(VarType, ObjectType);
224 bool BelongsInConstantBuffer()
const 226 return (VarType == EVT_Numeric) || (VarType == EVT_Struct);
228 bool IsStateBlockObject()
const 230 return IsStateBlockObjectHelper(VarType, ObjectType);
232 bool IsClassInstance()
const 234 return (VarType == EVT_Struct) && StructType.ImplementsInterface;
236 bool IsInterface()
const 238 return IsInterfaceHelper(VarType, ObjectType);
240 bool IsShaderResource()
const 242 return IsShaderResourceHelper(VarType, ObjectType);
244 bool IsUnorderedAccessView()
const 246 return IsUnorderedAccessViewHelper(VarType, ObjectType);
248 bool IsSampler()
const 250 return IsSamplerHelper(VarType, ObjectType);
252 bool IsRenderTargetView()
const 254 return IsRenderTargetViewHelper(VarType, ObjectType);
256 bool IsDepthStencilView()
const 258 return IsDepthStencilViewHelper(VarType, ObjectType);
261 uint32_t GetTotalUnpackedSize(_In_
bool IsSingleElement)
const;
262 uint32_t GetTotalPackedSize(_In_
bool IsSingleElement)
const;
265 STDMETHOD_(
bool, IsValid)()
override {
return true; }
267 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByIndex)(_In_ uint32_t Index)
override;
268 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByName)(_In_z_ LPCSTR Name)
override;
269 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeBySemantic)(_In_z_ LPCSTR Semantic)
override;
270 STDMETHOD_(LPCSTR, GetMemberName)(_In_ uint32_t Index)
override;
271 STDMETHOD_(LPCSTR, GetMemberSemantic)(_In_ uint32_t Index)
override;
273 IUNKNOWN_IMP(
SType, ID3DX11EffectType, IUnknown);
283 STDMETHOD_(
bool, IsValid)()
override {
return true; }
285 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByIndex)(uint32_t Index)
override {
return ((
SType*)pType)->GetMemberTypeByIndex(Index); }
286 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByName)(LPCSTR Name)
override {
return ((
SType*)pType)->GetMemberTypeByName(Name); }
287 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeBySemantic)(LPCSTR Semantic)
override {
return ((
SType*)pType)->GetMemberTypeBySemantic(Semantic); }
288 STDMETHOD_(LPCSTR, GetMemberName)(uint32_t Index)
override {
return ((
SType*)pType)->GetMemberName(Index); }
289 STDMETHOD_(LPCSTR, GetMemberSemantic)(uint32_t Index)
override {
return ((
SType*)pType)->GetMemberSemantic(Index); }
303 void * GetBlockByIndex(EVarType VarType, EObjectType ObjectType,
void *pBaseBlock, uint32_t Index);
307 EBlockType BlockType;
309 bool IsUserManaged:1;
311 uint32_t AssignmentCount;
316 bool ApplyAssignments(
CEffect *pEffect);
320 assert( BlockType == EBT_Sampler );
326 assert( BlockType == EBT_DepthStencil );
332 assert( BlockType == EBT_Blend );
338 assert( BlockType == EBT_Rasterizer );
344 assert( BlockType == EBT_Pass );
356 uint32_t AnnotationCount;
360 bool HasDependencies;
364 STDMETHOD_(
bool, IsValid)()
override;
367 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(_In_ uint32_t Index)
override;
368 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(_In_z_ LPCSTR Name)
override;
370 STDMETHOD_(ID3DX11EffectPass*, GetPassByIndex)(_In_ uint32_t Index)
override;
371 STDMETHOD_(ID3DX11EffectPass*, GetPassByName)(_In_z_ LPCSTR Name)
override;
375 IUNKNOWN_IMP(
STechnique, ID3DX11EffectTechnique, IUnknown);
378 struct SGroup :
public ID3DX11EffectGroup
382 uint32_t TechniqueCount;
385 uint32_t AnnotationCount;
389 bool HasDependencies;
393 STDMETHOD_(
bool, IsValid)()
override;
396 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(_In_ uint32_t Index)
override;
397 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(_In_z_ LPCSTR Name)
override;
399 STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByIndex)(_In_ uint32_t Index)
override;
400 STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByName)(_In_z_ LPCSTR Name)
override;
402 IUNKNOWN_IMP(
SGroup, ID3DX11EffectGroup, IUnknown);
409 ID3D11BlendState* pBlendState;
410 FLOAT BlendFactor[4];
412 ID3D11DepthStencilState *pDepthStencilState;
416 D3D11_SO_DECLARATION_ENTRY *pEntry;
424 uint32_t RenderTargetViewCount;
437 uint32_t AnnotationCount;
443 bool HasDependencies;
447 void ApplyPassAssignments();
448 bool CheckShaderDependencies( _In_ const
SShaderBlock* pBlock );
449 bool CheckDependencies();
451 template<EObjectType EShaderType>
454 STDMETHOD_(
bool, IsValid)() override;
464 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(_In_ uint32_t Index) override;
465 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(_In_z_ LPCSTR Name) override;
467 STDMETHOD(Apply)(_In_ uint32_t
Flags, _In_ ID3D11DeviceContext* pContext) override;
471 IUNKNOWN_IMP(
SPassBlock, ID3DX11EffectPass, IUnknown);
476 ID3D11DepthStencilState *pDSObject;
477 D3D11_DEPTH_STENCIL_DESC BackingStore;
485 ID3D11BlendState *pBlendObject;
486 D3D11_BLEND_DESC BackingStore;
494 ID3D11RasterizerState *pRasterizerObject;
495 D3D11_RASTERIZER_DESC BackingStore;
503 ID3D11SamplerState *pD3DObject;
506 D3D11_SAMPLER_DESC SamplerDesc;
516 SClassInstanceGlobalVariable* pClassInstance;
519 pClassInstance(
nullptr)
526 ID3D11ShaderResourceView *pShaderResource;
529 pShaderResource(
nullptr)
536 ID3D11UnorderedAccessView *pUnorderedAccessView;
539 pUnorderedAccessView(
nullptr)
546 ID3D11RenderTargetView *pRenderTargetView;
549 pRenderTargetView(
nullptr)
556 ID3D11DepthStencilView *pDepthStencilView;
559 pDepthStencilView(
nullptr)
571 D3DTYPE *ppD3DObjects;
576 ppFXPointers(
nullptr),
577 ppD3DObjects(
nullptr)
592 void ( __stdcall ID3D11DeviceContext::*pSetShader)(ID3D11DeviceChild* pShader, ID3D11ClassInstance*
const* ppClassInstances, uint32_t NumClassInstances);
593 void ( __stdcall ID3D11DeviceContext::*pSetConstantBuffers)(uint32_t StartConstantSlot, uint32_t NumBuffers, ID3D11Buffer *
const *pBuffers);
594 void ( __stdcall ID3D11DeviceContext::*pSetSamplers)(uint32_t Offset, uint32_t NumSamplers, ID3D11SamplerState*
const* pSamplers);
595 void ( __stdcall ID3D11DeviceContext::*pSetShaderResources)(uint32_t Offset, uint32_t NumResources, ID3D11ShaderResourceView *
const *pResources);
596 HRESULT ( __stdcall ID3D11Device::*pCreateShader)(
const void *pShaderBlob,
size_t ShaderBlobSize, ID3D11ClassLinkage* pClassLinkage, ID3D11DeviceChild **ppShader);
619 uint32_t BytecodeLength;
620 char *pStreamOutDecls[4];
621 uint32_t RasterizedStream;
623 ID3D11ShaderReflection *pReflection;
624 uint32_t InterfaceParameterCount;
634 ID3D11DeviceChild *pD3DObject;
637 SShaderCBDependency *pCBDeps;
639 uint32_t SampDepCount;
640 SShaderSamplerDependency *pSampDeps;
642 uint32_t InterfaceDepCount;
643 SInterfaceDependency *pInterfaceDeps;
645 uint32_t ResourceDepCount;
646 SShaderResourceDependency *pResourceDeps;
648 uint32_t UAVDepCount;
649 SUnorderedAccessViewDependency *pUAVDeps;
651 uint32_t TBufferDepCount;
654 ID3DBlob *pInputSignatureBlob;
659 EObjectType GetShaderType();
661 HRESULT OnDeviceBind();
668 HRESULT GetVertexShader(_Outptr_ ID3D11VertexShader **ppVS);
669 HRESULT GetGeometryShader(_Outptr_ ID3D11GeometryShader **ppGS);
670 HRESULT GetPixelShader(_Outptr_ ID3D11PixelShader **ppPS);
671 HRESULT GetHullShader(_Outptr_ ID3D11HullShader **ppHS);
672 HRESULT GetDomainShader(_Outptr_ ID3D11DomainShader **ppDS);
673 HRESULT GetComputeShader(_Outptr_ ID3D11ComputeShader **ppCS);
675 HRESULT GetSignatureElementDesc(_In_ ESigType SigType, _In_ uint32_t Element, _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc);
715 uint32_t MemberDataOffsetPlus4;
722 uint32_t ExplicitBindPoint;
726 pMemberData(
nullptr),
730 ExplicitBindPoint(uint32_t(-1))
736 #include "EffectVariable.inl" 750 STDMETHOD_(
bool, IsValid)()
override;
751 STDMETHOD_(ID3DX11EffectType*, GetType)()
override;
754 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(_In_ uint32_t Index)
override;
755 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(_In_z_ LPCSTR Name)
override;
757 STDMETHOD_(ID3DX11EffectVariable*, GetMemberByIndex)(_In_ uint32_t Index)
override;
758 STDMETHOD_(ID3DX11EffectVariable*, GetMemberByName)(_In_z_ LPCSTR Name)
override;
759 STDMETHOD_(ID3DX11EffectVariable*, GetMemberBySemantic)(_In_z_ LPCSTR Semantic)
override;
761 STDMETHOD_(ID3DX11EffectVariable*, GetElement)(_In_ uint32_t Index)
override;
763 STDMETHOD_(ID3DX11EffectConstantBuffer*, GetParentConstantBuffer)()
override;
766 STDMETHOD_(ID3DX11EffectShaderVariable*, AsShader)()
override;
768 STDMETHOD(SetRawValue)(_In_reads_bytes_(Count)
const void *pData, _In_ uint32_t Offset, _In_ uint32_t Count)
override;
769 STDMETHOD(GetRawValue)(_Out_writes_bytes_(Count)
void *pData, _In_ uint32_t Offset, _In_ uint32_t Count)
override;
773 STDMETHOD(GetVertexShader)(_In_ uint32_t ShaderIndex, _Outptr_ ID3D11VertexShader **ppVS)
override;
774 STDMETHOD(GetGeometryShader)(_In_ uint32_t ShaderIndex, _Outptr_ ID3D11GeometryShader **ppGS)
override;
775 STDMETHOD(GetPixelShader)(_In_ uint32_t ShaderIndex, _Outptr_ ID3D11PixelShader **ppPS)
override;
776 STDMETHOD(GetHullShader)(_In_ uint32_t ShaderIndex, _Outptr_ ID3D11HullShader **ppHS)
override;
777 STDMETHOD(GetDomainShader)(_In_ uint32_t ShaderIndex, _Outptr_ ID3D11DomainShader **ppDS)
override;
778 STDMETHOD(GetComputeShader)(_In_ uint32_t ShaderIndex, _Outptr_ ID3D11ComputeShader **ppCS)
override;
780 STDMETHOD(GetInputSignatureElementDesc)(_In_ uint32_t ShaderIndex, _In_ uint32_t Element, _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc)
override;
781 STDMETHOD(GetOutputSignatureElementDesc)(_In_ uint32_t ShaderIndex, _In_ uint32_t Element, _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc)
override;
782 STDMETHOD(GetPatchConstantSignatureElementDesc)(_In_ uint32_t ShaderIndex, _In_ uint32_t Element, _Out_ D3D11_SIGNATURE_PARAMETER_DESC *pDesc)
override;
786 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByIndex)(_In_ uint32_t Index)
override;
787 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByName)(_In_z_ LPCSTR Name)
override;
788 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeBySemantic)(_In_z_ LPCSTR Semantic)
override;
790 STDMETHOD_(LPCSTR, GetMemberName)(_In_ uint32_t Index)
override;
791 STDMETHOD_(LPCSTR, GetMemberSemantic)(_In_ uint32_t Index)
override;
793 IUNKNOWN_IMP(
SAnonymousShader, ID3DX11EffectShaderVariable, ID3DX11EffectVariable);
802 ID3D11Buffer *pD3DObject;
805 uint8_t *pBackingStore;
810 uint32_t AnnotationCount;
813 uint32_t VariableCount;
815 uint32_t ExplicitBindPoint;
819 bool IsUserManaged:1;
820 bool IsEffectOptimized:1;
821 bool IsUsedByExpression:1;
824 bool IsNonUpdatable:1;
829 uint32_t MemberDataOffsetPlus4;
838 pBackingStore(
nullptr),
842 pAnnotations(
nullptr),
845 ExplicitBindPoint(uint32_t(-1)),
848 IsUserManaged(
false),
849 IsEffectOptimized(
false),
850 IsUsedByExpression(
false),
853 IsNonUpdatable(
false),
854 pMemberData(
nullptr),
859 bool ClonedSingle()
const;
862 STDMETHOD_(
bool, IsValid)()
override;
863 STDMETHOD_(ID3DX11EffectType*, GetType)()
override;
866 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByIndex)(_In_ uint32_t Index)
override;
867 STDMETHOD_(ID3DX11EffectVariable*, GetAnnotationByName)(_In_z_ LPCSTR Name)
override;
869 STDMETHOD_(ID3DX11EffectVariable*, GetMemberByIndex)(_In_ uint32_t Index)
override;
870 STDMETHOD_(ID3DX11EffectVariable*, GetMemberByName)(_In_z_ LPCSTR Name)
override;
871 STDMETHOD_(ID3DX11EffectVariable*, GetMemberBySemantic)(_In_z_ LPCSTR Semantic)
override;
873 STDMETHOD_(ID3DX11EffectVariable*, GetElement)(_In_ uint32_t Index)
override;
875 STDMETHOD_(ID3DX11EffectConstantBuffer*, GetParentConstantBuffer)()
override;
878 STDMETHOD_(ID3DX11EffectConstantBuffer*, AsConstantBuffer)()
override;
880 STDMETHOD(SetRawValue)(_In_reads_bytes_(Count)
const void *pData, _In_ uint32_t Offset, _In_ uint32_t Count)
override;
881 STDMETHOD(GetRawValue)(_Out_writes_bytes_(Count)
void *pData, _In_ uint32_t Offset, _In_ uint32_t Count)
override;
883 STDMETHOD(SetConstantBuffer)(_In_ ID3D11Buffer *pConstantBuffer)
override;
884 STDMETHOD(GetConstantBuffer)(_Outptr_ ID3D11Buffer **ppConstantBuffer)
override;
885 STDMETHOD(UndoSetConstantBuffer)()
override;
887 STDMETHOD(SetTextureBuffer)(_In_ ID3D11ShaderResourceView *pTextureBuffer)
override;
888 STDMETHOD(GetTextureBuffer)(_Outptr_ ID3D11ShaderResourceView **ppTextureBuffer)
override;
889 STDMETHOD(UndoSetTextureBuffer)()
override;
893 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByIndex)(_In_ uint32_t Index)
override;
894 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeByName)(_In_z_ LPCSTR Name)
override;
895 STDMETHOD_(ID3DX11EffectType*, GetMemberTypeBySemantic)(_In_z_ LPCSTR Semantic)
override;
897 STDMETHOD_(LPCSTR, GetMemberName)(_In_ uint32_t Index)
override;
898 STDMETHOD_(LPCSTR, GetMemberSemantic)(_In_ uint32_t Index)
override;
900 IUNKNOWN_IMP(
SConstantBuffer, ID3DX11EffectConstantBuffer, ID3DX11EffectVariable);
908 enum ERuntimeAssignmentType
918 ERAT_NumericVariable,
920 ERAT_NumericConstIndex,
922 ERAT_NumericVariableIndex,
926 ERAT_ObjectInlineShader,
930 ERAT_ObjectConstIndex,
932 ERAT_ObjectVariableIndex,
953 ERuntimeAssignmentType AssignmentType;
955 Timer LastRecomputedTime;
958 uint32_t DependencyCount;
964 uint32_t DataSize : 16;
966 uint32_t MaxElements : 16;
969 bool IsObjectAssignment()
971 return IsObjectAssignmentHelper(LhsType);
975 LhsType(ELHS_Invalid),
976 AssignmentType(ERAT_Invalid),
977 LastRecomputedTime(0),
979 pDependencies(
nullptr),
1004 return (pMap1.pOld == pMap2.pOld);
1011 return ComputeHash((uint8_t*)&pOld,
sizeof(pOld));
1022 uint32_t m_dwBufferSize;
1025 template <
bool bCopyData>
1026 HRESULT AddDataInternal(_In_reads_bytes_(dwSize)
const void *pData, _In_ uint32_t dwSize, _Outptr_
void **ppPointer);
1029 HRESULT ReserveMemory(uint32_t dwSize);
1031 uint8_t* GetDataStart() {
return m_pData; }
1035 HRESULT AddString(_In_z_
const char *pString, _Outptr_result_z_
char **ppPointer);
1036 HRESULT AddData(_In_reads_(dwSize)
const void *pData, _In_ uint32_t dwSize, _Outptr_
void **ppPointer);
1040 void* Allocate(uint32_t dwSize);
1043 HRESULT MoveData(_Inout_updates_bytes_(size)
void **ppData, _In_ uint32_t size);
1044 HRESULT MoveString(_Inout_updates_z_(1)
char **ppStringData);
1046 HRESULT MoveEmptyDataBlock(_Inout_updates_(1)
void **ppData, _In_ uint32_t size);
1048 bool IsInHeap(_In_
void *pData)
const 1050 return (pData >= m_pData && pData < (m_pData + m_dwBufferSize));
1071 friend struct TSamplerVariable<TGlobalVariable<ID3DX11EffectSamplerVariable>>;
1072 friend struct TSamplerVariable<TVariable<TMember<ID3DX11EffectSamplerVariable>>>;
1076 uint32_t m_RefCount;
1086 uint32_t m_VariableCount;
1090 uint32_t m_AnonymousShaderCount;
1094 uint32_t m_TechniqueCount;
1097 uint32_t m_GroupCount;
1101 uint32_t m_ShaderBlockCount;
1104 uint32_t m_DepthStencilBlockCount;
1107 uint32_t m_BlendBlockCount;
1110 uint32_t m_RasterizerBlockCount;
1113 uint32_t m_SamplerBlockCount;
1116 uint32_t m_MemberDataCount;
1119 uint32_t m_InterfaceCount;
1125 uint32_t m_StringCount;
1128 uint32_t m_ShaderResourceCount;
1131 uint32_t m_UnorderedAccessViewCount;
1134 uint32_t m_RenderTargetViewCount;
1137 uint32_t m_DepthStencilViewCount;
1143 uint32_t m_FXLIndex;
1145 ID3D11Device *m_pDevice;
1146 ID3D11DeviceContext *m_pContext;
1147 ID3D11ClassLinkage *m_pClassLinkage;
1157 static bool AreTypesEqual(
const LPSRUNTIMETYPE &pType1,
const LPSRUNTIMETYPE &pType2) {
return (pType1->IsEqual(pType2)); }
1158 static bool AreStringsEqual(
const LPCSTR &pStr1,
const LPCSTR &pStr2) {
return strcmp(pStr1, pStr2) == 0; }
1165 CTypeHashTable *m_pTypePool;
1166 CStringHashTable *m_pStringPool;
1173 void AddStringToPool(
const char **ppString);
1174 void AddTypeToPool(
SType **ppType);
1176 HRESULT OptimizeTypes(_Inout_ CPointerMappingTable *pMappingTable, _In_
bool Cloning =
false);
1183 bool ApplyRenderStateBlock(_In_
SBaseBlock *pBlock);
1185 void ApplyPassBlock(_Inout_
SPassBlock *pBlock);
1186 bool EvaluateAssignment(_Inout_
SAssignment *pAssignment);
1187 bool ValidateShaderBlock(_Inout_
SShaderBlock* pBlock );
1188 bool ValidatePassBlock(_Inout_
SPassBlock* pBlock );
1195 SVariable *FindVariableByNameWithParsing(_In_z_ LPCSTR pVarName);
1197 void ReplaceCBReference(_In_
SConstantBuffer *pOldBufferBlock, _In_ ID3D11Buffer *pNewBuffer);
1198 void ReplaceSamplerReference(_In_
SSamplerBlock *pOldSamplerBlock, _In_ ID3D11SamplerState *pNewSampler);
1199 void AddRefAllForCloning( _In_
CEffect* pEffectSource );
1200 HRESULT CopyMemberInterfaces( _In_
CEffect* pEffectSource );
1201 HRESULT CopyStringPool( _In_
CEffect* pEffectSource, _Inout_ CPointerMappingTable& mappingTable );
1202 HRESULT CopyTypePool( _In_
CEffect* pEffectSource, _Inout_ CPointerMappingTable& mappingTableTypes, _Inout_ CPointerMappingTable& mappingTableStrings );
1203 HRESULT CopyOptimizedTypePool( _In_
CEffect* pEffectSource, _Inout_ CPointerMappingTable& mappingTableTypes );
1204 HRESULT RecreateCBs();
1205 HRESULT FixupMemberInterface( _Inout_
SMember* pMember, _In_
CEffect* pEffectSource, _Inout_ CPointerMappingTable& mappingTableStrings );
1207 void ValidateIndex(_In_ uint32_t Elements);
1209 void IncrementTimer();
1210 void HandleLocalTimerRollover();
1217 void ReleaseShaderRefection();
1220 HRESULT LoadEffect(_In_reads_bytes_(cbEffectBuffer) const
void *pEffectBuffer, _In_ uint32_t cbEffectBuffer);
1223 HRESULT BindToDevice(_In_ ID3D11Device *pDevice, _In_z_ LPCSTR srcName );
1225 Timer GetCurrentTime()
const {
return m_LocalTimer; }
1227 bool IsReflectionData(
void *pData)
const {
return m_pReflection->m_Heap.IsInHeap(pData); }
1228 bool IsRuntimeData(
void *pData)
const {
return m_Heap.IsInHeap(pData); }
1234 STDMETHOD(QueryInterface)(REFIID iid, _COM_Outptr_ LPVOID *ppv)
override;
1235 STDMETHOD_(ULONG, AddRef)()
override;
1236 STDMETHOD_(ULONG, Release)()
override;
1239 STDMETHOD_(
bool, IsValid)()
override {
return true; }
1241 STDMETHOD(GetDevice)(_Outptr_ ID3D11Device** ppDevice)
override;
1245 STDMETHOD_(ID3DX11EffectConstantBuffer*, GetConstantBufferByIndex)(_In_ uint32_t Index)
override;
1246 STDMETHOD_(ID3DX11EffectConstantBuffer*, GetConstantBufferByName)(_In_z_ LPCSTR Name)
override;
1248 STDMETHOD_(ID3DX11EffectVariable*, GetVariableByIndex)(_In_ uint32_t Index)
override;
1249 STDMETHOD_(ID3DX11EffectVariable*, GetVariableByName)(_In_z_ LPCSTR Name)
override;
1250 STDMETHOD_(ID3DX11EffectVariable*, GetVariableBySemantic)(_In_z_ LPCSTR Semantic)
override;
1252 STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByIndex)(_In_ uint32_t Index)
override;
1253 STDMETHOD_(ID3DX11EffectTechnique*, GetTechniqueByName)(_In_z_ LPCSTR Name)
override;
1255 STDMETHOD_(ID3DX11EffectGroup*, GetGroupByIndex)(_In_ uint32_t Index)
override;
1256 STDMETHOD_(ID3DX11EffectGroup*, GetGroupByName)(_In_z_ LPCSTR Name)
override;
1258 STDMETHOD_(ID3D11ClassLinkage*, GetClassLinkage)()
override;
1260 STDMETHOD(CloneEffect)(_In_ uint32_t
Flags, _Outptr_ ID3DX11Effect** ppClonedEffect)
override;
1261 STDMETHOD(Optimize)()
override;
1262 STDMETHOD_(
bool, IsOptimized)()
override;
1267 ID3DX11EffectType * CreatePooledSingleElementTypeInterface(_In_
SType *pType);
1270 _In_
const UDataPointer Data, _In_
bool IsSingleElement, _In_ uint32_t Index);
1276 #pragma warning(pop)
Definition: EffectBinaryFormat.h:16
Definition: Effect.h:1057
Definition: d3dxGlobal.h:592
Definition: d3dx11effect.h:825
Definition: Effect.h:4949
Definition: d3dx11effect.h:236
Definition: d3dx11effect.h:905
Definition: EffectBinaryFormat.h:558
Definition: EffectVariable.inl:4941
Definition: d3dxGlobal.h:429
Definition: d3dx11effect.h:949
Definition: EffectLoad.h:48
Definition: Effect.h:4956
Definition: d3dx11effect.h:659
Definition: Effect.h:4942
Definition: Effect.h:1065
Definition: d3dxGlobal.cpp:19
Definition: d3dx11effect.h:845
Definition: Effect.h:4619
Definition: d3dx11effect.h:44
Definition: Effect.h:4737
Definition: EffectVariable.inl:4948
Definition: Effect.h:1018
Definition: d3dxGlobal.h:1237
Definition: d3dx11effect.h:177
Definition: d3dx11effect.h:991
Definition: TestJobManager.cpp:22