diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2024-09-27 12:23:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 12:23:11 -0700 |
commit | 9e8cf72a355d5353564c0199990a6b5073f37fca (patch) | |
tree | 72b428f1ef946005c26e9479c459b6bcfe834d40 /indra/llrender/llrendertarget.h | |
parent | 199ace7e91431cc7198910ed48a9d45f8b5330d1 (diff) | |
parent | f6aca1044e2b8ab6d8bad9552355d92a91ca4991 (diff) |
Merge pull request #2713 from secondlife/v-2638
Don't clear big render target if all pixels will be replaced
Diffstat (limited to 'indra/llrender/llrendertarget.h')
-rw-r--r-- | indra/llrender/llrendertarget.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h index cd3290cf66..f066534cf4 100644 --- a/indra/llrender/llrendertarget.h +++ b/indra/llrender/llrendertarget.h @@ -63,6 +63,7 @@ class LLRenderTarget public: // Whether or not to use FBO implementation static bool sUseFBO; + static bool sClearOnInvalidate; static U32 sBytesAllocated; static U32 sCurFBO; static U32 sCurResX; @@ -128,11 +129,17 @@ public: // Asserts that this target is not currently bound in the stack void bindTarget(); - //clear render targer, clears depth buffer if present, + //clear render target, clears depth buffer if present, //uses scissor rect if in copy-to-texture mode // asserts that this target is currently bound void clear(U32 mask = 0xFFFFFFFF); + //same as clear, except may be a no-op depending on configuration + //useful to indicate the buffer is about to be overwritten and we + //don't care about its previous contents + //depending on the GPU, one may be more expensive than the other + void invalidate(U32 mask = 0xFFFFFFFF); + //get applied viewport void getViewport(S32* viewport); |