video_core: Reorder microprofile defines

This commit is contained in:
GPUCode
2022-10-29 20:49:39 +03:00
parent 7626804a90
commit 182bebf272
5 changed files with 11 additions and 16 deletions

View File

@ -20,13 +20,6 @@
namespace OpenGL {
MICROPROFILE_DEFINE(OpenGL_VAO, "OpenGL", "Vertex Array Setup", MP_RGB(255, 128, 0));
MICROPROFILE_DEFINE(OpenGL_VS, "OpenGL", "Vertex Shader Setup", MP_RGB(192, 128, 128));
MICROPROFILE_DEFINE(OpenGL_GS, "OpenGL", "Geometry Shader Setup", MP_RGB(128, 192, 128));
MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192));
MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(100, 100, 255));
MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100));
static bool IsVendorAmd() {
const std::string_view gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))};
return gpu_vendor == "ATI Technologies Inc." || gpu_vendor == "Advanced Micro Devices, Inc.";
@ -209,6 +202,7 @@ static constexpr std::array<GLenum, 4> vs_attrib_types{
GL_FLOAT // VertexAttributeFormat::FLOAT
};
MICROPROFILE_DEFINE(OpenGL_VAO, "OpenGL", "Vertex Array Setup", MP_RGB(255, 128, 0));
void RasterizerOpenGL::SetupVertexArray(u8* array_ptr, GLintptr buffer_offset,
GLuint vs_input_index_min, GLuint vs_input_index_max) {
MICROPROFILE_SCOPE(OpenGL_VAO);
@ -288,12 +282,14 @@ void RasterizerOpenGL::SetupVertexArray(u8* array_ptr, GLintptr buffer_offset,
}
}
MICROPROFILE_DEFINE(OpenGL_VS, "OpenGL", "Vertex Shader Setup", MP_RGB(192, 128, 128));
bool RasterizerOpenGL::SetupVertexShader() {
MICROPROFILE_SCOPE(OpenGL_VS);
return shader_program_manager->UseProgrammableVertexShader(Pica::g_state.regs,
Pica::g_state.vs);
}
MICROPROFILE_DEFINE(OpenGL_GS, "OpenGL", "Geometry Shader Setup", MP_RGB(128, 192, 128));
bool RasterizerOpenGL::SetupGeometryShader() {
MICROPROFILE_SCOPE(OpenGL_GS);
const auto& regs = Pica::g_state.regs;
@ -399,6 +395,7 @@ void RasterizerOpenGL::DrawTriangles() {
Draw(false, false);
}
MICROPROFILE_DEFINE(OpenGL_Drawing, "OpenGL", "Drawing", MP_RGB(128, 128, 192));
bool RasterizerOpenGL::Draw(bool accelerate, bool is_indexed) {
MICROPROFILE_SCOPE(OpenGL_Drawing);
const auto& regs = Pica::g_state.regs;
@ -1249,6 +1246,7 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) {
}
}
MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100));
void RasterizerOpenGL::FlushAll() {
MICROPROFILE_SCOPE(OpenGL_CacheManagement);
res_cache.FlushAll();
@ -1270,6 +1268,7 @@ void RasterizerOpenGL::FlushAndInvalidateRegion(PAddr addr, u32 size) {
res_cache.InvalidateRegion(addr, size, nullptr);
}
MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(100, 100, 255));
bool RasterizerOpenGL::AccelerateDisplayTransfer(const GPU::Regs::DisplayTransferConfig& config) {
MICROPROFILE_SCOPE(OpenGL_Blits);

View File

@ -370,7 +370,7 @@ Surface::~Surface() {
}
}
MICROPROFILE_DEFINE(OpenGL_Upload, "OpenGLSurface", "Texture Upload", MP_RGB(128, 192, 64));
MICROPROFILE_DEFINE(OpenGL_Upload, "OpenGL", "Texture Upload", MP_RGB(128, 192, 64));
void Surface::Upload(const VideoCore::BufferTextureCopy& upload, const StagingBuffer& staging) {
MICROPROFILE_SCOPE(OpenGL_Upload);
@ -404,7 +404,7 @@ void Surface::Upload(const VideoCore::BufferTextureCopy& upload, const StagingBu
InvalidateAllWatcher();
}
MICROPROFILE_DEFINE(OpenGL_Download, "OpenGLSurface", "Texture Download", MP_RGB(128, 192, 64));
MICROPROFILE_DEFINE(OpenGL_Download, "OpenGL", "Texture Download", MP_RGB(128, 192, 64));
void Surface::Download(const VideoCore::BufferTextureCopy& download, const StagingBuffer& staging) {
MICROPROFILE_SCOPE(OpenGL_Download);

View File

@ -900,7 +900,6 @@ void RendererVulkan::SwapBuffers() {
if (swapchain.NeedsRecreation()) {
RecreateSwapchain();
}
scheduler.WaitWorker();
swapchain.AcquireNextImage();
} while (swapchain.NeedsRecreation());
@ -929,9 +928,8 @@ void RendererVulkan::SwapBuffers() {
DrawScreens(layout, false);
const vk::Semaphore image_acquired = swapchain.GetImageAcquiredSemaphore();
const VkSemaphore present_ready = swapchain.GetPresentReadySemaphore();
const vk::Semaphore present_ready = swapchain.GetPresentReadySemaphore();
scheduler.Flush(present_ready, image_acquired);
//scheduler.WaitWorker();
swapchain.Present();
m_current_frame++;

View File

@ -163,7 +163,6 @@ void StreamBuffer::Flush() {
ASSERT(flush_offset + flush_size <= total_size);
if (flush_size > 0) [[likely]] {
// Ensure all staging writes are visible to the host memory domain
VmaAllocator allocator = instance.GetAllocator();
vmaFlushAllocation(allocator, staging.allocation, flush_offset, flush_size);
if (gpu_buffer) {
@ -202,7 +201,6 @@ void StreamBuffer::Invalidate() {
ASSERT(flush_offset + flush_size <= total_size);
if (flush_size > 0) [[likely]] {
// Ensure the staging memory can be read by the host
VmaAllocator allocator = instance.GetAllocator();
vmaInvalidateAllocation(allocator, staging.allocation, flush_offset, flush_size);
flush_offset = buffer_offset;

View File

@ -659,7 +659,7 @@ void Surface::Transition(vk::ImageLayout new_layout, u32 level, u32 level_count)
runtime.Transition(alloc, new_layout, level, level_count);
}
MICROPROFILE_DEFINE(Vulkan_Upload, "VulkanSurface", "Texture Upload", MP_RGB(128, 192, 64));
MICROPROFILE_DEFINE(Vulkan_Upload, "Vulkan", "Texture Upload", MP_RGB(128, 192, 64));
void Surface::Upload(const VideoCore::BufferTextureCopy& upload, const StagingData& staging) {
MICROPROFILE_SCOPE(Vulkan_Upload);
@ -715,7 +715,7 @@ void Surface::Upload(const VideoCore::BufferTextureCopy& upload, const StagingDa
InvalidateAllWatcher();
}
MICROPROFILE_DEFINE(Vulkan_Download, "VulkanSurface", "Texture Download", MP_RGB(128, 192, 64));
MICROPROFILE_DEFINE(Vulkan_Download, "Vulkan", "Texture Download", MP_RGB(128, 192, 64));
void Surface::Download(const VideoCore::BufferTextureCopy& download, const StagingData& staging) {
MICROPROFILE_SCOPE(Vulkan_Download);