summaryrefslogtreecommitdiff
path: root/indra/llrender/llrendertarget.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-01-09 18:12:54 -0600
committerDave Parks <davep@lindenlab.com>2023-01-09 18:12:54 -0600
commita2d17d3c1e5a62f10ab3922b6b12f909f1cd4682 (patch)
tree1010a8f928b2e25bd06cff12b83c9b8be39cd9b0 /indra/llrender/llrendertarget.h
parenta710bf9067bd4c4217b9febc0ad277a1636ec882 (diff)
SL-18869 Optimizations -- Decruftify LLRenderTarget, use a shader to copy color/depth instead of glCopyTexSubImage or glBlitFrameBuffer
Diffstat (limited to 'indra/llrender/llrendertarget.h')
-rw-r--r--indra/llrender/llrendertarget.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index 584f224dca..5f3214add3 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -73,7 +73,7 @@ public:
//allocate resources for rendering
//must be called before use
//multiple calls will release previously allocated resources
- bool allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = false, S32 samples = 0);
+ bool allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool sample_depth, LLTexUnit::eTextureType usage = LLTexUnit::TT_TEXTURE, bool use_fbo = false, S32 samples = 0);
//resize existing attachments to use new resolution and color format
// CAUTION: if the GL runs out of memory attempting to resize, this render target will be undefined
@@ -136,7 +136,7 @@ public:
U32 getNumTextures() const;
U32 getDepth(void) const { return mDepth; }
- bool hasStencil() const { return mStencil; }
+ bool canSampleDepth() const { return mSampleDepth; }
void bindTexture(U32 index, S32 channel, LLTexUnit::eTextureFilterOptions filter_options = LLTexUnit::TFO_BILINEAR);
@@ -148,12 +148,6 @@ public:
// the current depth texture. A depth texture will be allocated if needed.
void flush(bool fetch_depth = FALSE);
- void copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, S32 srcX1, S32 srcY1,
- S32 dstX0, S32 dstY0, S32 dstX1, S32 dstY1, U32 mask, U32 filter);
-
- static void copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0, S32 srcY0, S32 srcX1, S32 srcY1,
- S32 dstX0, S32 dstY0, S32 dstX1, S32 dstY1, U32 mask, U32 filter);
-
//Returns TRUE if target is ready to be rendered into.
//That is, if the target has been allocated with at least
//one renderable attachment (i.e. color buffer, depth buffer).
@@ -172,9 +166,9 @@ protected:
U32 mPreviousResY;
U32 mDepth;
- bool mStencil;
- bool mUseDepth;
- bool mRenderDepth;
+ bool mUseDepth;
+ bool mSampleDepth;
+
LLTexUnit::eTextureType mUsage;
static LLRenderTarget* sBoundTarget;