|
|
@@ -22,4 +22,16 @@ const Tegra::Engines::Maxwell3D& GPU::Get3DEngine() const {
|
|
|
return *maxwell_3d;
|
|
|
}
|
|
|
|
|
|
+u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
|
|
|
+ ASSERT(format != RenderTargetFormat::NONE);
|
|
|
+
|
|
|
+ switch (format) {
|
|
|
+ case RenderTargetFormat::RGBA8_UNORM:
|
|
|
+ case RenderTargetFormat::RGB10_A2_UNORM:
|
|
|
+ return 4;
|
|
|
+ default:
|
|
|
+ UNIMPLEMENTED_MSG("Unimplemented render target format %u", static_cast<u32>(format));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
} // namespace Tegra
|