rasterizer_cache: microprofile: Rename OpenGL to RasterizerCache
This commit is contained in:
@@ -26,7 +26,7 @@ CachedSurface::~CachedSurface() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(OpenGL_SurfaceLoad, "OpenGL", "Surface Load", MP_RGB(128, 192, 64));
|
MICROPROFILE_DEFINE(RasterizerCache_SurfaceLoad, "RasterizerCache", "Surface Load", MP_RGB(128, 192, 64));
|
||||||
void CachedSurface::LoadGLBuffer(PAddr load_start, PAddr load_end) {
|
void CachedSurface::LoadGLBuffer(PAddr load_start, PAddr load_end) {
|
||||||
ASSERT(type != SurfaceType::Fill);
|
ASSERT(type != SurfaceType::Fill);
|
||||||
const bool need_swap =
|
const bool need_swap =
|
||||||
@@ -47,7 +47,7 @@ void CachedSurface::LoadGLBuffer(PAddr load_start, PAddr load_end) {
|
|||||||
if (load_start < Memory::VRAM_VADDR && load_end > Memory::VRAM_VADDR)
|
if (load_start < Memory::VRAM_VADDR && load_end > Memory::VRAM_VADDR)
|
||||||
load_start = Memory::VRAM_VADDR;
|
load_start = Memory::VRAM_VADDR;
|
||||||
|
|
||||||
MICROPROFILE_SCOPE(OpenGL_SurfaceLoad);
|
MICROPROFILE_SCOPE(RasterizerCache_SurfaceLoad);
|
||||||
|
|
||||||
ASSERT(load_start >= addr && load_end <= end);
|
ASSERT(load_start >= addr && load_end <= end);
|
||||||
const u32 start_offset = load_start - addr;
|
const u32 start_offset = load_start - addr;
|
||||||
@@ -103,7 +103,7 @@ void CachedSurface::LoadGLBuffer(PAddr load_start, PAddr load_end) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(OpenGL_SurfaceFlush, "OpenGL", "Surface Flush", MP_RGB(128, 192, 64));
|
MICROPROFILE_DEFINE(RasterizerCache_SurfaceFlush, "RasterizerCache", "Surface Flush", MP_RGB(128, 192, 64));
|
||||||
void CachedSurface::FlushGLBuffer(PAddr flush_start, PAddr flush_end) {
|
void CachedSurface::FlushGLBuffer(PAddr flush_start, PAddr flush_end) {
|
||||||
u8* const dst_buffer = VideoCore::g_memory->GetPhysicalPointer(addr);
|
u8* const dst_buffer = VideoCore::g_memory->GetPhysicalPointer(addr);
|
||||||
if (dst_buffer == nullptr)
|
if (dst_buffer == nullptr)
|
||||||
@@ -119,7 +119,7 @@ void CachedSurface::FlushGLBuffer(PAddr flush_start, PAddr flush_end) {
|
|||||||
if (flush_start < Memory::VRAM_VADDR && flush_end > Memory::VRAM_VADDR)
|
if (flush_start < Memory::VRAM_VADDR && flush_end > Memory::VRAM_VADDR)
|
||||||
flush_start = Memory::VRAM_VADDR;
|
flush_start = Memory::VRAM_VADDR;
|
||||||
|
|
||||||
MICROPROFILE_SCOPE(OpenGL_SurfaceFlush);
|
MICROPROFILE_SCOPE(RasterizerCache_SurfaceFlush);
|
||||||
|
|
||||||
ASSERT(flush_start >= addr && flush_end <= end);
|
ASSERT(flush_start >= addr && flush_end <= end);
|
||||||
const u32 start_offset = flush_start - addr;
|
const u32 start_offset = flush_start - addr;
|
||||||
@@ -252,13 +252,13 @@ void CachedSurface::DumpTexture(GLuint target_tex, u64 tex_hash) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(OpenGL_TextureUL, "OpenGL", "Texture Upload", MP_RGB(128, 192, 64));
|
MICROPROFILE_DEFINE(RasterizerCache_TextureUL, "RasterizerCache", "Texture Upload", MP_RGB(128, 192, 64));
|
||||||
void CachedSurface::UploadGLTexture(Common::Rectangle<u32> rect) {
|
void CachedSurface::UploadGLTexture(Common::Rectangle<u32> rect) {
|
||||||
if (type == SurfaceType::Fill) {
|
if (type == SurfaceType::Fill) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MICROPROFILE_SCOPE(OpenGL_TextureUL);
|
MICROPROFILE_SCOPE(RasterizerCache_TextureUL);
|
||||||
ASSERT(gl_buffer.size() == width * height * GetBytesPerPixel(pixel_format));
|
ASSERT(gl_buffer.size() == width * height * GetBytesPerPixel(pixel_format));
|
||||||
|
|
||||||
u64 tex_hash = 0;
|
u64 tex_hash = 0;
|
||||||
@@ -357,13 +357,13 @@ void CachedSurface::UploadGLTexture(Common::Rectangle<u32> rect) {
|
|||||||
InvalidateAllWatcher();
|
InvalidateAllWatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(OpenGL_TextureDL, "OpenGL", "Texture Download", MP_RGB(128, 192, 64));
|
MICROPROFILE_DEFINE(RasterizerCache_TextureDL, "RasterizerCache", "Texture Download", MP_RGB(128, 192, 64));
|
||||||
void CachedSurface::DownloadGLTexture(const Common::Rectangle<u32>& rect) {
|
void CachedSurface::DownloadGLTexture(const Common::Rectangle<u32>& rect) {
|
||||||
if (type == SurfaceType::Fill) {
|
if (type == SurfaceType::Fill) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MICROPROFILE_SCOPE(OpenGL_TextureDL);
|
MICROPROFILE_SCOPE(RasterizerCache_TextureDL);
|
||||||
|
|
||||||
if (gl_buffer.empty()) {
|
if (gl_buffer.empty()) {
|
||||||
gl_buffer.resize(width * height * GetBytesPerPixel(pixel_format));
|
gl_buffer.resize(width * height * GetBytesPerPixel(pixel_format));
|
||||||
|
@@ -40,10 +40,10 @@ OGLTexture RasterizerCache::AllocateSurfaceTexture(PixelFormat format, u32 width
|
|||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(OpenGL_CopySurface, "OpenGL", "CopySurface", MP_RGB(128, 192, 64));
|
MICROPROFILE_DEFINE(RasterizerCache_CopySurface, "RasterizerCache", "CopySurface", MP_RGB(128, 192, 64));
|
||||||
void RasterizerCache::CopySurface(const Surface& src_surface, const Surface& dst_surface,
|
void RasterizerCache::CopySurface(const Surface& src_surface, const Surface& dst_surface,
|
||||||
SurfaceInterval copy_interval) {
|
SurfaceInterval copy_interval) {
|
||||||
MICROPROFILE_SCOPE(OpenGL_CopySurface);
|
MICROPROFILE_SCOPE(RasterizerCache_CopySurface);
|
||||||
|
|
||||||
SurfaceParams subrect_params = dst_surface->FromInterval(copy_interval);
|
SurfaceParams subrect_params = dst_surface->FromInterval(copy_interval);
|
||||||
ASSERT(subrect_params.GetInterval() == copy_interval && src_surface != dst_surface);
|
ASSERT(subrect_params.GetInterval() == copy_interval && src_surface != dst_surface);
|
||||||
@@ -199,12 +199,12 @@ RasterizerCache::RasterizerCache(VideoCore::RasterizerAccelerated& rasterizer)
|
|||||||
|
|
||||||
RasterizerCache::~RasterizerCache() = default;
|
RasterizerCache::~RasterizerCache() = default;
|
||||||
|
|
||||||
MICROPROFILE_DEFINE(OpenGL_BlitSurface, "OpenGL", "BlitSurface", MP_RGB(128, 192, 64));
|
MICROPROFILE_DEFINE(RasterizerCache_BlitSurface, "RasterizerCache", "BlitSurface", MP_RGB(128, 192, 64));
|
||||||
bool RasterizerCache::BlitSurfaces(const Surface& src_surface,
|
bool RasterizerCache::BlitSurfaces(const Surface& src_surface,
|
||||||
const Common::Rectangle<u32>& src_rect,
|
const Common::Rectangle<u32>& src_rect,
|
||||||
const Surface& dst_surface,
|
const Surface& dst_surface,
|
||||||
const Common::Rectangle<u32>& dst_rect) {
|
const Common::Rectangle<u32>& dst_rect) {
|
||||||
MICROPROFILE_SCOPE(OpenGL_BlitSurface);
|
MICROPROFILE_SCOPE(RasterizerCache_BlitSurface);
|
||||||
|
|
||||||
if (CheckFormatsBlittable(src_surface->pixel_format, dst_surface->pixel_format)) {
|
if (CheckFormatsBlittable(src_surface->pixel_format, dst_surface->pixel_format)) {
|
||||||
dst_surface->InvalidateAllWatcher();
|
dst_surface->InvalidateAllWatcher();
|
||||||
|
Reference in New Issue
Block a user