mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Unify GetFramebufferList() (trivial)
This commit is contained in:
parent
898716cc26
commit
d53c88456a
@ -2044,3 +2044,22 @@ void FramebufferManagerCommon::DownloadFramebufferForClut(u32 fb_address, u32 lo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> FramebufferManagerCommon::GetFramebufferList() {
|
||||
std::vector<FramebufferInfo> list;
|
||||
|
||||
for (size_t i = 0; i < vfbs_.size(); ++i) {
|
||||
VirtualFramebuffer *vfb = vfbs_[i];
|
||||
|
||||
FramebufferInfo info;
|
||||
info.fb_address = vfb->fb_address;
|
||||
info.z_address = vfb->z_address;
|
||||
info.format = vfb->format;
|
||||
info.width = vfb->width;
|
||||
info.height = vfb->height;
|
||||
info.fbo = vfb->fbo;
|
||||
list.push_back(info);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "Core/MemMap.h"
|
||||
#include "GPU/GPU.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
#include "GPU/GPUInterface.h"
|
||||
#include "thin3d/thin3d.h"
|
||||
|
||||
enum {
|
||||
@ -212,6 +213,7 @@ public:
|
||||
}
|
||||
}
|
||||
virtual void RebindFramebuffer() = 0;
|
||||
std::vector<FramebufferInfo> GetFramebufferList();
|
||||
|
||||
void CopyDisplayToOutput();
|
||||
|
||||
|
@ -718,25 +718,6 @@ void FramebufferManagerD3D11::DeviceLost() {
|
||||
DestroyAllFBOs();
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> FramebufferManagerD3D11::GetFramebufferList() {
|
||||
std::vector<FramebufferInfo> list;
|
||||
|
||||
for (size_t i = 0; i < vfbs_.size(); ++i) {
|
||||
VirtualFramebuffer *vfb = vfbs_[i];
|
||||
|
||||
FramebufferInfo info;
|
||||
info.fb_address = vfb->fb_address;
|
||||
info.z_address = vfb->z_address;
|
||||
info.format = vfb->format;
|
||||
info.width = vfb->width;
|
||||
info.height = vfb->height;
|
||||
info.fbo = vfb->fbo;
|
||||
list.push_back(info);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
void FramebufferManagerD3D11::DestroyAllFBOs() {
|
||||
currentRenderVfb_ = 0;
|
||||
displayFramebuf_ = 0;
|
||||
|
@ -57,8 +57,6 @@ public:
|
||||
|
||||
void BindFramebufferAsColorTexture(int stage, VirtualFramebuffer *framebuffer, int flags);
|
||||
|
||||
std::vector<FramebufferInfo> GetFramebufferList();
|
||||
|
||||
virtual bool NotifyStencilUpload(u32 addr, int size, bool skipZero = false) override;
|
||||
|
||||
virtual void RebindFramebuffer() override;
|
||||
|
@ -755,10 +755,6 @@ void GPU_D3D11::ClearShaderCache() {
|
||||
shaderManagerD3D11_->ClearShaders();
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> GPU_D3D11::GetFramebufferList() {
|
||||
return framebufferManagerD3D11_->GetFramebufferList();
|
||||
}
|
||||
|
||||
void GPU_D3D11::DoState(PointerWrap &p) {
|
||||
GPUCommon::DoState(p);
|
||||
|
||||
|
@ -60,7 +60,6 @@ public:
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
std::vector<FramebufferInfo> GetFramebufferList() override;
|
||||
|
||||
bool GetCurrentTexture(GPUDebugBuffer &buffer, int level) override;
|
||||
bool GetCurrentClut(GPUDebugBuffer &buffer) override;
|
||||
|
@ -693,25 +693,6 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
|
||||
DestroyAllFBOs();
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> FramebufferManagerDX9::GetFramebufferList() {
|
||||
std::vector<FramebufferInfo> list;
|
||||
|
||||
for (size_t i = 0; i < vfbs_.size(); ++i) {
|
||||
VirtualFramebuffer *vfb = vfbs_[i];
|
||||
|
||||
FramebufferInfo info;
|
||||
info.fb_address = vfb->fb_address;
|
||||
info.z_address = vfb->z_address;
|
||||
info.format = vfb->format;
|
||||
info.width = vfb->width;
|
||||
info.height = vfb->height;
|
||||
info.fbo = vfb->fbo;
|
||||
list.push_back(info);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
void FramebufferManagerDX9::DecimateFBOs() {
|
||||
FramebufferManagerCommon::DecimateFBOs();
|
||||
for (auto it = offscreenSurfaces_.begin(); it != offscreenSurfaces_.end(); ) {
|
||||
|
@ -59,8 +59,6 @@ public:
|
||||
|
||||
void BindFramebufferAsColorTexture(int stage, VirtualFramebuffer *framebuffer, int flags);
|
||||
|
||||
std::vector<FramebufferInfo> GetFramebufferList();
|
||||
|
||||
virtual bool NotifyStencilUpload(u32 addr, int size, bool skipZero = false) override;
|
||||
|
||||
bool GetFramebuffer(u32 fb_address, int fb_stride, GEBufferFormat format, GPUDebugBuffer &buffer, int maxRes);
|
||||
|
@ -688,10 +688,6 @@ void GPU_DX9::ClearShaderCache() {
|
||||
shaderManagerDX9_->ClearCache(true);
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> GPU_DX9::GetFramebufferList() {
|
||||
return framebufferManagerDX9_->GetFramebufferList();
|
||||
}
|
||||
|
||||
void GPU_DX9::DoState(PointerWrap &p) {
|
||||
GPUCommon::DoState(p);
|
||||
|
||||
|
@ -61,7 +61,6 @@ public:
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
std::vector<FramebufferInfo> GetFramebufferList() override;
|
||||
|
||||
bool GetCurrentTexture(GPUDebugBuffer &buffer, int level) override;
|
||||
bool GetCurrentClut(GPUDebugBuffer &buffer) override;
|
||||
|
@ -929,10 +929,6 @@ void GPU_GLES::CleanupBeforeUI() {
|
||||
glstate.elementArrayBuffer.bind(0);
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> GPU_GLES::GetFramebufferList() {
|
||||
return framebufferManagerGL_->GetFramebufferList();
|
||||
}
|
||||
|
||||
void GPU_GLES::DoState(PointerWrap &p) {
|
||||
GPUCommon::DoState(p);
|
||||
|
||||
|
@ -63,7 +63,6 @@ public:
|
||||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
std::vector<FramebufferInfo> GetFramebufferList() override;
|
||||
|
||||
bool GetCurrentTexture(GPUDebugBuffer &buffer, int level) override;
|
||||
bool GetCurrentClut(GPUDebugBuffer &buffer) override;
|
||||
|
@ -2506,3 +2506,8 @@ bool GPUCommon::GetOutputFramebuffer(GPUDebugBuffer &buffer) {
|
||||
bool GPUCommon::GetCurrentTexture(GPUDebugBuffer &buffer, int level) {
|
||||
return textureCache_->GetCurrentTextureDebug(buffer, level);
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> GPUCommon::GetFramebufferList() {
|
||||
return framebufferManager_->GetFramebufferList();
|
||||
}
|
||||
|
||||
|
@ -223,9 +223,7 @@ public:
|
||||
bool DecodeTexture(u8* dest, const GPUgstate &state) override {
|
||||
return false;
|
||||
}
|
||||
std::vector<FramebufferInfo> GetFramebufferList() override {
|
||||
return std::vector<FramebufferInfo>();
|
||||
}
|
||||
std::vector<FramebufferInfo> GetFramebufferList();
|
||||
void ClearShaderCache() override {}
|
||||
void CleanupBeforeUI() override {}
|
||||
|
||||
|
@ -687,25 +687,6 @@ void FramebufferManagerVulkan::DeviceRestore(VulkanContext *vulkan) {
|
||||
InitDeviceObjects();
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> FramebufferManagerVulkan::GetFramebufferList() {
|
||||
std::vector<FramebufferInfo> list;
|
||||
|
||||
for (size_t i = 0; i < vfbs_.size(); ++i) {
|
||||
VirtualFramebuffer *vfb = vfbs_[i];
|
||||
|
||||
FramebufferInfo info;
|
||||
info.fb_address = vfb->fb_address;
|
||||
info.z_address = vfb->z_address;
|
||||
info.format = vfb->format;
|
||||
info.width = vfb->width;
|
||||
info.height = vfb->height;
|
||||
info.fbo = vfb->fbo;
|
||||
list.push_back(info);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
void FramebufferManagerVulkan::DestroyAllFBOs() {
|
||||
currentRenderVfb_ = 0;
|
||||
displayFramebuf_ = 0;
|
||||
|
@ -71,8 +71,6 @@ public:
|
||||
|
||||
void BlitFramebufferDepth(VirtualFramebuffer *src, VirtualFramebuffer *dst) override;
|
||||
|
||||
std::vector<FramebufferInfo> GetFramebufferList();
|
||||
|
||||
bool NotifyStencilUpload(u32 addr, int size, bool skipZero = false) override;
|
||||
|
||||
virtual void RebindFramebuffer() override;
|
||||
|
@ -839,10 +839,6 @@ void GPU_Vulkan::ClearShaderCache() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
std::vector<FramebufferInfo> GPU_Vulkan::GetFramebufferList() {
|
||||
return framebufferManagerVulkan_->GetFramebufferList();
|
||||
}
|
||||
|
||||
void GPU_Vulkan::DoState(PointerWrap &p) {
|
||||
GPUCommon::DoState(p);
|
||||
|
||||
|
@ -84,7 +84,6 @@ public:
|
||||
// Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend.
|
||||
std::vector<std::string> DebugGetShaderIDs(DebugShaderType shader) override;
|
||||
std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override;
|
||||
std::vector<FramebufferInfo> GetFramebufferList() override;
|
||||
bool GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices) override;
|
||||
bool DescribeCodePtr(const u8 *ptr, std::string &name) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user