EffectStateBase11.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //--------------------------------------------------------------------------------------
  2. // File: EffectStateBase11.h
  3. //
  4. // Direct3D 11 Effects States Header
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. // PARTICULAR PURPOSE.
  10. //
  11. // Copyright (c) Microsoft Corporation. All rights reserved.
  12. //
  13. // http://go.microsoft.com/fwlink/p/?LinkId=271568
  14. //--------------------------------------------------------------------------------------
  15. #pragma once
  16. namespace D3DX11Effects
  17. {
  18. //////////////////////////////////////////////////////////////////////////
  19. // Effect HLSL states and late resolve lists
  20. //////////////////////////////////////////////////////////////////////////
  21. struct RValue
  22. {
  23. const char *m_pName;
  24. uint32_t m_Value;
  25. };
  26. #define RVALUE_END() { nullptr, 0U }
  27. #define RVALUE_ENTRY(prefix, x) { #x, (uint32_t)prefix##x }
  28. enum ELhsType;
  29. struct LValue
  30. {
  31. const char *m_pName; // name of the LHS side of expression
  32. EBlockType m_BlockType; // type of block it can appear in
  33. D3D_SHADER_VARIABLE_TYPE m_Type; // data type allows
  34. uint32_t m_Cols; // number of [m_Type]'s required (1 for a scalar, 4 for a vector)
  35. uint32_t m_Indices; // max index allowable (if LHS is an array; otherwise this is 1)
  36. bool m_VectorScalar; // can be both vector and scalar (setting as a scalar sets all m_Indices values simultaneously)
  37. const RValue *m_pRValue; // pointer to table of allowable RHS "late resolve" values
  38. ELhsType m_LhsType; // ELHS_* enum value that corresponds to this entry
  39. uint32_t m_Offset; // offset into the given block type where this value should be written
  40. uint32_t m_Stride; // for vectors, byte stride between two consecutive values. if 0, m_Type's size is used
  41. };
  42. #define LVALUE_END() { nullptr, D3D_SVT_UINT, 0, 0, 0, nullptr }
  43. extern const LValue g_lvGeneral[];
  44. extern const uint32_t g_lvGeneralCount;
  45. } // end namespace D3DX11Effects