diff options
| author | McGroarty <git@mcgroarty.me> | 2026-07-26 18:53:19 -0700 |
|---|---|---|
| committer | McGroarty <git@mcgroarty.me> | 2026-07-26 18:53:19 -0700 |
| commit | d1796fba2500a30bd3c71b0588efd18c1a8625bf (patch) | |
| tree | 8afbd36410330fbb391cc9f6936d67d06215f048 /indra/llrender/llrender.cpp | |
| parent | adc5f3cb7819a672c37a73f0c4cd850df536e9da (diff) | |
Fix rendering on Parallels VMs with graphics set to "low"
In LLRender::syncMatrices(), treat uniform location 0 as valid when uploading the inverse model-view, inverse projection, and identity matrices. Only location -1 indicates that a uniform is absent. (This is a zero-based index.)
Fix Parallels GLSL compilation by:
- renaming the local waterClip() wrapper to avoid an overload conflict
- returning float literals (not ints) from a few functions declared to return float
Diffstat (limited to 'indra/llrender/llrender.cpp')
| -rw-r--r-- | indra/llrender/llrender.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 57be8570af..0a9aa462d1 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -1043,7 +1043,7 @@ void LLRender::syncMatrices() shader->uniformMatrix3fv(LLShaderMgr::NORMAL_MATRIX, 1, GL_FALSE, norm_mat); } - if (shader->getUniformLocation(LLShaderMgr::INVERSE_MODELVIEW_MATRIX)) + if (shader->getUniformLocation(LLShaderMgr::INVERSE_MODELVIEW_MATRIX) >= 0) { shader->uniformMatrix4fv(LLShaderMgr::INVERSE_MODELVIEW_MATRIX, 1, GL_FALSE, glm::value_ptr(cached_inv_mdv)); } @@ -1075,14 +1075,14 @@ void LLRender::syncMatrices() // GZ: This was previously disabled seemingly due to a bug involving the deferred renderer's regular pushing and popping of mats. // We're reenabling this and cleaning up the code around that - that would've been the appropriate course initially. // Anything beyond the standard proj and inv proj mats are special cases. Please setup special uniforms accordingly in the future. - if (shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX)) + if (shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX) >= 0) { glm::mat4 inv_proj = glm::inverse(mat); shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, false, glm::value_ptr(inv_proj)); } // Used by some full screen effects - such as full screen lights, glow, etc. - if (shader->getUniformLocation(LLShaderMgr::IDENTITY_MATRIX)) + if (shader->getUniformLocation(LLShaderMgr::IDENTITY_MATRIX) >= 0) { shader->uniformMatrix4fv(LLShaderMgr::IDENTITY_MATRIX, 1, GL_FALSE, glm::value_ptr(glm::identity<glm::mat4>())); } |
