From d48383d2f77835cd84587ccd6fe567b4b23032c2 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 5 Sep 2013 17:37:44 +0000 Subject: [PATCH] A couple of minor changes. - engine.c: comment out some unused decls with RELEASE=0 DEBUGANYWAY=1 - Lunatic: update dump.lua and v.lua - Lunatic: test/test_geom.lua: note a perf regression (wrt older LuaJIT, or I mis-configured / built something wrong) git-svn-id: https://svn.eduke32.com/eduke32@4048 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 5 +++++ polymer/eduke32/source/lunatic/defs_common.lua | 2 +- polymer/eduke32/source/lunatic/dump.lua | 2 +- polymer/eduke32/source/lunatic/test/test_geom.lua | 5 ++++- polymer/eduke32/source/lunatic/v.lua | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 4c93558d6..0022a2f26 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -2374,7 +2374,9 @@ typedef struct { int32_t x1, y1, x2, y2; } linetype; static linetype clipit[MAXCLIPNUM]; static int32_t clipsectnum, origclipsectnum, clipspritenum; static int16_t clipsectorlist[MAXCLIPNUM], origclipsectorlist[MAXCLIPNUM]; +#ifdef HAVE_CLIPSHAPE_FEATURE static int16_t clipspritelist[MAXCLIPNUM]; // sector-like sprite clipping +#endif static int16_t clipobjectval[MAXCLIPNUM]; typedef struct @@ -11992,10 +11994,13 @@ static int32_t try_facespr_intersect(const spritetype *spr, const vec3_t *refpos return 0; } + // // hitscan // +#ifdef HAVE_CLIPSHAPE_FEATURE static int32_t clipsprite_initindex(int32_t curidx, spritetype *curspr, int32_t *clipsectcnt, const vec3_t *vect); +#endif int32_t hitscan(const vec3_t *sv, int16_t sectnum, int32_t vx, int32_t vy, int32_t vz, hitdata_t *hit, uint32_t cliptype) diff --git a/polymer/eduke32/source/lunatic/defs_common.lua b/polymer/eduke32/source/lunatic/defs_common.lua index 7ffc76324..e6605055d 100644 --- a/polymer/eduke32/source/lunatic/defs_common.lua +++ b/polymer/eduke32/source/lunatic/defs_common.lua @@ -2,7 +2,7 @@ -- This file contains LuaJIT definitions of stuff that's common to the game and -- editor. The 'decl' function is expected to be defined in the global -- environment. --- See the included license file "BUILDLIC.TXT" for license info. +-- See the file "BUILDLIC.TXT" distributed with EDuke32 for license info. -- Will be 'true' if running from engine Lua state: local _LUNATIC_AUX = _LUNATIC_AUX diff --git a/polymer/eduke32/source/lunatic/dump.lua b/polymer/eduke32/source/lunatic/dump.lua index 70a59280e..7441b74db 100644 --- a/polymer/eduke32/source/lunatic/dump.lua +++ b/polymer/eduke32/source/lunatic/dump.lua @@ -54,7 +54,7 @@ -- Cache some library functions and objects. local jit = require("jit") -assert(jit.version_num == 20001, "LuaJIT core/library version mismatch") +assert(jit.version_num == 20002, "LuaJIT core/library version mismatch") local jutil = require("jit.util") local vmdef = require("jit.vmdef") local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc diff --git a/polymer/eduke32/source/lunatic/test/test_geom.lua b/polymer/eduke32/source/lunatic/test/test_geom.lua index 0ce0d3718..63aac52e8 100755 --- a/polymer/eduke32/source/lunatic/test/test_geom.lua +++ b/polymer/eduke32/source/lunatic/test/test_geom.lua @@ -5,7 +5,8 @@ local os = require("os") local xmath = require("xmath") -local N = os.exit and (arg[1] and tostring(arg[1])) or 1e6 +-- XXX: perf regression? (See below PERF_REGRESSION) +local N = os.exit and (arg[1] and tostring(arg[1])) or 1e5 --1e6 local A,B = {}, {} local V,W = {}, {} @@ -79,3 +80,5 @@ print("getdbl: ".. 1000*(t2-t1)) print("genpoints: ".. 1000*(t3-t2)) -- x86_64: 500 ms, x86: 700 ms print("intersect: ".. 1000*(t4-t3)) -- x86_64, x86: about 35 ms <- thanks to allocation sinking (else, about 500 ms?) print("result: ".. tostring(v)) + +-- PERF_REGRESSION: with N==1e6 getdbl, genpoints now about 1000ms from EDuke32! diff --git a/polymer/eduke32/source/lunatic/v.lua b/polymer/eduke32/source/lunatic/v.lua index f4a9b054d..d7df71262 100644 --- a/polymer/eduke32/source/lunatic/v.lua +++ b/polymer/eduke32/source/lunatic/v.lua @@ -59,7 +59,7 @@ -- Cache some library functions and objects. local jit = require("jit") -assert(jit.version_num == 20001, "LuaJIT core/library version mismatch") +assert(jit.version_num == 20002, "LuaJIT core/library version mismatch") local jutil = require("jit.util") local vmdef = require("jit.vmdef") local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo