compile clang with -fno-strict-overflow
This commit is contained in:
parent
926cfb5cce
commit
a856376a90
@ -610,9 +610,9 @@ i32 W32_Main(void)
|
|||||||
cmdline_str = StringFromWstrNoLimit(perm, cmdline_wstr);
|
cmdline_str = StringFromWstrNoLimit(perm, cmdline_wstr);
|
||||||
i32 argc = 0;
|
i32 argc = 0;
|
||||||
LPWSTR *argv = CommandLineToArgvW(cmdline_wstr, &argc);
|
LPWSTR *argv = CommandLineToArgvW(cmdline_wstr, &argc);
|
||||||
for (i32 i = 0; i < argc; ++i)
|
for (i32 arg_idx = 0; arg_idx < argc; ++arg_idx)
|
||||||
{
|
{
|
||||||
wchar_t *arg_wstr = argv[i];
|
wchar_t *arg_wstr = argv[arg_idx];
|
||||||
String arg = StringFromWstrNoLimit(perm, arg_wstr);
|
String arg = StringFromWstrNoLimit(perm, arg_wstr);
|
||||||
PushStringToList(perm, &args_list, arg);
|
PushStringToList(perm, &args_list, arg);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,6 @@ void G_Bootstrap(void)
|
|||||||
TempArena scratch = BeginScratchNoConflict();
|
TempArena scratch = BeginScratchNoConflict();
|
||||||
Arena *perm = PermArena();
|
Arena *perm = PermArena();
|
||||||
|
|
||||||
// NOTE: Nsight seems to have trouble attaching when independent devices are enabled
|
|
||||||
G_D12.validation_layer_enabled = CommandlineArgFromName(Lit("gpu-debug-validation")).exists;
|
G_D12.validation_layer_enabled = CommandlineArgFromName(Lit("gpu-debug-validation")).exists;
|
||||||
G_D12.debug_layer_enabled = G_D12.validation_layer_enabled || CommandlineArgFromName(Lit("gpu-debug")).exists;
|
G_D12.debug_layer_enabled = G_D12.validation_layer_enabled || CommandlineArgFromName(Lit("gpu-debug")).exists;
|
||||||
|
|
||||||
@ -45,6 +44,7 @@ void G_Bootstrap(void)
|
|||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- Enable independent devices
|
//- Enable independent devices
|
||||||
|
|
||||||
|
// NOTE: Nsight seems to have trouble attaching when independent devices are enabled
|
||||||
if (!CommandlineArgFromName(Lit("no-d3d12-independent-devices")).exists)
|
if (!CommandlineArgFromName(Lit("no-d3d12-independent-devices")).exists)
|
||||||
{
|
{
|
||||||
G_D12.independent_devices_enabled = 1;
|
G_D12.independent_devices_enabled = 1;
|
||||||
|
|||||||
@ -552,6 +552,7 @@ void M_BuildEntryPoint(WaveLaneCtx *lane)
|
|||||||
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-std=c99"));
|
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-std=c99"));
|
||||||
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-fno-finite-loops"));
|
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-fno-finite-loops"));
|
||||||
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-fno-strict-aliasing"));
|
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-fno-strict-aliasing"));
|
||||||
|
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-fno-strict-overflow"));
|
||||||
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-msse4.2"));
|
PushStringToList(perm, &cp.compiler_only_flags_clang, Lit("-msse4.2"));
|
||||||
|
|
||||||
// TODO: Export debug info separately for release builds
|
// TODO: Export debug info separately for release builds
|
||||||
|
|||||||
@ -3209,7 +3209,7 @@ void P_StepFrame(P_Frame *frame)
|
|||||||
f32 speed_falloff = 0;
|
f32 speed_falloff = 0;
|
||||||
if (weapon->is_uzi)
|
if (weapon->is_uzi)
|
||||||
{
|
{
|
||||||
initial_speed = TweakFloat("Bullet speed", 100, 1, 100);
|
initial_speed = TweakFloat("Bullet speed", 50, 1, 100);
|
||||||
}
|
}
|
||||||
else if (weapon->is_launcher)
|
else if (weapon->is_launcher)
|
||||||
{
|
{
|
||||||
@ -3350,7 +3350,7 @@ void P_StepFrame(P_Frame *frame)
|
|||||||
Vec2 p1 = p0;
|
Vec2 p1 = p0;
|
||||||
|
|
||||||
// Cur pos -> next pos path
|
// Cur pos -> next pos path
|
||||||
if (!is_first_bullet_tick)
|
// if (!is_first_bullet_tick)
|
||||||
{
|
{
|
||||||
p1 = AddVec2(p0, dir);
|
p1 = AddVec2(p0, dir);
|
||||||
BulletPath *path = PushStruct(scratch.arena, BulletPath);
|
BulletPath *path = PushStruct(scratch.arena, BulletPath);
|
||||||
|
|||||||
@ -2471,23 +2471,6 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for (P_Ent *trail = P_FirstEnt(local_frame); !P_IsEntNil(trail); trail = P_NextEnt(trail))
|
|
||||||
// {
|
|
||||||
// if (trail->is_trail && trail->is_first_observation)
|
|
||||||
// {
|
|
||||||
// Vec2 p0 = trail->trail_p0;
|
|
||||||
// Vec2 p1 = trail->trail_p1;
|
|
||||||
|
|
||||||
// P_DebugDrawLine(p0, p1, Color_Cyan);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: Not like this
|
// TODO: Not like this
|
||||||
|
|
||||||
for (P_Ent *trail = P_FirstEnt(local_frame); !P_IsEntNil(trail); trail = P_NextEnt(trail))
|
for (P_Ent *trail = P_FirstEnt(local_frame); !P_IsEntNil(trail); trail = P_NextEnt(trail))
|
||||||
@ -2533,10 +2516,6 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
//- Push test impact particles
|
//- Push test impact particles
|
||||||
|
|
||||||
@ -2656,7 +2635,7 @@ void V_TickForever(WaveLaneCtx *lane)
|
|||||||
emitter.speed.max = speed + speed_spread * 0.5;
|
emitter.speed.max = speed + speed_spread * 0.5;
|
||||||
emitter.angle.min = angle - angle_spread * 0.5;
|
emitter.angle.min = angle - angle_spread * 0.5;
|
||||||
emitter.angle.max = angle + angle_spread * 0.5;
|
emitter.angle.max = angle + angle_spread * 0.5;
|
||||||
emitter.count = TweakFloat("Emitter count", 8, 0, Kibi(64));
|
emitter.count = TweakFloat("Emitter count", 32, 0, Kibi(64));
|
||||||
V_PushParticles(emitter);
|
V_PushParticles(emitter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -635,8 +635,8 @@ ComputeShader(V_SimParticlesCS)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 falloff = saturate(lerp(10, 20, rand_falloff) * frame.dt);
|
|
||||||
// f32 falloff = saturate(lerp(1, 2, rand_falloff) * frame.dt);
|
// f32 falloff = saturate(lerp(1, 2, rand_falloff) * frame.dt);
|
||||||
|
f32 falloff = saturate(lerp(10, 20, rand_falloff) * frame.dt);
|
||||||
particle.velocity *= 1.0f - falloff;
|
particle.velocity *= 1.0f - falloff;
|
||||||
|
|
||||||
particle.pos = p0 + (p1 - p0) * t;
|
particle.pos = p0 + (p1 - p0) * t;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user