Skip to content
Snippets Groups Projects
Unverified Commit 948ac976 authored by Fernando S's avatar Fernando S Committed by GitHub
Browse files

Merge pull request #9583 from FernandoS27/fuck-ogl-already

VideoCore: Fix OGL cache invalidation.
parents 66e4a48b efbb6fe2
No related branches found
No related tags found
No related merge requests found
...@@ -139,6 +139,7 @@ void RasterizerOpenGL::LoadDiskResources(u64 title_id, std::stop_token stop_load ...@@ -139,6 +139,7 @@ void RasterizerOpenGL::LoadDiskResources(u64 title_id, std::stop_token stop_load
void RasterizerOpenGL::Clear(u32 layer_count) { void RasterizerOpenGL::Clear(u32 layer_count) {
MICROPROFILE_SCOPE(OpenGL_Clears); MICROPROFILE_SCOPE(OpenGL_Clears);
gpu_memory->FlushCaching();
const auto& regs = maxwell3d->regs; const auto& regs = maxwell3d->regs;
bool use_color{}; bool use_color{};
bool use_depth{}; bool use_depth{};
...@@ -207,6 +208,7 @@ void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) { ...@@ -207,6 +208,7 @@ void RasterizerOpenGL::PrepareDraw(bool is_indexed, Func&& draw_func) {
MICROPROFILE_SCOPE(OpenGL_Drawing); MICROPROFILE_SCOPE(OpenGL_Drawing);
SCOPE_EXIT({ gpu.TickWork(); }); SCOPE_EXIT({ gpu.TickWork(); });
gpu_memory->FlushCaching();
query_cache.UpdateCounters(); query_cache.UpdateCounters();
GraphicsPipeline* const pipeline{shader_cache.CurrentGraphicsPipeline()}; GraphicsPipeline* const pipeline{shader_cache.CurrentGraphicsPipeline()};
...@@ -319,6 +321,7 @@ void RasterizerOpenGL::DrawIndirect() { ...@@ -319,6 +321,7 @@ void RasterizerOpenGL::DrawIndirect() {
} }
void RasterizerOpenGL::DispatchCompute() { void RasterizerOpenGL::DispatchCompute() {
gpu_memory->FlushCaching();
ComputePipeline* const pipeline{shader_cache.CurrentComputePipeline()}; ComputePipeline* const pipeline{shader_cache.CurrentComputePipeline()};
if (!pipeline) { if (!pipeline) {
return; return;
...@@ -526,6 +529,7 @@ void RasterizerOpenGL::TickFrame() { ...@@ -526,6 +529,7 @@ void RasterizerOpenGL::TickFrame() {
} }
bool RasterizerOpenGL::AccelerateConditionalRendering() { bool RasterizerOpenGL::AccelerateConditionalRendering() {
gpu_memory->FlushCaching();
if (Settings::IsGPULevelHigh()) { if (Settings::IsGPULevelHigh()) {
// Reimplement Host conditional rendering. // Reimplement Host conditional rendering.
return false; return false;
......
...@@ -270,6 +270,7 @@ void RasterizerVulkan::Clear(u32 layer_count) { ...@@ -270,6 +270,7 @@ void RasterizerVulkan::Clear(u32 layer_count) {
MICROPROFILE_SCOPE(Vulkan_Clearing); MICROPROFILE_SCOPE(Vulkan_Clearing);
FlushWork(); FlushWork();
gpu_memory->FlushCaching();
query_cache.UpdateCounters(); query_cache.UpdateCounters();
...@@ -628,6 +629,7 @@ void RasterizerVulkan::TickFrame() { ...@@ -628,6 +629,7 @@ void RasterizerVulkan::TickFrame() {
} }
bool RasterizerVulkan::AccelerateConditionalRendering() { bool RasterizerVulkan::AccelerateConditionalRendering() {
gpu_memory->FlushCaching();
if (Settings::IsGPULevelHigh()) { if (Settings::IsGPULevelHigh()) {
// TODO(Blinkhawk): Reimplement Host conditional rendering. // TODO(Blinkhawk): Reimplement Host conditional rendering.
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment