merge ws/game
This commit is contained in:
commit
3cebe7d4e7
72 files changed
+10473
-6
No files matched your search
@@ -1138,6 +1138,48 @@ do
|
||||
jitTune(false)
|
||||
end
|
||||
end
|
||||
do
|
||||
-- game formats (ws-game): PKWARE DCL explode (StormLib's implode streams from tools/fixtures/mpq.py), reading every
|
||||
-- file of a StormLib MPQ (MB/s of file data), Freedoom's MAP01 to a Scene (tools/fixtures/wad.py: sector
|
||||
-- outlines, triangulation, walls; MB/s of map lumps), an MD2 with every frame as a morph target
|
||||
local Explode = require("@formats/codecs/compress/Explode")
|
||||
local Mpq = require("@formats/archive/mpq")
|
||||
local Wad = require("@formats/archive/wad")
|
||||
local MQ = require("@tests/gen/mpq")
|
||||
local WD = require("@tests/gen/wad")
|
||||
for _, c in MQ.implode do
|
||||
if c.name == "text" or c.name == "ascii-4096" or c.name == "binary-2048" then
|
||||
local data = buffer.fromstring(c.data)
|
||||
bench("explode " .. c.name .. " (" .. c.size .. " B)", 20, c.size, function()
|
||||
Explode.decompress(data)
|
||||
end)
|
||||
end
|
||||
end
|
||||
local arch = MQ.archives[1]
|
||||
local mb = buffer.fromstring(arch.data)
|
||||
local a = assert(Mpq.decode(Bytes.reader(mb)))
|
||||
local total = 0
|
||||
for _, e in a:list() do
|
||||
total += e.size
|
||||
end
|
||||
bench("mpq read every file (v1)", 5, total, function()
|
||||
local m = Mpq.decode(Bytes.reader(mb))
|
||||
for _, e in m:list() do
|
||||
m:read(e.name)
|
||||
end
|
||||
end)
|
||||
local wb = buffer.fromstring(WD.freedoom.data)
|
||||
local w = assert(Wad.decode(Bytes.reader(wb)))
|
||||
local lumps = 0
|
||||
for _, l in Wad.lumps(w) :: any do
|
||||
if l.map == "MAP01" then
|
||||
lumps += l.size
|
||||
end
|
||||
end
|
||||
bench("wad MAP01 -> Scene (no textures)", 3, lumps, function()
|
||||
Wad.map(w, "MAP01", { textures = false })
|
||||
end)
|
||||
end
|
||||
do
|
||||
-- Draco (codecs/model/Draco): the Stanford bunny (35k points, 69k faces, Edgebreaker valence, normals) and a UV
|
||||
-- sphere with seams; MB/s of decoded output (u32 indices + f32 attributes per point), plus triangles per second.
|
||||
|
||||
Reference in new issue
Block a user