/ include / Metal / MTLPixelFormat.hpp
MTLPixelFormat.hpp
  1  //-------------------------------------------------------------------------------------------------------------------------------------------------------------
  2  //
  3  // Metal/MTLPixelFormat.hpp
  4  //
  5  // Copyright 2020-2024 Apple Inc.
  6  //
  7  // Licensed under the Apache License, Version 2.0 (the "License");
  8  // you may not use this file except in compliance with the License.
  9  // You may obtain a copy of the License at
 10  //
 11  //     http://www.apache.org/licenses/LICENSE-2.0
 12  //
 13  // Unless required by applicable law or agreed to in writing, software
 14  // distributed under the License is distributed on an "AS IS" BASIS,
 15  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16  // See the License for the specific language governing permissions and
 17  // limitations under the License.
 18  //
 19  //-------------------------------------------------------------------------------------------------------------------------------------------------------------
 20  
 21  #pragma once
 22  
 23  #include "MTLDefines.hpp"
 24  #include "MTLHeaderBridge.hpp"
 25  #include "MTLPrivate.hpp"
 26  
 27  #include <Foundation/Foundation.hpp>
 28  
 29  namespace MTL
 30  {
 31  _MTL_ENUM(NS::UInteger, PixelFormat) {
 32      PixelFormatInvalid = 0,
 33      PixelFormatA8Unorm = 1,
 34      PixelFormatR8Unorm = 10,
 35      PixelFormatR8Unorm_sRGB = 11,
 36      PixelFormatR8Snorm = 12,
 37      PixelFormatR8Uint = 13,
 38      PixelFormatR8Sint = 14,
 39      PixelFormatR16Unorm = 20,
 40      PixelFormatR16Snorm = 22,
 41      PixelFormatR16Uint = 23,
 42      PixelFormatR16Sint = 24,
 43      PixelFormatR16Float = 25,
 44      PixelFormatRG8Unorm = 30,
 45      PixelFormatRG8Unorm_sRGB = 31,
 46      PixelFormatRG8Snorm = 32,
 47      PixelFormatRG8Uint = 33,
 48      PixelFormatRG8Sint = 34,
 49      PixelFormatB5G6R5Unorm = 40,
 50      PixelFormatA1BGR5Unorm = 41,
 51      PixelFormatABGR4Unorm = 42,
 52      PixelFormatBGR5A1Unorm = 43,
 53      PixelFormatR32Uint = 53,
 54      PixelFormatR32Sint = 54,
 55      PixelFormatR32Float = 55,
 56      PixelFormatRG16Unorm = 60,
 57      PixelFormatRG16Snorm = 62,
 58      PixelFormatRG16Uint = 63,
 59      PixelFormatRG16Sint = 64,
 60      PixelFormatRG16Float = 65,
 61      PixelFormatRGBA8Unorm = 70,
 62      PixelFormatRGBA8Unorm_sRGB = 71,
 63      PixelFormatRGBA8Snorm = 72,
 64      PixelFormatRGBA8Uint = 73,
 65      PixelFormatRGBA8Sint = 74,
 66      PixelFormatBGRA8Unorm = 80,
 67      PixelFormatBGRA8Unorm_sRGB = 81,
 68      PixelFormatRGB10A2Unorm = 90,
 69      PixelFormatRGB10A2Uint = 91,
 70      PixelFormatRG11B10Float = 92,
 71      PixelFormatRGB9E5Float = 93,
 72      PixelFormatBGR10A2Unorm = 94,
 73      PixelFormatBGR10_XR = 554,
 74      PixelFormatBGR10_XR_sRGB = 555,
 75      PixelFormatRG32Uint = 103,
 76      PixelFormatRG32Sint = 104,
 77      PixelFormatRG32Float = 105,
 78      PixelFormatRGBA16Unorm = 110,
 79      PixelFormatRGBA16Snorm = 112,
 80      PixelFormatRGBA16Uint = 113,
 81      PixelFormatRGBA16Sint = 114,
 82      PixelFormatRGBA16Float = 115,
 83      PixelFormatBGRA10_XR = 552,
 84      PixelFormatBGRA10_XR_sRGB = 553,
 85      PixelFormatRGBA32Uint = 123,
 86      PixelFormatRGBA32Sint = 124,
 87      PixelFormatRGBA32Float = 125,
 88      PixelFormatBC1_RGBA = 130,
 89      PixelFormatBC1_RGBA_sRGB = 131,
 90      PixelFormatBC2_RGBA = 132,
 91      PixelFormatBC2_RGBA_sRGB = 133,
 92      PixelFormatBC3_RGBA = 134,
 93      PixelFormatBC3_RGBA_sRGB = 135,
 94      PixelFormatBC4_RUnorm = 140,
 95      PixelFormatBC4_RSnorm = 141,
 96      PixelFormatBC5_RGUnorm = 142,
 97      PixelFormatBC5_RGSnorm = 143,
 98      PixelFormatBC6H_RGBFloat = 150,
 99      PixelFormatBC6H_RGBUfloat = 151,
100      PixelFormatBC7_RGBAUnorm = 152,
101      PixelFormatBC7_RGBAUnorm_sRGB = 153,
102      PixelFormatPVRTC_RGB_2BPP = 160,
103      PixelFormatPVRTC_RGB_2BPP_sRGB = 161,
104      PixelFormatPVRTC_RGB_4BPP = 162,
105      PixelFormatPVRTC_RGB_4BPP_sRGB = 163,
106      PixelFormatPVRTC_RGBA_2BPP = 164,
107      PixelFormatPVRTC_RGBA_2BPP_sRGB = 165,
108      PixelFormatPVRTC_RGBA_4BPP = 166,
109      PixelFormatPVRTC_RGBA_4BPP_sRGB = 167,
110      PixelFormatEAC_R11Unorm = 170,
111      PixelFormatEAC_R11Snorm = 172,
112      PixelFormatEAC_RG11Unorm = 174,
113      PixelFormatEAC_RG11Snorm = 176,
114      PixelFormatEAC_RGBA8 = 178,
115      PixelFormatEAC_RGBA8_sRGB = 179,
116      PixelFormatETC2_RGB8 = 180,
117      PixelFormatETC2_RGB8_sRGB = 181,
118      PixelFormatETC2_RGB8A1 = 182,
119      PixelFormatETC2_RGB8A1_sRGB = 183,
120      PixelFormatASTC_4x4_sRGB = 186,
121      PixelFormatASTC_5x4_sRGB = 187,
122      PixelFormatASTC_5x5_sRGB = 188,
123      PixelFormatASTC_6x5_sRGB = 189,
124      PixelFormatASTC_6x6_sRGB = 190,
125      PixelFormatASTC_8x5_sRGB = 192,
126      PixelFormatASTC_8x6_sRGB = 193,
127      PixelFormatASTC_8x8_sRGB = 194,
128      PixelFormatASTC_10x5_sRGB = 195,
129      PixelFormatASTC_10x6_sRGB = 196,
130      PixelFormatASTC_10x8_sRGB = 197,
131      PixelFormatASTC_10x10_sRGB = 198,
132      PixelFormatASTC_12x10_sRGB = 199,
133      PixelFormatASTC_12x12_sRGB = 200,
134      PixelFormatASTC_4x4_LDR = 204,
135      PixelFormatASTC_5x4_LDR = 205,
136      PixelFormatASTC_5x5_LDR = 206,
137      PixelFormatASTC_6x5_LDR = 207,
138      PixelFormatASTC_6x6_LDR = 208,
139      PixelFormatASTC_8x5_LDR = 210,
140      PixelFormatASTC_8x6_LDR = 211,
141      PixelFormatASTC_8x8_LDR = 212,
142      PixelFormatASTC_10x5_LDR = 213,
143      PixelFormatASTC_10x6_LDR = 214,
144      PixelFormatASTC_10x8_LDR = 215,
145      PixelFormatASTC_10x10_LDR = 216,
146      PixelFormatASTC_12x10_LDR = 217,
147      PixelFormatASTC_12x12_LDR = 218,
148      PixelFormatASTC_4x4_HDR = 222,
149      PixelFormatASTC_5x4_HDR = 223,
150      PixelFormatASTC_5x5_HDR = 224,
151      PixelFormatASTC_6x5_HDR = 225,
152      PixelFormatASTC_6x6_HDR = 226,
153      PixelFormatASTC_8x5_HDR = 228,
154      PixelFormatASTC_8x6_HDR = 229,
155      PixelFormatASTC_8x8_HDR = 230,
156      PixelFormatASTC_10x5_HDR = 231,
157      PixelFormatASTC_10x6_HDR = 232,
158      PixelFormatASTC_10x8_HDR = 233,
159      PixelFormatASTC_10x10_HDR = 234,
160      PixelFormatASTC_12x10_HDR = 235,
161      PixelFormatASTC_12x12_HDR = 236,
162      PixelFormatGBGR422 = 240,
163      PixelFormatBGRG422 = 241,
164      PixelFormatDepth16Unorm = 250,
165      PixelFormatDepth32Float = 252,
166      PixelFormatStencil8 = 253,
167      PixelFormatDepth24Unorm_Stencil8 = 255,
168      PixelFormatDepth32Float_Stencil8 = 260,
169      PixelFormatX32_Stencil8 = 261,
170      PixelFormatX24_Stencil8 = 262,
171  };
172  
173  }