|
@@ -22,6 +22,7 @@
|
|
|
#include "common/common_funcs.h"
|
|
#include "common/common_funcs.h"
|
|
|
#include "common/common_types.h"
|
|
#include "common/common_types.h"
|
|
|
#include "common/math_util.h"
|
|
#include "common/math_util.h"
|
|
|
|
|
+#include "video_core/gpu.h"
|
|
|
#include "video_core/renderer_opengl/gl_resource_manager.h"
|
|
#include "video_core/renderer_opengl/gl_resource_manager.h"
|
|
|
|
|
|
|
|
struct CachedSurface;
|
|
struct CachedSurface;
|
|
@@ -115,6 +116,15 @@ struct SurfaceParams {
|
|
|
return GetFormatBpp(pixel_format);
|
|
return GetFormatBpp(pixel_format);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ static PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat format) {
|
|
|
|
|
+ switch (format) {
|
|
|
|
|
+ case Tegra::FramebufferConfig::PixelFormat::ABGR8:
|
|
|
|
|
+ return PixelFormat::RGBA8;
|
|
|
|
|
+ default:
|
|
|
|
|
+ UNREACHABLE();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
static bool CheckFormatsBlittable(PixelFormat pixel_format_a, PixelFormat pixel_format_b) {
|
|
static bool CheckFormatsBlittable(PixelFormat pixel_format_a, PixelFormat pixel_format_b) {
|
|
|
SurfaceType a_type = GetFormatType(pixel_format_a);
|
|
SurfaceType a_type = GetFormatType(pixel_format_a);
|
|
|
SurfaceType b_type = GetFormatType(pixel_format_b);
|
|
SurfaceType b_type = GetFormatType(pixel_format_b);
|
|
@@ -257,7 +267,7 @@ struct CachedSurface : SurfaceParams {
|
|
|
std::unique_ptr<u8[]> gl_buffer;
|
|
std::unique_ptr<u8[]> gl_buffer;
|
|
|
size_t gl_buffer_size = 0;
|
|
size_t gl_buffer_size = 0;
|
|
|
|
|
|
|
|
- // Read/Write data in 3DS memory to/from gl_buffer
|
|
|
|
|
|
|
+ // Read/Write data in Switch memory to/from gl_buffer
|
|
|
void LoadGLBuffer(VAddr load_start, VAddr load_end);
|
|
void LoadGLBuffer(VAddr load_start, VAddr load_end);
|
|
|
void FlushGLBuffer(VAddr flush_start, VAddr flush_end);
|
|
void FlushGLBuffer(VAddr flush_start, VAddr flush_end);
|
|
|
|
|
|