From e72ecda4e58958f24bcbb9ce12276dbde26829ba Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 31 Oct 2023 16:06:51 -0500
Subject: [PATCH] SL-19592 Fix for PBR alpha HUDs sometimes using wrong texture
 on OSX

---
 indra/newview/llfetchedgltfmaterial.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index 1fb3577dd74..fc9d42bfb6a 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -83,11 +83,11 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
 
     if (baseColorTex != nullptr)
     {
-        gGL.getTexUnit(0)->bindFast(baseColorTex);
+        shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, baseColorTex);
     }
     else
     {
-        gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sWhiteImagep);
+        shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, LLViewerFetchedTexture::sWhiteImagep);
     }
 
     F32 base_color_packed[8];
-- 
GitLab