Skip to content
Permalink
Browse files

gsdx ogl: always commit a sparse texture when force_texture_clear is …

…enabled

The goal is to ensure the behavior of the option. VRAM usage isn't important
as option is mainly intented for debug purpose.
  • Loading branch information...
gregory38 authored and lightningterror committed Feb 28, 2019
1 parent e77aac0 commit 70c3c1a48f685efe98c3dec33430cdde6c2f04b5
Showing with 8 additions and 0 deletions.
  1. +8 −0 plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp
@@ -240,6 +240,10 @@ GSTexture* GSDeviceOGL::CreateSurface(int type, int w, int h, int fmt)
// FIXME: it will be more logical to do it in FetchSurface. This code is only called at first creation
// of the texture. However we could reuse a deleted texture.
if (m_force_texture_clear == 0) {
// Clear won't be done if the texture isn't committed. Commit the full texture to ensure
// correct behavior of force clear option (debug option)
t->Commit();

switch(type)
{
case GSTexture::RenderTarget:
@@ -264,6 +268,10 @@ GSTexture* GSDeviceOGL::FetchSurface(int type, int w, int h, int format)


if (m_force_texture_clear) {
// Clear won't be done if the texture isn't committed. Commit the full texture to ensure
// correct behavior of force clear option (debug option)
t->Commit();

GSVector4 red(1.0f, 0.0f, 0.0f, 1.0f);
switch(type)
{

0 comments on commit 70c3c1a

Please sign in to comment.
You can’t perform that action at this time.