diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2023-04-28 13:21:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-28 13:21:33 -0700 |
commit | 04604a921d35cf877073828f98a05ae83d03c96e (patch) | |
tree | 4db7ff4d02556bdbdc9df18629a14a8fcc67bd4d /indra/newview/lldrawpool.cpp | |
parent | 01565d122a371820f4287dec3b1a52a5f4d342ea (diff) | |
parent | 0fedb22d77bc67cd5c619537d985b905fe57e385 (diff) |
Merge pull request #196 from secondlife/SL-19644
SL-19644: Move GLTF transform reset out of pushBatch
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r-- | indra/newview/lldrawpool.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index edabb55cc3..34d8f8b9ce 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -444,7 +444,7 @@ void LLRenderPass::renderRiggedGroup(LLSpatialGroup* group, U32 type, bool textu } } -void LLRenderPass::pushBatches(U32 type, bool texture, bool batch_textures, bool reset_gltf) +void LLRenderPass::pushBatches(U32 type, bool texture, bool batch_textures) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; std::unique_ptr<LLPerfStats::RecordAttachmentTime> ratPtr{}; @@ -465,11 +465,11 @@ void LLRenderPass::pushBatches(U32 type, bool texture, bool batch_textures, bool } } #endif - pushBatch(*pparams, texture, batch_textures, reset_gltf); + pushBatch(*pparams, texture, batch_textures); } } -void LLRenderPass::pushRiggedBatches(U32 type, bool texture, bool batch_textures, bool reset_gltf) +void LLRenderPass::pushRiggedBatches(U32 type, bool texture, bool batch_textures) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; LLVOAvatar* lastAvatar = nullptr; @@ -500,12 +500,11 @@ void LLRenderPass::pushRiggedBatches(U32 type, bool texture, bool batch_textures lastMeshId = pparams->mSkinInfo->mHash; } - pushBatch(*pparams, texture, batch_textures, reset_gltf); - reset_gltf = false; + pushBatch(*pparams, texture, batch_textures); } } -void LLRenderPass::pushMaskBatches(U32 type, bool texture, bool batch_textures, bool reset_gltf) +void LLRenderPass::pushMaskBatches(U32 type, bool texture, bool batch_textures) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; std::unique_ptr<LLPerfStats::RecordAttachmentTime> ratPtr{}; @@ -526,12 +525,11 @@ void LLRenderPass::pushMaskBatches(U32 type, bool texture, bool batch_textures, } #endif LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff); - pushBatch(*pparams, texture, batch_textures, reset_gltf); - reset_gltf = false; + pushBatch(*pparams, texture, batch_textures); } } -void LLRenderPass::pushRiggedMaskBatches(U32 type, bool texture, bool batch_textures, bool reset_gltf) +void LLRenderPass::pushRiggedMaskBatches(U32 type, bool texture, bool batch_textures) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; LLVOAvatar* lastAvatar = nullptr; @@ -573,8 +571,7 @@ void LLRenderPass::pushRiggedMaskBatches(U32 type, bool texture, bool batch_text lastMeshId = pparams->mSkinInfo->mHash; } - pushBatch(*pparams, texture, batch_textures, reset_gltf); - reset_gltf = false; + pushBatch(*pparams, texture, batch_textures); } } @@ -593,14 +590,7 @@ void LLRenderPass::applyModelMatrix(const LLDrawInfo& params) } } -void LLRenderPass::resetGLTFTextureTransform() -{ - F32 ignore_gltf_transform[8]; - LLGLTFMaterial::sDefault.mTextureTransform[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR].getPacked(ignore_gltf_transform); - LLGLSLShader::sCurBoundShaderPtr->uniform4fv(LLShaderMgr::TEXTURE_BASE_COLOR_TRANSFORM, 2, (F32*)ignore_gltf_transform); -} - -void LLRenderPass::pushBatch(LLDrawInfo& params, bool texture, bool batch_textures, bool reset_gltf) +void LLRenderPass::pushBatch(LLDrawInfo& params, bool texture, bool batch_textures) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; if (!params.mCount) @@ -609,7 +599,6 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, bool texture, bool batch_textur } applyModelMatrix(params); - if (reset_gltf) { resetGLTFTextureTransform(); } bool tex_setup = false; |