Merge branch 'master' of https://github.com/FirestormViewer/phoenix-firestorm into jp-translation

master
logue 2025-04-22 22:23:40 +09:00
commit f7e5e77409
8 changed files with 54 additions and 28 deletions

View File

@ -950,11 +950,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>595e7aa51f2161b8d11c3afcc88e2197</string>
<key>hash_algorithm</key>
<string>md5</string>
<string>4a0da36b4a31332df62dadf6438f935e</string>
<key>url</key>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.02.26-windows64-243641704.tar.bz2</string>
<string>file:///c:/cygwin/opt/firestorm/fmodstudio-2.03.07-windows64-251121127.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>

View File

@ -44,9 +44,9 @@
#include "sound_ids.h"
const U32 EXTRA_SOUND_CHANNELS = 10;
constexpr U32 EXTRA_SOUND_CHANNELS = 10;
FMOD_RESULT F_CALLBACK windCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels);
FMOD_RESULT F_CALL windCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels);
FMOD::ChannelGroup *LLAudioEngine_FMODSTUDIO::mChannelGroups[LLAudioEngine::AUDIO_TYPE_COUNT] = {0};
@ -69,13 +69,13 @@ static inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string)
return true;
}
LLUUID FMOD_GUID_to_LLUUID(FMOD_GUID guid)
static LLUUID FMOD_GUID_to_LLUUID(FMOD_GUID guid)
{
return LLUUID(llformat("%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", guid.Data1, guid.Data2, guid.Data3,
guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]));
}
void set_device(FMOD::System* system, const LLUUID& device_uuid)
static void set_device(FMOD::System* system, const LLUUID& device_uuid)
{
LL_INFOS() << "LLAudioEngine_FMODSTUDIO::setDevice with device_uuid=" << device_uuid << LL_ENDL;
@ -113,7 +113,7 @@ void set_device(FMOD::System* system, const LLUUID& device_uuid)
}
}
FMOD_RESULT F_CALLBACK systemCallback(FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK_TYPE type, void *commanddata1, void *commanddata2, void* userdata)
FMOD_RESULT F_CALL systemCallback(FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK_TYPE type, void *commanddata1, void *commanddata2, void* userdata)
{
FMOD::System* sys = (FMOD::System*)system;
LLAudioEngine_FMODSTUDIO* audio_engine = (LLAudioEngine_FMODSTUDIO*)userdata;
@ -881,7 +881,7 @@ void LLAudioChannelFMODSTUDIO::set3DMode(bool use3d)
// not the main thread. May have implications for callees or audio
// engine shutdown.
FMOD_RESULT F_CALLBACK windCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels)
FMOD_RESULT F_CALL windCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int *outchannels)
{
// inbuffer = fmod's original mixbuffer.
// outbuffer = the buffer passed from the previous DSP unit.

View File

@ -1891,42 +1891,36 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
//static
void LLMeshRepoThread::incActiveLODRequests()
{
LLMutexLock lock(gMeshRepo.mThread->mMutex);
++LLMeshRepoThread::sActiveLODRequests;
}
//static
void LLMeshRepoThread::decActiveLODRequests()
{
LLMutexLock lock(gMeshRepo.mThread->mMutex);
--LLMeshRepoThread::sActiveLODRequests;
}
//static
void LLMeshRepoThread::incActiveHeaderRequests()
{
LLMutexLock lock(gMeshRepo.mThread->mMutex);
++LLMeshRepoThread::sActiveHeaderRequests;
}
//static
void LLMeshRepoThread::decActiveHeaderRequests()
{
LLMutexLock lock(gMeshRepo.mThread->mMutex);
--LLMeshRepoThread::sActiveHeaderRequests;
}
//static
void LLMeshRepoThread::incActiveSkinRequests()
{
LLMutexLock lock(gMeshRepo.mThread->mMutex);
++LLMeshRepoThread::sActiveSkinRequests;
}
//static
void LLMeshRepoThread::decActiveSkinRequests()
{
LLMutexLock lock(gMeshRepo.mThread->mMutex);
--LLMeshRepoThread::sActiveSkinRequests;
}
@ -4634,13 +4628,20 @@ void LLMeshRepository::notifyLoadedMeshes()
{
LLMutexTrylock lock1(mMeshMutex);
LLMutexTrylock lock2(mThread->mMutex);
LLMutexTrylock lock3(mThread->mHeaderMutex);
LLMutexTrylock lock4(mThread->mPendingMutex);
static U32 hold_offs(0);
if (! lock1.isLocked() || ! lock2.isLocked())
if (! lock1.isLocked() || ! lock2.isLocked() || ! lock3.isLocked() || ! lock4.isLocked())
{
// If we can't get the locks, skip and pick this up later.
// Eventually thread queue will be free enough
++hold_offs;
sMaxLockHoldoffs = llmax(sMaxLockHoldoffs, hold_offs);
if (hold_offs > 4)
{
LL_WARNS_ONCE() << "High mesh thread holdoff" << LL_ENDL;
}
return;
}
hold_offs = 0;
@ -4701,6 +4702,7 @@ void LLMeshRepository::notifyLoadedMeshes()
if (mPendingRequests.size() > push_count)
{
LL_PROFILE_ZONE_NAMED("Mesh score_map");
// More requests than the high-water limit allows so
// sort and forward the most important.
@ -4751,8 +4753,6 @@ void LLMeshRepository::notifyLoadedMeshes()
std::partial_sort(mPendingRequests.begin(), mPendingRequests.begin() + push_count,
mPendingRequests.end(), PendingRequestBase::CompareScoreGreater());
}
LLMutexTrylock lock3(mThread->mHeaderMutex);
LLMutexTrylock lock4(mThread->mPendingMutex);
while (!mPendingRequests.empty() && push_count > 0)
{
std::unique_ptr<PendingRequestBase>& req_p = mPendingRequests.front();

View File

@ -5430,6 +5430,14 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, bool pick_transp
pick_transparent = true;
}
// <FS:Sek> Pick from center of screen in mouselook
if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK)
{
x = gViewerWindow->getWorldViewRectScaled().getWidth() / 2;
y_from_bot = gViewerWindow->getWorldViewRectScaled().getHeight() / 2;
}
// </FS:Sek>
// shortcut queueing in mPicks and just update mLastPick in place
MASK key_mask = gKeyboard->currentMask(true);
mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, true, false, NULL);

View File

@ -7268,8 +7268,8 @@ const LLUUID& LLVOAvatar::getID() const
//-----------------------------------------------------------------------------
// RN: avatar joints are multi-rooted to include screen-based attachments
//<FS:ND> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
//LLJoint *LLVOAvatar::getJoint( const std::string &name )
LLJoint *LLVOAvatar::getJoint( const JointKey &name )
//LLJoint *LLVOAvatar::getJoint(const std::string &name)
LLJoint *LLVOAvatar::getJoint(const JointKey &name)
// </FS:ND>
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
@ -7370,6 +7370,23 @@ LLJoint *LLVOAvatar::getJoint( S32 joint_num )
return pJoint;
}
void LLVOAvatar::initAllJoints()
{
getJointAliases();
// <FS:Ansariel> Lookup performance changes
//for (auto& alias : mJointAliasMap)
//{
// mJointMap[alias.first] = mRoot->findJoint(alias.second);
// mJointMap[JointKey::construct(alias.first).mKey] = mRoot->findJoint(alias.second);
//}
for (const auto& alias : mJointAliasMap)
{
mJointMap[JointKey::construct(alias.first).mKey] = mRoot->findJoint(alias.second);
}
// </FS:Ansariel>
// ignore mScreen and mRoot
}
//-----------------------------------------------------------------------------
// getRiggedMeshID
//

View File

@ -205,11 +205,12 @@ public:
void dumpAnimationState();
//<FS:ND> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
//virtual LLJoint* getJoint( const std::string &name );
virtual LLJoint* getJoint( const JointKey &name );
LLJoint* getJoint( const std::string &name ) { return getJoint( JointKey::construct( name ) ); }
//virtual LLJoint* getJoint(const std::string &name);
virtual LLJoint* getJoint(const JointKey& name);
LLJoint* getJoint(const std::string& name) { return getJoint(JointKey::construct(name)); }
// </FS:ND>
LLJoint* getJoint(S32 num);
void initAllJoints();
//if you KNOW joint_num is a valid animated joint index, use getSkeletonJoint for efficiency
inline LLJoint* getSkeletonJoint(S32 joint_num) { return mSkeleton[joint_num]; }

View File

@ -272,6 +272,8 @@ void LLVOAvatarSelf::initInstance()
doPeriodically(check_for_unsupported_baked_appearance, 120.0);
doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0);
initAllJoints(); // mesh thread uses LLVOAvatarSelf as a joint source
mInitFlags |= 1<<2;
}
@ -1028,8 +1030,8 @@ void LLVOAvatarSelf::idleUpdate(LLAgent &agent, const F64 &time)
// virtual
//<FS:ND> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
//LLJoint *LLVOAvatarSelf::getJoint( const std::string &name )
LLJoint *LLVOAvatarSelf::getJoint( const JointKey &name )
//LLJoint *LLVOAvatarSelf::getJoint(const std::string &name)
LLJoint *LLVOAvatarSelf::getJoint(const JointKey& name)
// </FS:ND>
{
std::lock_guard lock(mJointMapMutex);

View File

@ -92,8 +92,8 @@ public:
/*virtual*/ void requestStopMotion(LLMotion* motion);
//<FS:ND> Query by JointKey rather than just a string, the key can be a U32 index for faster lookup
// /*virtual*/ LLJoint* getJoint( const std::string &name );
/*virtual*/ LLJoint* getJoint( const JointKey &name );
// /*virtual*/ LLJoint* getJoint(const std::string &name);
/*virtual*/ LLJoint* getJoint(const JointKey& name);
// </FS:ND>
/*virtual*/ void renderJoints();