Remove certain optimizations that caused texception to fail in certain scenarios.
This commit is contained in:
parent
e9d84ef22c
commit
3558c88442
3 changed files with 1 additions and 24 deletions
|
@ -575,8 +575,6 @@ std::pair<bool, bool> RasterizerOpenGL::ConfigureFramebuffers(
|
||||||
SetupCachedFramebuffer(fbkey, current_state);
|
SetupCachedFramebuffer(fbkey, current_state);
|
||||||
SyncViewport(current_state);
|
SyncViewport(current_state);
|
||||||
|
|
||||||
res_cache.SignalPostFramebufferSetup();
|
|
||||||
|
|
||||||
return current_depth_stencil_usage = {static_cast<bool>(depth_surface), fbkey.stencil_enable};
|
return current_depth_stencil_usage = {static_cast<bool>(depth_surface), fbkey.stencil_enable};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1019,7 +1017,6 @@ void RasterizerOpenGL::SetupTextures(Maxwell::ShaderStage stage, const Shader& s
|
||||||
texture_samplers[current_bindpoint].SyncWithConfig(texture.tsc);
|
texture_samplers[current_bindpoint].SyncWithConfig(texture.tsc);
|
||||||
|
|
||||||
Surface surface = res_cache.GetTextureSurface(texture, entry);
|
Surface surface = res_cache.GetTextureSurface(texture, entry);
|
||||||
res_cache.SignalSurfaceParameter(surface);
|
|
||||||
if (surface != nullptr) {
|
if (surface != nullptr) {
|
||||||
state.texture_units[current_bindpoint].texture =
|
state.texture_units[current_bindpoint].texture =
|
||||||
entry.IsArray() ? surface->TextureLayer().handle : surface->Texture().handle;
|
entry.IsArray() ? surface->TextureLayer().handle : surface->Texture().handle;
|
||||||
|
|
|
@ -1394,7 +1394,6 @@ bool RasterizerCacheOpenGL::PartialReinterpretSurface(Surface triggering_surface
|
||||||
void RasterizerCacheOpenGL::NotifyFrameBufferChange(Surface triggering_surface) {
|
void RasterizerCacheOpenGL::NotifyFrameBufferChange(Surface triggering_surface) {
|
||||||
if (triggering_surface == nullptr)
|
if (triggering_surface == nullptr)
|
||||||
return;
|
return;
|
||||||
run_texception_pass = false;
|
|
||||||
if (texception) {
|
if (texception) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1408,11 +1407,10 @@ void RasterizerCacheOpenGL::SignalPreDrawCall() {
|
||||||
if (texception) {
|
if (texception) {
|
||||||
glTextureBarrier();
|
glTextureBarrier();
|
||||||
}
|
}
|
||||||
|
texception = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerCacheOpenGL::SignalPostDrawCall() {
|
void RasterizerCacheOpenGL::SignalPostDrawCall() {
|
||||||
if (!run_texception_pass)
|
|
||||||
return;
|
|
||||||
for (u32 i = 0; i < Maxwell::NumRenderTargets; i++) {
|
for (u32 i = 0; i < Maxwell::NumRenderTargets; i++) {
|
||||||
if (current_color_buffers[i] != nullptr) {
|
if (current_color_buffers[i] != nullptr) {
|
||||||
Surface intersect = CollideOnReinterpretedSurface(current_color_buffers[i]->GetAddr());
|
Surface intersect = CollideOnReinterpretedSurface(current_color_buffers[i]->GetAddr());
|
||||||
|
@ -1422,21 +1420,6 @@ void RasterizerCacheOpenGL::SignalPostDrawCall() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!texception)
|
|
||||||
run_texception_pass = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RasterizerCacheOpenGL::SignalPostFramebufferSetup() {
|
|
||||||
if (!run_texception_pass)
|
|
||||||
texception = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RasterizerCacheOpenGL::SignalSurfaceParameter(Surface& surface) {
|
|
||||||
if (surface == nullptr)
|
|
||||||
return;
|
|
||||||
if (surface->IsReinterpreted()) {
|
|
||||||
run_texception_pass = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace OpenGL
|
} // namespace OpenGL
|
||||||
|
|
|
@ -471,8 +471,6 @@ public:
|
||||||
|
|
||||||
void SignalPreDrawCall();
|
void SignalPreDrawCall();
|
||||||
void SignalPostDrawCall();
|
void SignalPostDrawCall();
|
||||||
void SignalSurfaceParameter(Surface& surface);
|
|
||||||
void SignalPostFramebufferSetup();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void LoadSurface(const Surface& surface);
|
void LoadSurface(const Surface& surface);
|
||||||
|
@ -512,7 +510,6 @@ private:
|
||||||
OGLFramebuffer read_framebuffer;
|
OGLFramebuffer read_framebuffer;
|
||||||
OGLFramebuffer draw_framebuffer;
|
OGLFramebuffer draw_framebuffer;
|
||||||
|
|
||||||
bool run_texception_pass = false;
|
|
||||||
bool texception = false;
|
bool texception = false;
|
||||||
|
|
||||||
/// Use a Pixel Buffer Object to download the previous texture and then upload it to the new one
|
/// Use a Pixel Buffer Object to download the previous texture and then upload it to the new one
|
||||||
|
|
Loading…
Reference in a new issue