Update cube texture borders when dirty. Change-Id: Ic259645ab7950b0b2800964bbfd14f3294de50b1 Reviewed-on: https://swiftshader-review.googlesource.com/14288 Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Renderer/Surface.cpp b/src/Renderer/Surface.cpp index 3533d25..12d990a 100644 --- a/src/Renderer/Surface.cpp +++ b/src/Renderer/Surface.cpp
@@ -1249,7 +1249,7 @@ stencil.lock = LOCK_UNLOCKED; stencil.dirty = false; - dirtyMipmaps = true; + dirtyContents = true; paletteUsed = 0; } @@ -1302,7 +1302,7 @@ stencil.lock = LOCK_UNLOCKED; stencil.dirty = false; - dirtyMipmaps = true; + dirtyContents = true; paletteUsed = 0; } @@ -1367,7 +1367,7 @@ case LOCK_WRITEONLY: case LOCK_READWRITE: case LOCK_DISCARD: - dirtyMipmaps = true; + dirtyContents = true; break; default: ASSERT(false); @@ -1446,7 +1446,7 @@ case LOCK_WRITEONLY: case LOCK_READWRITE: case LOCK_DISCARD: - dirtyMipmaps = true; + dirtyContents = true; break; default: ASSERT(false); @@ -3649,14 +3649,14 @@ return renderTarget; } - bool Surface::hasDirtyMipmaps() const + bool Surface::hasDirtyContents() const { - return dirtyMipmaps; + return dirtyContents; } - void Surface::cleanMipmaps() + void Surface::markContentsClean() { - dirtyMipmaps = false; + dirtyContents = false; } Resource *Surface::getResource()
diff --git a/src/Renderer/Surface.hpp b/src/Renderer/Surface.hpp index 4de2b33..fbfe063 100644 --- a/src/Renderer/Surface.hpp +++ b/src/Renderer/Surface.hpp
@@ -248,7 +248,7 @@ Format format; AtomicInt lock; - bool dirty; + bool dirty; // Sibling internal/external buffer doesn't match. }; protected: @@ -326,8 +326,8 @@ bool hasPalette() const; bool isRenderTarget() const; - bool hasDirtyMipmaps() const; - void cleanMipmaps(); + bool hasDirtyContents() const; + void markContentsClean(); inline bool isExternalDirty() const; Resource *getResource(); @@ -474,7 +474,7 @@ const bool lockable; const bool renderTarget; - bool dirtyMipmaps; + bool dirtyContents; // Sibling surfaces need updating (mipmaps / cube borders). unsigned int paletteUsed; static unsigned int *palette; // FIXME: Not multi-device safe