Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

206 lines
5.2 KiB

  1. /*=========================================================================*\
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. \*=========================================================================*/
  4. #pragma once
  5. /*=========================================================================*\
  6. D2D Status Codes
  7. \*=========================================================================*/
  8. #define FACILITY_D2D 0x899
  9. #define MAKE_D2DHR( sev, code )\
  10. MAKE_HRESULT( sev, FACILITY_D2D, (code) )
  11. #define MAKE_D2DHR_ERR( code )\
  12. MAKE_D2DHR( 1, code )
  13. //+----------------------------------------------------------------------------
  14. //
  15. // D2D error codes
  16. //
  17. //------------------------------------------------------------------------------
  18. //
  19. // Error codes shared with WINCODECS
  20. //
  21. //
  22. // The pixel format is not supported.
  23. //
  24. #define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT
  25. //
  26. // Error codes that were already returned in prior versions and were part of the
  27. // MIL facility.
  28. //
  29. // Error codes mapped from WIN32 where there isn't already another HRESULT based
  30. // define
  31. //
  32. //
  33. // The supplied buffer was too small to accomodate the data.
  34. //
  35. #define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
  36. //
  37. // D2D specific codes
  38. //
  39. //
  40. // The object was not in the correct state to process the method.
  41. //
  42. #define D2DERR_WRONG_STATE MAKE_D2DHR_ERR(0x001)
  43. //
  44. // The object has not yet been initialized.
  45. //
  46. #define D2DERR_NOT_INITIALIZED MAKE_D2DHR_ERR(0x002)
  47. //
  48. // The requested opertion is not supported.
  49. //
  50. #define D2DERR_UNSUPPORTED_OPERATION MAKE_D2DHR_ERR(0x003)
  51. //
  52. // The geomery scanner failed to process the data.
  53. //
  54. #define D2DERR_SCANNER_FAILED MAKE_D2DHR_ERR(0x004)
  55. //
  56. // D2D could not access the screen.
  57. //
  58. #define D2DERR_SCREEN_ACCESS_DENIED MAKE_D2DHR_ERR(0x005)
  59. //
  60. // A valid display state could not be determined.
  61. //
  62. #define D2DERR_DISPLAY_STATE_INVALID MAKE_D2DHR_ERR(0x006)
  63. //
  64. // The supplied vector is vero.
  65. //
  66. #define D2DERR_ZERO_VECTOR MAKE_D2DHR_ERR(0x007)
  67. //
  68. // An internal error (D2D bug) occurred. On checked builds, we would assert.
  69. //
  70. // The application should close this instance of D2D and should consider
  71. // restarting its process.
  72. //
  73. #define D2DERR_INTERNAL_ERROR MAKE_D2DHR_ERR(0x008)
  74. //
  75. // The display format we need to render is not supported by the
  76. // hardware device.
  77. //
  78. #define D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED MAKE_D2DHR_ERR(0x009)
  79. //
  80. // A call to this method is invalid.
  81. //
  82. #define D2DERR_INVALID_CALL MAKE_D2DHR_ERR(0x00A)
  83. //
  84. // No HW rendering device is available for this operation.
  85. //
  86. #define D2DERR_NO_HARDWARE_DEVICE MAKE_D2DHR_ERR(0x00B)
  87. //
  88. // There has been a presentation error that may be recoverable. The caller
  89. // needs to recreate, rerender the entire frame, and reattempt present.
  90. //
  91. #define D2DERR_RECREATE_TARGET MAKE_D2DHR_ERR(0x00C)
  92. //
  93. // Shader construction failed because it was too complex.
  94. //
  95. #define D2DERR_TOO_MANY_SHADER_ELEMENTS MAKE_D2DHR_ERR(0x00D)
  96. //
  97. // Shader compilation failed.
  98. //
  99. #define D2DERR_SHADER_COMPILE_FAILED MAKE_D2DHR_ERR(0x00E)
  100. //
  101. // Requested DX surface size exceeded maximum texture size.
  102. //
  103. #define D2DERR_MAX_TEXTURE_SIZE_EXCEEDED MAKE_D2DHR_ERR(0x00F)
  104. //
  105. // The requested D2D version is not supported.
  106. //
  107. #define D2DERR_UNSUPPORTED_VERSION MAKE_D2DHR_ERR(0x010)
  108. //
  109. // Invalid number.
  110. //
  111. #define D2DERR_BAD_NUMBER MAKE_D2DHR_ERR(0x0011)
  112. //
  113. // Objects used together must be created from the same factory instance.
  114. //
  115. #define D2DERR_WRONG_FACTORY MAKE_D2DHR_ERR(0x012)
  116. //
  117. // A layer resource can only be in use once at any point in time.
  118. //
  119. #define D2DERR_LAYER_ALREADY_IN_USE MAKE_D2DHR_ERR(0x013)
  120. //
  121. // The pop call did not match the corresponding push call
  122. //
  123. #define D2DERR_POP_CALL_DID_NOT_MATCH_PUSH MAKE_D2DHR_ERR(0x014)
  124. //
  125. // The resource was realized on the wrong render target
  126. //
  127. #define D2DERR_WRONG_RENDER_TARGET MAKE_D2DHR_ERR(0x015)
  128. //
  129. // The push and pop calls were unbalanced
  130. //
  131. #define D2DERR_PUSH_POP_UNBALANCED MAKE_D2DHR_ERR(0x016)
  132. //
  133. // Attempt to copy from a render target while a layer or clip rect is applied
  134. //
  135. #define D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT MAKE_D2DHR_ERR(0x017)
  136. //
  137. // The brush types are incompatible for the call.
  138. //
  139. #define D2DERR_INCOMPATIBLE_BRUSH_TYPES MAKE_D2DHR_ERR(0x018)
  140. //
  141. // An unknown win32 failure occurred.
  142. //
  143. #define D2DERR_WIN32_ERROR MAKE_D2DHR_ERR(0x019)
  144. //
  145. // The render target is not compatible with GDI
  146. //
  147. #define D2DERR_TARGET_NOT_GDI_COMPATIBLE MAKE_D2DHR_ERR(0x01A)
  148. //
  149. // A text client drawing effect object is of the wrong type
  150. //
  151. #define D2DERR_TEXT_EFFECT_IS_WRONG_TYPE MAKE_D2DHR_ERR(0x01B)
  152. //
  153. // The application is holding a reference to the IDWriteTextRenderer interface
  154. // after the corresponding DrawText or DrawTextLayout call has returned. The
  155. // IDWriteTextRenderer instance will be zombied.
  156. //
  157. #define D2DERR_TEXT_RENDERER_NOT_RELEASED MAKE_D2DHR_ERR(0x01C)
  158. //
  159. // The requested size is larger than the guaranteed supported texture size.
  160. //
  161. #define D2DERR_EXCEEDS_MAX_BITMAP_SIZE MAKE_D2DHR_ERR(0x01D)