Merge remote-tracking branch 'remotes/origin/master' into Texture_Cleanup
# Conflicts: # src/polyrenderer/poly_renderthread.cpp # src/swrenderer/r_renderthread.cpp
This commit is contained in:
commit
91a8f5cd04
17 changed files with 126 additions and 59 deletions
|
|
@ -121,9 +121,9 @@ template<class T, int fill = 1> void ArrayResize(T *self, int amount)
|
|||
}
|
||||
}
|
||||
|
||||
template<class T> void ArrayReserve(T *self, int amount)
|
||||
template<class T> unsigned int ArrayReserve(T *self, int amount)
|
||||
{
|
||||
self->Reserve(amount);
|
||||
return self->Reserve(amount);
|
||||
}
|
||||
|
||||
template<class T> int ArrayMax(T *self)
|
||||
|
|
|
|||
|
|
@ -543,6 +543,8 @@ void JitCompiler::EmitNativeCall(VMNativeFunction *target)
|
|||
ParamOpcodes.Clear();
|
||||
}
|
||||
|
||||
static std::map<FString, std::unique_ptr<TArray<uint8_t>>> argsCache;
|
||||
|
||||
asmjit::FuncSignature JitCompiler::CreateFuncSignature()
|
||||
{
|
||||
using namespace asmjit;
|
||||
|
|
@ -657,7 +659,6 @@ asmjit::FuncSignature JitCompiler::CreateFuncSignature()
|
|||
}
|
||||
|
||||
// FuncSignature only keeps a pointer to its args array. Store a copy of each args array variant.
|
||||
static std::map<FString, std::unique_ptr<TArray<uint8_t>>> argsCache;
|
||||
std::unique_ptr<TArray<uint8_t>> &cachedArgs = argsCache[key];
|
||||
if (!cachedArgs) cachedArgs.reset(new TArray<uint8_t>(args));
|
||||
|
||||
|
|
|
|||
|
|
@ -169,16 +169,28 @@ void JitCompiler::EmitRET()
|
|||
if (cc.is64Bit())
|
||||
{
|
||||
if (regtype & REGT_KONST)
|
||||
cc.mov(x86::qword_ptr(location), asmjit::imm_ptr(konsta[regnum].v));
|
||||
{
|
||||
auto ptr = newTempIntPtr();
|
||||
cc.mov(ptr, asmjit::imm_ptr(konsta[regnum].v));
|
||||
cc.mov(x86::qword_ptr(location), ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
cc.mov(x86::qword_ptr(location), regA[regnum]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (regtype & REGT_KONST)
|
||||
cc.mov(x86::dword_ptr(location), asmjit::imm_ptr(konsta[regnum].v));
|
||||
{
|
||||
auto ptr = newTempIntPtr();
|
||||
cc.mov(ptr, asmjit::imm_ptr(konsta[regnum].v));
|
||||
cc.mov(x86::dword_ptr(location), ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
cc.mov(x86::dword_ptr(location), regA[regnum]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2451,7 +2451,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, GetAutomapPosition, GetAutomapPositi
|
|||
ACTION_RETURN_VEC2(AM_GetPosition());
|
||||
}
|
||||
|
||||
static int ZGetUDMFInt(int type, int index, int key)
|
||||
static int ZGetUDMFInt(FLevelLocals *self, int type, int index, int key)
|
||||
{
|
||||
return GetUDMFInt(type, index, ENamedName(key));
|
||||
}
|
||||
|
|
@ -2465,7 +2465,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, GetUDMFInt, ZGetUDMFInt)
|
|||
ACTION_RETURN_INT(GetUDMFInt(type, index, key));
|
||||
}
|
||||
|
||||
static double ZGetUDMFFloat(int type, int index, int key)
|
||||
static double ZGetUDMFFloat(FLevelLocals *self, int type, int index, int key)
|
||||
{
|
||||
return GetUDMFFloat(type, index, ENamedName(key));
|
||||
}
|
||||
|
|
@ -2479,7 +2479,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, GetUDMFFloat, ZGetUDMFFloat)
|
|||
ACTION_RETURN_FLOAT(GetUDMFFloat(type, index, key));
|
||||
}
|
||||
|
||||
static void ZGetUDMFString(int type, int index, int key, FString *result)
|
||||
static void ZGetUDMFString(FLevelLocals *self, int type, int index, int key, FString *result)
|
||||
{
|
||||
*result = GetUDMFString(type, index, ENamedName(key));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,12 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, GetPointer, COPY_AAPTR)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StopSound, S_StopSound)
|
||||
static void NativeStopSound(AActor *actor, int slot)
|
||||
{
|
||||
S_StopSound(actor, slot);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(AActor, A_StopSound, NativeStopSound)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT(slot);
|
||||
|
|
@ -475,7 +480,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, Vec2To, Vec2To)
|
|||
ACTION_RETURN_VEC2(self->Vec2To(t));
|
||||
}
|
||||
|
||||
static void Vec3Angle(AActor *self, double length, double angle, double z, bool absolute, DVector2 *result)
|
||||
static void Vec3Angle(AActor *self, double length, double angle, double z, bool absolute, DVector3 *result)
|
||||
{
|
||||
*result = self->Vec3Angle(length, angle, z, absolute);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue