MTLPixelFormat.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. namespace Veldrid.MetalBindings
  2. {
  3. public enum MTLPixelFormat : uint
  4. {
  5. Invalid = 0,
  6. /* Normal 8 bit formats */
  7. A8Unorm = 1,
  8. R8Unorm = 10,
  9. R8Unorm_sRGB = 11,
  10. R8Snorm = 12,
  11. R8Uint = 13,
  12. R8Sint = 14,
  13. /* Normal 16 bit formats */
  14. R16Unorm = 20,
  15. R16Snorm = 22,
  16. R16Uint = 23,
  17. R16Sint = 24,
  18. R16Float = 25,
  19. RG8Unorm = 30,
  20. RG8Unorm_sRGB = 31,
  21. RG8Snorm = 32,
  22. RG8Uint = 33,
  23. RG8Sint = 34,
  24. /* Packed 16 bit formats */
  25. B5G6R5Unorm = 40,
  26. A1BGR5Unorm = 41,
  27. ABGR4Unorm = 42,
  28. BGR5A1Unorm = 43,
  29. /* Normal 32 bit formats */
  30. R32Uint = 53,
  31. R32Sint = 54,
  32. R32Float = 55,
  33. RG16Unorm = 60,
  34. RG16Snorm = 62,
  35. RG16Uint = 63,
  36. RG16Sint = 64,
  37. RG16Float = 65,
  38. RGBA8Unorm = 70,
  39. RGBA8Unorm_sRGB = 71,
  40. RGBA8Snorm = 72,
  41. RGBA8Uint = 73,
  42. RGBA8Sint = 74,
  43. BGRA8Unorm = 80,
  44. BGRA8Unorm_sRGB = 81,
  45. /* Packed 32 bit formats */
  46. RGB10A2Unorm = 90,
  47. RGB10A2Uint = 91,
  48. RG11B10Float = 92,
  49. RGB9E5Float = 93,
  50. BGR10_XR = 554,
  51. BGR10_XR_sRGB = 555,
  52. /* Normal 64 bit formats */
  53. RG32Uint = 103,
  54. RG32Sint = 104,
  55. RG32Float = 105,
  56. RGBA16Unorm = 110,
  57. RGBA16Snorm = 112,
  58. RGBA16Uint = 113,
  59. RGBA16Sint = 114,
  60. RGBA16Float = 115,
  61. BGRA10_XR = 552,
  62. BGRA10_XR_sRGB = 553,
  63. /* Normal 128 bit formats */
  64. RGBA32Uint = 123,
  65. RGBA32Sint = 124,
  66. RGBA32Float = 125,
  67. /* Compressed formats. */
  68. /* S3TC/DXT */
  69. BC1_RGBA = 130,
  70. BC1_RGBA_sRGB = 131,
  71. BC2_RGBA = 132,
  72. BC2_RGBA_sRGB = 133,
  73. BC3_RGBA = 134,
  74. BC3_RGBA_sRGB = 135,
  75. /* RGTC */
  76. BC4_RUnorm = 140,
  77. BC4_RSnorm = 141,
  78. BC5_RGUnorm = 142,
  79. BC5_RGSnorm = 143,
  80. /* BPTC */
  81. BC6H_RGBFloat = 150,
  82. BC6H_RGBUfloat = 151,
  83. BC7_RGBAUnorm = 152,
  84. BC7_RGBAUnorm_sRGB = 153,
  85. /* PVRTC */
  86. PVRTC_RGB_2BPP = 160,
  87. PVRTC_RGB_2BPP_sRGB = 161,
  88. PVRTC_RGB_4BPP = 162,
  89. PVRTC_RGB_4BPP_sRGB = 163,
  90. PVRTC_RGBA_2BPP = 164,
  91. PVRTC_RGBA_2BPP_sRGB = 165,
  92. PVRTC_RGBA_4BPP = 166,
  93. PVRTC_RGBA_4BPP_sRGB = 167,
  94. /* ETC2 */
  95. EAC_R11Unorm = 170,
  96. EAC_R11Snorm = 172,
  97. EAC_RG11Unorm = 174,
  98. EAC_RG11Snorm = 176,
  99. EAC_RGBA8 = 178,
  100. EAC_RGBA8_sRGB = 179,
  101. ETC2_RGB8 = 180,
  102. ETC2_RGB8_sRGB = 181,
  103. ETC2_RGB8A1 = 182,
  104. ETC2_RGB8A1_sRGB = 183,
  105. /* ASTC */
  106. ASTC_4x4_sRGB = 186,
  107. ASTC_5x4_sRGB = 187,
  108. ASTC_5x5_sRGB = 188,
  109. ASTC_6x5_sRGB = 189,
  110. ASTC_6x6_sRGB = 190,
  111. ASTC_8x5_sRGB = 192,
  112. ASTC_8x6_sRGB = 193,
  113. ASTC_8x8_sRGB = 194,
  114. ASTC_10x5_sRGB = 195,
  115. ASTC_10x6_sRGB = 196,
  116. ASTC_10x8_sRGB = 197,
  117. ASTC_10x10_sRGB = 198,
  118. ASTC_12x10_sRGB = 199,
  119. ASTC_12x12_sRGB = 200,
  120. ASTC_4x4_LDR = 204,
  121. ASTC_5x4_LDR = 205,
  122. ASTC_5x5_LDR = 206,
  123. ASTC_6x5_LDR = 207,
  124. ASTC_6x6_LDR = 208,
  125. ASTC_8x5_LDR = 210,
  126. ASTC_8x6_LDR = 211,
  127. ASTC_8x8_LDR = 212,
  128. ASTC_10x5_LDR = 213,
  129. ASTC_10x6_LDR = 214,
  130. ASTC_10x8_LDR = 215,
  131. ASTC_10x10_LDR = 216,
  132. ASTC_12x10_LDR = 217,
  133. ASTC_12x12_LDR = 218,
  134. /*!
  135. @constant GBGR422
  136. @abstract A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
  137. @discussion This format is equivelent to YUY2, YUYV, yuvs, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_REV_APPLE. The component order, from lowest addressed byte to highest, is Y0, Cb, Y1, Cr. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.
  138. */
  139. GBGR422 = 240,
  140. /*!
  141. @constant BGRG422
  142. @abstract A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
  143. @discussion This format is equivelent to UYVY, 2vuy, or GL_RGB_422_APPLE/GL_UNSIGNED_SHORT_8_8_APPLE. The component order, from lowest addressed byte to highest, is Cb, Y0, Cr, Y1. There is no implicit colorspace conversion from YUV to RGB, the shader will receive (Cr, Y, Cb, 1). 422 textures must have a width that is a multiple of 2, and can only be used for 2D non-mipmap textures. When sampling, ClampToEdge is the only usable wrap mode.
  144. */
  145. BGRG422 = 241,
  146. /* Depth */
  147. Depth16Unorm = 250,
  148. Depth32Float = 252,
  149. /* Stencil */
  150. Stencil8 = 253,
  151. /* Depth Stencil */
  152. Depth24Unorm_Stencil8 = 255,
  153. Depth32Float_Stencil8 = 260,
  154. X32_Stencil8 = 261,
  155. X24_Stencil8 = 262,
  156. }
  157. }