MCPcopy Create free account
hub / github.com/citron-neo/emulator / PixelFormatFromRenderTargetFormat

Function PixelFormatFromRenderTargetFormat

src/video_core/surface.cpp:97–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) {
98 switch (format) {
99 case Tegra::RenderTargetFormat::R32G32B32A32_FLOAT:
100 case Tegra::RenderTargetFormat::R32G32B32X32_FLOAT:
101 return PixelFormat::R32G32B32A32_FLOAT;
102 case Tegra::RenderTargetFormat::R32G32B32A32_SINT:
103 case Tegra::RenderTargetFormat::R32G32B32X32_SINT:
104 return PixelFormat::R32G32B32A32_SINT;
105 case Tegra::RenderTargetFormat::R32G32B32A32_UINT:
106 case Tegra::RenderTargetFormat::R32G32B32X32_UINT:
107 return PixelFormat::R32G32B32A32_UINT;
108 case Tegra::RenderTargetFormat::R16G16B16A16_UNORM:
109 return PixelFormat::R16G16B16A16_UNORM;
110 case Tegra::RenderTargetFormat::R16G16B16A16_SNORM:
111 return PixelFormat::R16G16B16A16_SNORM;
112 case Tegra::RenderTargetFormat::R16G16B16A16_SINT:
113 return PixelFormat::R16G16B16A16_SINT;
114 case Tegra::RenderTargetFormat::R16G16B16A16_UINT:
115 return PixelFormat::R16G16B16A16_UINT;
116 case Tegra::RenderTargetFormat::R16G16B16A16_FLOAT:
117 return PixelFormat::R16G16B16A16_FLOAT;
118 case Tegra::RenderTargetFormat::R32G32_FLOAT:
119 return PixelFormat::R32G32_FLOAT;
120 case Tegra::RenderTargetFormat::R32G32_SINT:
121 return PixelFormat::R32G32_SINT;
122 case Tegra::RenderTargetFormat::R32G32_UINT:
123 return PixelFormat::R32G32_UINT;
124 case Tegra::RenderTargetFormat::R16G16B16X16_FLOAT:
125 return PixelFormat::R16G16B16X16_FLOAT;
126 case Tegra::RenderTargetFormat::A8R8G8B8_UNORM:
127 case Tegra::RenderTargetFormat::X8R8G8B8_UNORM:
128 return PixelFormat::B8G8R8A8_UNORM;
129 case Tegra::RenderTargetFormat::A8R8G8B8_SRGB:
130 case Tegra::RenderTargetFormat::X8R8G8B8_SRGB:
131 return PixelFormat::B8G8R8A8_SRGB;
132 case Tegra::RenderTargetFormat::A2B10G10R10_UNORM:
133 return PixelFormat::A2B10G10R10_UNORM;
134 case Tegra::RenderTargetFormat::A2B10G10R10_UINT:
135 return PixelFormat::A2B10G10R10_UINT;
136 case Tegra::RenderTargetFormat::A2R10G10B10_UNORM:
137 return PixelFormat::A2R10G10B10_UNORM;
138 case Tegra::RenderTargetFormat::A8B8G8R8_UNORM:
139 case Tegra::RenderTargetFormat::X8B8G8R8_UNORM:
140 return PixelFormat::A8B8G8R8_UNORM;
141 case Tegra::RenderTargetFormat::A8B8G8R8_SRGB:
142 case Tegra::RenderTargetFormat::X8B8G8R8_SRGB:
143 return PixelFormat::A8B8G8R8_SRGB;
144 case Tegra::RenderTargetFormat::A8B8G8R8_SNORM:
145 return PixelFormat::A8B8G8R8_SNORM;
146 case Tegra::RenderTargetFormat::A8B8G8R8_SINT:
147 return PixelFormat::A8B8G8R8_SINT;
148 case Tegra::RenderTargetFormat::A8B8G8R8_UINT:
149 return PixelFormat::A8B8G8R8_UINT;
150 case Tegra::RenderTargetFormat::R16G16_UNORM:
151 return PixelFormat::R16G16_UNORM;
152 case Tegra::RenderTargetFormat::R16G16_SNORM:
153 return PixelFormat::R16G16_SNORM;
154 case Tegra::RenderTargetFormat::R16G16_SINT:

Callers 6

ImageInfoMethod · 0.85
BlitMethod · 0.85
BlitMethod · 0.85
DecodeFormatFunction · 0.85
GetFragmentOutputTypeFunction · 0.85
ClearMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected