From 799ebf21624edb8b42ca16b8cf51c138643efd32 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 10 May 2024 15:16:06 +0200 Subject: Fix broken merge and BOOL/bool issues --- indra/newview/gltf/asset.cpp | 2 +- indra/newview/gltfscenemanager.cpp | 14 +++++++------- indra/newview/gltfscenemanager.h | 10 +++++----- indra/newview/lldrawpoolterrain.cpp | 6 +++--- indra/newview/lldrawpoolterrain.h | 2 +- indra/newview/lldynamictexture.cpp | 2 +- indra/newview/llenvironment.cpp | 4 ++-- indra/newview/llfloaterregioninfo.cpp | 2 +- indra/newview/llgltfmaterialpreviewmgr.cpp | 12 ++++++------ indra/newview/llgltfmaterialpreviewmgr.h | 2 +- indra/newview/llmaniprotate.cpp | 4 ++-- indra/newview/llmaniptranslate.cpp | 11 +++-------- indra/newview/llreflectionmapmanager.cpp | 4 ++-- indra/newview/llselectmgr.cpp | 4 ++-- indra/newview/llselectmgr.h | 2 +- indra/newview/llsurfacepatch.cpp | 2 +- indra/newview/llviewercamera.cpp | 2 +- indra/newview/llvlcomposition.cpp | 16 ++++++++-------- indra/newview/llvlcomposition.h | 2 +- indra/newview/pipeline.cpp | 4 ++-- 20 files changed, 51 insertions(+), 56 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index 42f064699c..5f2217a075 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -1092,7 +1092,7 @@ void Skin::uploadMatrixPalette(Asset& asset, Node& node) LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX, mJoints.size(), - FALSE, + GL_FALSE, (GLfloat*)glmp.data()); } diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp index 6533f283e2..8bbcef1594 100644 --- a/indra/newview/gltfscenemanager.cpp +++ b/indra/newview/gltfscenemanager.cpp @@ -259,7 +259,7 @@ LLMatrix4a inverse(const LLMatrix4a& mat) return ret; } -bool GLTFSceneManager::lineSegmentIntersect(LLVOVolume* obj, Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32* node_hit, S32* primitive_hit, +bool GLTFSceneManager::lineSegmentIntersect(LLVOVolume* obj, Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32* node_hit, S32* primitive_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { @@ -353,10 +353,10 @@ bool GLTFSceneManager::lineSegmentIntersect(LLVOVolume* obj, Asset* asset, const } LLDrawable* GLTFSceneManager::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* node_hit, // return the index of the node that was hit S32* primitive_hit, // return the index of the primitive that was hit LLVector4a* intersection, // return the intersection point @@ -539,7 +539,7 @@ void GLTFSceneManager::renderDebug() for (U32 i = 0; i < 2; ++i) { LLGLDepthTest depth(GL_TRUE, i == 0 ? GL_FALSE : GL_TRUE, i == 0 ? GL_GREATER : GL_LEQUAL); - LLGLState blend(GL_BLEND, i == 0 ? TRUE : FALSE); + LLGLState blend(GL_BLEND, i == 0 ? GL_TRUE : GL_FALSE); gGL.pushMatrix(); @@ -614,7 +614,7 @@ void GLTFSceneManager::renderDebug() S32 primitive_hit = -1; LLVector4a intersection; - LLDrawable* drawable = lineSegmentIntersect(gDebugRaycastStart, gDebugRaycastEnd, TRUE, TRUE, TRUE, TRUE, &node_hit, &primitive_hit, &intersection, nullptr, nullptr, nullptr); + LLDrawable* drawable = lineSegmentIntersect(gDebugRaycastStart, gDebugRaycastEnd, true, true, true, true, &node_hit, &primitive_hit, &intersection, nullptr, nullptr, nullptr); if (drawable) { diff --git a/indra/newview/gltfscenemanager.h b/indra/newview/gltfscenemanager.h index e380be7e3c..8f29f34c30 100644 --- a/indra/newview/gltfscenemanager.h +++ b/indra/newview/gltfscenemanager.h @@ -61,10 +61,10 @@ namespace LL void renderAlpha(); LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* node_hit, // return the index of the node that was hit S32* primitive_hit, // return the index of the primitive that was hit LLVector4a* intersection, // return the intersection point @@ -72,7 +72,7 @@ namespace LL LLVector4a* normal, // return the surface normal at the intersection point LLVector4a* tangent); // return the surface tangent at the intersection point - bool lineSegmentIntersect(LLVOVolume* obj, GLTF::Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32* face_hitp, S32* primitive_hitp, + bool lineSegmentIntersect(LLVOVolume* obj, GLTF::Asset* asset, const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32* face_hitp, S32* primitive_hitp, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent); void renderDebug(); diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index c5932a6ad9..c2caefa210 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -202,11 +202,11 @@ void LLDrawPoolTerrain::drawLoop() void LLDrawPoolTerrain::renderFullShader() { - const BOOL use_local_materials = gLocalTerrainMaterials.materialsReady(true, false); + const bool use_local_materials = gLocalTerrainMaterials.materialsReady(true, false); // Hack! Get the region that this draw pool is rendering from! LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion(); LLVLComposition *compp = regionp->getComposition(); - const BOOL use_textures = !use_local_materials && (compp->getMaterialType() == LLTerrainMaterials::Type::TEXTURE); + const bool use_textures = !use_local_materials && (compp->getMaterialType() == LLTerrainMaterials::Type::TEXTURE); if (use_textures) { @@ -325,7 +325,7 @@ void LLDrawPoolTerrain::renderFullShaderTextures() } // *TODO: Investigate use of bindFast for PBR terrain textures -void LLDrawPoolTerrain::renderFullShaderPBR(BOOL local_materials) +void LLDrawPoolTerrain::renderFullShaderPBR(bool local_materials) { // Hack! Get the region that this draw pool is rendering from! LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion(); diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h index 13f031c8e7..d0de68d718 100644 --- a/indra/newview/lldrawpoolterrain.h +++ b/indra/newview/lldrawpoolterrain.h @@ -80,7 +80,7 @@ protected: void renderFull4TU(); void renderFullShader(); void renderFullShaderTextures(); - void renderFullShaderPBR(BOOL local_materials = false); + void renderFullShaderPBR(bool local_materials = false); void drawLoop(); private: diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 744c55d64a..407256bea2 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -196,7 +196,7 @@ bool LLViewerDynamicTexture::updateAllInstances() if (!bake_target.isComplete()) { llassert(false); - return FALSE; + return false; } llassert(bake_target.getWidth() >= LLPipeline::MAX_BAKE_WIDTH); llassert(bake_target.getHeight() >= LLPipeline::MAX_BAKE_WIDTH); diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index cd766aba59..a3dc0a36c9 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1684,10 +1684,10 @@ void LLEnvironment::update(const LLViewerCamera * cam) && (gPipeline.canUseWindLightShaders() || shaders_iter->mShaderGroup == LLGLSLShader::SG_WATER)) { - shaders_iter->mUniformsDirty = TRUE; + shaders_iter->mUniformsDirty = true; if (shaders_iter->mRiggedVariant) { - shaders_iter->mRiggedVariant->mUniformsDirty = TRUE; + shaders_iter->mRiggedVariant->mUniformsDirty = true; } } } diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 780f4451cb..728c4fde18 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1747,7 +1747,7 @@ bool LLPanelRegionTerrainInfo::sendUpdate() // Prevent applying unsupported alpha blend/double-sided materials if (!validateMaterials()) { - return FALSE; + return false; } // Check if terrain Elevation Ranges are correct diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp index 84dd081a0a..41d5fe5582 100644 --- a/indra/newview/llgltfmaterialpreviewmgr.cpp +++ b/indra/newview/llgltfmaterialpreviewmgr.cpp @@ -118,7 +118,7 @@ namespace } else { - img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } } if (img) @@ -185,7 +185,7 @@ namespace }; // namespace LLGLTFPreviewTexture::LLGLTFPreviewTexture(LLPointer material, S32 width) - : LLViewerDynamicTexture(width, width, 4, EOrder::ORDER_MIDDLE, FALSE) + : LLViewerDynamicTexture(width, width, 4, EOrder::ORDER_MIDDLE, false) , mGLTFMaterial(material) { } @@ -393,7 +393,7 @@ void fixup_shader_constants(LLGLSLShader& shader) const S32 channel = shader.getTextureChannel(LLShaderMgr::DEFERRED_SHADOW0+i); if (channel != -1) { - gGL.getTexUnit(channel)->bind(LLViewerFetchedTexture::sWhiteImagep, TRUE); + gGL.getTexUnit(channel)->bind(LLViewerFetchedTexture::sWhiteImagep, true); } } } @@ -423,7 +423,7 @@ bool LLGLTFPreviewTexture::render() { LL_PROFILE_ZONE_SCOPED_CATEGORY_UI; - if (!mShouldRender) { return FALSE; } + if (!mShouldRender) { return false; } glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -464,7 +464,7 @@ bool LLGLTFPreviewTexture::render() camera.lookAt(origin, object_position); camera.setAspect(mFullHeight / mFullWidth); const LLRect texture_rect(0, mFullHeight, mFullWidth, 0); - camera.setPerspective(NOT_FOR_SELECTION, texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight(), FALSE, camera.getNear(), MAX_FAR_CLIP*2.f); + camera.setPerspective(NOT_FOR_SELECTION, texture_rect.mLeft, texture_rect.mBottom, texture_rect.getWidth(), texture_rect.getHeight(), false, camera.getNear(), MAX_FAR_CLIP*2.f); // Generate sphere object on-the-fly. Discard afterwards. (Vertex buffer is // discarded, but the sphere should be cached in LLVolumeMgr.) @@ -554,7 +554,7 @@ bool LLGLTFPreviewTexture::render() gPipeline.mReflectionMapManager.forceDefaultProbeAndUpdateUniforms(false); gSavedSettings.set("RenderLocalLightCount", old_local_light_count); - return TRUE; + return true; } void LLGLTFPreviewTexture::postRender(bool success) diff --git a/indra/newview/llgltfmaterialpreviewmgr.h b/indra/newview/llgltfmaterialpreviewmgr.h index 80f09ece88..f320886157 100644 --- a/indra/newview/llgltfmaterialpreviewmgr.h +++ b/indra/newview/llgltfmaterialpreviewmgr.h @@ -41,7 +41,7 @@ public: static LLPointer create(LLPointer material); bool needsRender() override; - void preRender(bool clear_depth = TRUE) override; + void preRender(bool clear_depth = true) override; bool render() override; void postRender(bool success) override; diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index f95eed44b6..eac1f753b0 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -554,8 +554,8 @@ void LLManipRotate::drag( S32 x, S32 y ) mRotation = dragConstrained(x, y); } - BOOL damped = mSmoothRotate; - mSmoothRotate = FALSE; + bool damped = mSmoothRotate; + mSmoothRotate = false; bool gltf_mode = false; for (LLObjectSelection::iterator iter = mObjectSelection->begin(); diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 9bfe48772a..02f67fe829 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -712,7 +712,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (selectNode->mIndividualSelection) { // counter-translate child objects if we are moving the root as an individual - object->resetChildrenPosition(old_position_local - new_position_local, TRUE); + object->resetChildrenPosition(old_position_local - new_position_local, true); } } else @@ -759,14 +759,14 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) LLViewerObject* root_object = object->getRootEdit(); new_position_agent -= root_object->getPositionAgent(); new_position_agent = new_position_agent * ~root_object->getRotation(); - object->setPositionParent(new_position_agent, FALSE); + object->setPositionParent(new_position_agent, false); rebuild(object); } if (selectNode->mIndividualSelection) { // counter-translate child objects if we are moving the root as an individual - object->resetChildrenPosition(old_position_agent - new_position_agent, TRUE); + object->resetChildrenPosition(old_position_agent - new_position_agent, true); } } selectNode->mLastPositionLocal = object->getPosition(); @@ -1738,11 +1738,6 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal, shader->bind(); } - if (shader) - { - shader->bind(); - } - //draw volume/plane intersections { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 1762d7d5c1..2c01495934 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -73,8 +73,8 @@ void load_exr(const std::string& filename) LLImageGL::generateTextures(1, &texName); gEXRImage = new LLImageGL(texName, 4, GL_TEXTURE_2D, GL_RGB16F, GL_RGB16F, GL_FLOAT, LLTexUnit::TAM_CLAMP); - gEXRImage->setHasMipMaps(TRUE); - gEXRImage->setUseMipMaps(TRUE); + gEXRImage->setHasMipMaps(true); + gEXRImage->setUseMipMaps(true); gEXRImage->setFilteringOption(LLTexUnit::TFO_TRILINEAR); gGL.getTexUnit(0)->bind(gEXRImage); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 546dd0c6b2..a885e6b45e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -481,7 +481,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3 // Place it in the list and tag it. // This will refresh dialogs. - addAsIndividual(object, face, TRUE, gltf_node, gltf_primitive); + addAsIndividual(object, face, true, gltf_node, gltf_primitive); // Stop the object from moving (this anticipates changes on the // simulator in LLTask::userSelect) @@ -1083,7 +1083,7 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, bool undoab // Handle glTF node selection if (gltf_node >= 0) { - nodep->selectGLTFNode(gltf_node, gltf_primitive, TRUE); + nodep->selectGLTFNode(gltf_node, gltf_primitive, true); } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 7e6c239e89..de57db78cc 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -838,7 +838,7 @@ public: void remove(std::vector& objects); void remove(LLViewerObject* object, S32 te = SELECT_ALL_TES, bool undoable = true); void removeAll(); - void addAsIndividual(LLViewerObject* object, S32 te = SELECT_ALL_TES, bool undoable = TRUE, S32 gltf_node = -1, S32 gltf_primitive = -1); + void addAsIndividual(LLViewerObject* object, S32 te = SELECT_ALL_TES, bool undoable = true, S32 gltf_node = -1, S32 gltf_primitive = -1); void promoteSelectionToRoot(); void demoteSelectionToIndividuals(); diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 9703e2ae27..f58df95365 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -750,7 +750,7 @@ void LLSurfacePatch::updateNormals() calcNormal(grids_per_patch_edge, grids_per_patch_edge - 1, 2); calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge, 2); calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge - 1, 2); - dirty_patch = TRUE; + dirty_patch = true; } // update the middle normals diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index f54b6f799e..cd7012dc6a 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -767,7 +767,7 @@ bool LLViewerCamera::cameraUnderWater() const if (gPipeline.mHeroProbeManager.isMirrorPass()) { // TODO: figure out how to handle this case - return FALSE; + return false; } if (!regionp) diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index dc97beac93..314582c395 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -115,19 +115,19 @@ LLTerrainMaterials::~LLTerrainMaterials() unboost(); } -BOOL LLTerrainMaterials::generateMaterials() +bool LLTerrainMaterials::generateMaterials() { if (texturesReady(true, true)) { - return TRUE; + return true; } if (materialsReady(true, true)) { - return TRUE; + return true; } - return FALSE; + return false; } void LLTerrainMaterials::boost() @@ -639,11 +639,11 @@ bool LLVLComposition::generateMinimapTileLand(const F32 x, const F32 y, const bool use_textures = getMaterialType() != LLTerrainMaterials::Type::PBR; if (use_textures) { - if (!texturesReady(true, true)) { return FALSE; } + if (!texturesReady(true, true)) { return false; } } else { - if (!materialsReady(true, true)) { return FALSE; } + if (!materialsReady(true, true)) { return false; } } for (S32 i = 0; i < ASSET_COUNT; i++) @@ -688,8 +688,8 @@ bool LLVLComposition::generateMinimapTileLand(const F32 x, const F32 y, bool delete_raw_post = false; bool delete_raw_post_emissive = false; - if (!prepare_raw_image(mRawImagesBaseColor[i], false, tex, delete_raw_post)) { return FALSE; } - if (tex_emissive && !prepare_raw_image(mRawImagesEmissive[i], true, tex_emissive, delete_raw_post_emissive)) { return FALSE; } + if (!prepare_raw_image(mRawImagesBaseColor[i], false, tex, delete_raw_post)) { return false; } + if (tex_emissive && !prepare_raw_image(mRawImagesEmissive[i], true, tex_emissive, delete_raw_post_emissive)) { return false; } // tex_emissive can be null, and then will be ignored // In the simplest case, the minimap image is just the base color. diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h index cde0e216c3..4ca44d25d4 100644 --- a/indra/newview/llvlcomposition.h +++ b/indra/newview/llvlcomposition.h @@ -56,7 +56,7 @@ public: COUNT }; - BOOL generateMaterials(); + bool generateMaterials(); void boost(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 42e74c05ed..66797cd127 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -782,7 +782,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) if (sReflectionProbesEnabled) { - gCubeSnapshot = TRUE; + gCubeSnapshot = true; mReflectionMapManager.initReflectionMaps(); } @@ -1070,7 +1070,7 @@ void LLPipeline::refreshCachedSettings() RenderScreenSpaceReflectionAdaptiveStepMultiplier = gSavedSettings.getF32("RenderScreenSpaceReflectionAdaptiveStepMultiplier"); RenderScreenSpaceReflectionGlossySamples = gSavedSettings.getS32("RenderScreenSpaceReflectionGlossySamples"); RenderBufferVisualization = gSavedSettings.getS32("RenderBufferVisualization"); - if (gSavedSettings.getBOOL("RenderMirrors") != (BOOL)RenderMirrors) + if (gSavedSettings.getBOOL("RenderMirrors") != RenderMirrors) { RenderMirrors = gSavedSettings.getBOOL("RenderMirrors"); LLViewerShaderMgr::instance()->clearShaderCache(); -- cgit v1.2.3