Fix broken merge and BOOL/bool issues

master
Ansariel 2024-05-10 15:16:06 +02:00
parent 155ddf2336
commit 799ebf2162
23 changed files with 53 additions and 87 deletions

View File

@ -353,29 +353,6 @@ bool LLTriangleRayIntersectTwoSided(const LLVector4a& vert0, const LLVector4a& v
return true;
}
//helper for non-aligned vectors
BOOL LLTriangleRayIntersect(const LLVector3& vert0, const LLVector3& vert1, const LLVector3& vert2, const LLVector3& orig, const LLVector3& dir,
F32& intersection_a, F32& intersection_b, F32& intersection_t, BOOL two_sided)
{
LLVector4a vert0a, vert1a, vert2a, origa, dira;
vert0a.load3(vert0.mV);
vert1a.load3(vert1.mV);
vert2a.load3(vert2.mV);
origa.load3(orig.mV);
dira.load3(dir.mV);
if (two_sided)
{
return LLTriangleRayIntersectTwoSided(vert0a, vert1a, vert2a, origa, dira,
intersection_a, intersection_b, intersection_t);
}
else
{
return LLTriangleRayIntersect(vert0a, vert1a, vert2a, origa, dira,
intersection_a, intersection_b, intersection_t);
}
}
//-------------------------------------------------------------------
// statics
//-------------------------------------------------------------------

View File

@ -120,12 +120,6 @@ public:
// heightmaps cannot currently be described as finite enclosed
// volumes.
// See also LLPanelRegionTerrainInfo::validateMaterials
bool mDoubleSided = false;
// These fields are local to viewer and are a part of local bitmap support
typedef std::map<LLUUID, LLUUID> local_tex_map_t;
local_tex_map_t mTrackingIdToLocalTexture;
public:

View File

@ -188,7 +188,7 @@ bool LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
if (!shader->attachFragmentObject("deferred/globalF.glsl"))
{
return FALSE;
return false;
}
if (features->hasSrgb || features->hasAtmospherics || features->calculatesAtmospherics || features->isDeferred)
@ -280,7 +280,7 @@ bool LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/pbrterrainUtilF.glsl"))
{
return FALSE;
return false;
}
}

View File

@ -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());
}

View File

@ -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)
{

View File

@ -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();

View File

@ -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();

View File

@ -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:

View File

@ -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);

View File

@ -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;
}
}
}

View File

@ -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

View File

@ -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<LLFetchedGLTFMaterial> 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<S32>("RenderLocalLightCount", old_local_light_count);
return TRUE;
return true;
}
void LLGLTFPreviewTexture::postRender(bool success)

View File

@ -41,7 +41,7 @@ public:
static LLPointer<LLGLTFPreviewTexture> create(LLPointer<LLFetchedGLTFMaterial> 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;

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -838,7 +838,7 @@ public:
void remove(std::vector<LLViewerObject*>& 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();

View File

@ -750,7 +750,7 @@ void LLSurfacePatch::updateNormals()
calcNormal<PBR>(grids_per_patch_edge, grids_per_patch_edge - 1, 2);
calcNormal<PBR>(grids_per_patch_edge - 1, grids_per_patch_edge, 2);
calcNormal<PBR>(grids_per_patch_edge - 1, grids_per_patch_edge - 1, 2);
dirty_patch = TRUE;
dirty_patch = true;
}
// update the middle normals

View File

@ -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)

View File

@ -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.

View File

@ -56,7 +56,7 @@ public:
COUNT
};
BOOL generateMaterials();
bool generateMaterials();
void boost();

View File

@ -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();