You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

859 lines
26 KiB

#include "levels/gendung.h"
#include <cstddef>
#include <cstdint>
#include <memory>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <ankerl/unordered_dense.h>
#include <expected.hpp>
#include <magic_enum/magic_enum.hpp>
#include "engine/clx_sprite.hpp"
#include "engine/load_file.hpp"
#include "engine/random.hpp"
#include "engine/world_tile.hpp"
#include "game_mode.hpp"
#include "items.h"
#include "levels/drlg_l1.h"
#include "levels/drlg_l2.h"
#include "levels/drlg_l3.h"
#include "levels/drlg_l4.h"
#include "levels/reencode_dun_cels.hpp"
#include "levels/town.h"
#include "lighting.h"
#include "monster.h"
#include "objects.h"
#include "utils/algorithm/container.hpp"
#include "utils/bitset2d.hpp"
#include "utils/endian_swap.hpp"
#include "utils/is_of.hpp"
#include "utils/log.hpp"
#include "utils/status_macros.hpp"
namespace devilution {
Bitset2d<DMAXX, DMAXY> DungeonMask;
uint8_t dungeon[DMAXX][DMAXY];
uint8_t pdungeon[DMAXX][DMAXY];
Bitset2d<DMAXX, DMAXY> Protected;
WorldTileRectangle SetPieceRoom;
WorldTileRectangle SetPiece;
OptionalOwnedClxSpriteList pSpecialCels;
std::unique_ptr<MegaTile[]> pMegaTiles;
std::unique_ptr<std::byte[]> pDungeonCels;
TileProperties SOLData[MAXTILES];
WorldTilePosition dminPosition;
WorldTilePosition dmaxPosition;
dungeon_type leveltype;
uint8_t currlevel;
bool setlevel;
_setlevels setlvlnum;
dungeon_type setlvltype;
Point ViewPosition;
uint_fast8_t MicroTileLen;
int8_t TransVal;
std::array<bool, 256> TransList;
uint16_t dPiece[MAXDUNX][MAXDUNY];
MICROS DPieceMicros[MAXTILES];
int8_t dTransVal[MAXDUNX][MAXDUNY];
uint8_t dLight[MAXDUNX][MAXDUNY];
uint8_t dPreLight[MAXDUNX][MAXDUNY];
DungeonFlag dFlags[MAXDUNX][MAXDUNY];
int8_t dPlayer[MAXDUNX][MAXDUNY];
int16_t dMonster[MAXDUNX][MAXDUNY];
int8_t dCorpse[MAXDUNX][MAXDUNY];
int8_t dObject[MAXDUNX][MAXDUNY];
int8_t dSpecial[MAXDUNX][MAXDUNY];
int themeCount;
THEME_LOC themeLoc[MAXTHEMES];
namespace {
std::unique_ptr<uint16_t[]> LoadMinData(size_t &tileCount)
{
switch (leveltype) {
case DTYPE_TOWN: {
auto min = LoadFileInMemWithStatus<uint16_t>("nlevels\\towndata\\town.min", &tileCount);
if (!min.has_value()) {
return LoadFileInMem<uint16_t>("levels\\towndata\\town.min", &tileCount);
} else {
return std::move(*min);
}
}
case DTYPE_CATHEDRAL:
return LoadFileInMem<uint16_t>("levels\\l1data\\l1.min", &tileCount);
case DTYPE_CATACOMBS:
return LoadFileInMem<uint16_t>("levels\\l2data\\l2.min", &tileCount);
case DTYPE_CAVES:
return LoadFileInMem<uint16_t>("levels\\l3data\\l3.min", &tileCount);
case DTYPE_HELL:
return LoadFileInMem<uint16_t>("levels\\l4data\\l4.min", &tileCount);
case DTYPE_NEST:
return LoadFileInMem<uint16_t>("nlevels\\l6data\\l6.min", &tileCount);
case DTYPE_CRYPT:
return LoadFileInMem<uint16_t>("nlevels\\l5data\\l5.min", &tileCount);
default:
app_fatal("LoadMinData");
}
}
/**
* @brief Starting from the origin point determine how much floor space is available with the given bounds
*
* Essentially looks for the widest/tallest rectangular area of at least the minimum size, but due to a weird/buggy
* bounds check can return an area smaller than the available width/height.
*
* @param floor what value defines floor tiles within a dungeon
* @param origin starting point for the search
* @param minSize minimum allowable value for both dimensions
* @param maxSize maximum allowable value for both dimensions
* @return how much width/height is available for a theme room or an empty optional if there's not enough space
*/
std::optional<WorldTileSize> GetSizeForThemeRoom(uint8_t floor, WorldTilePosition origin, WorldTileCoord minSize, WorldTileCoord maxSize)
{
if (origin.x + maxSize > DMAXX && origin.y + maxSize > DMAXY) {
return {}; // Original broken bounds check, avoids lower right corner
}
if (IsNearThemeRoom(origin)) {
return {};
}
const WorldTileCoord maxWidth = std::min<WorldTileCoord>(maxSize, DMAXX - origin.x);
const WorldTileCoord maxHeight = std::min<WorldTileCoord>(maxSize, DMAXY - origin.y);
WorldTileSize room { maxWidth, maxHeight };
for (WorldTileCoord i = 0; i < maxSize; i++) {
WorldTileCoord width = i < room.height ? i : 0;
if (i < maxHeight) {
while (width < room.width) {
if (dungeon[origin.x + width][origin.y + i] != floor)
break;
width++;
}
}
WorldTileCoord height = i < room.width ? i : 0;
if (i < maxWidth) {
while (height < room.height) {
if (dungeon[origin.x + i][origin.y + height] != floor)
break;
height++;
}
}
if (width < minSize || height < minSize) {
if (i < minSize)
return {};
break;
}
room = { std::min(room.width, width), std::min(room.height, height) };
}
return room - 2;
}
void CreateThemeRoom(int themeIndex)
{
const int lx = themeLoc[themeIndex].room.position.x;
const int ly = themeLoc[themeIndex].room.position.y;
const int hx = lx + themeLoc[themeIndex].room.size.width;
const int hy = ly + themeLoc[themeIndex].room.size.height;
for (int yy = ly; yy < hy; yy++) {
for (int xx = lx; xx < hx; xx++) {
if (leveltype == DTYPE_CATACOMBS) {
if (yy == ly || yy == hy - 1) {
dungeon[xx][yy] = 2;
} else if (xx == lx || xx == hx - 1) {
dungeon[xx][yy] = 1;
} else {
dungeon[xx][yy] = 3;
}
}
if (IsAnyOf(leveltype, DTYPE_CAVES, DTYPE_NEST)) {
if (yy == ly || yy == hy - 1) {
dungeon[xx][yy] = 134;
} else if (xx == lx || xx == hx - 1) {
dungeon[xx][yy] = 137;
} else {
dungeon[xx][yy] = 7;
}
}
if (leveltype == DTYPE_HELL) {
if (yy == ly || yy == hy - 1) {
dungeon[xx][yy] = 2;
} else if (xx == lx || xx == hx - 1) {
dungeon[xx][yy] = 1;
} else {
dungeon[xx][yy] = 6;
}
}
}
}
if (leveltype == DTYPE_CATACOMBS) {
dungeon[lx][ly] = 8;
dungeon[hx - 1][ly] = 7;
dungeon[lx][hy - 1] = 9;
dungeon[hx - 1][hy - 1] = 6;
}
if (IsAnyOf(leveltype, DTYPE_CAVES, DTYPE_NEST)) {
dungeon[lx][ly] = 150;
dungeon[hx - 1][ly] = 151;
dungeon[lx][hy - 1] = 152;
dungeon[hx - 1][hy - 1] = 138;
}
if (leveltype == DTYPE_HELL) {
dungeon[lx][ly] = 9;
dungeon[hx - 1][ly] = 16;
dungeon[lx][hy - 1] = 15;
dungeon[hx - 1][hy - 1] = 12;
}
if (leveltype == DTYPE_CATACOMBS) {
if (FlipCoin())
dungeon[hx - 1][(ly + hy) / 2] = 4;
else
dungeon[(lx + hx) / 2][hy - 1] = 5;
}
if (IsAnyOf(leveltype, DTYPE_CAVES, DTYPE_NEST)) {
if (FlipCoin())
dungeon[hx - 1][(ly + hy) / 2] = 147;
else
dungeon[(lx + hx) / 2][hy - 1] = 146;
}
if (leveltype == DTYPE_HELL) {
if (FlipCoin()) {
const int yy = (ly + hy) / 2;
dungeon[hx - 1][yy - 1] = 53;
dungeon[hx - 1][yy] = 6;
dungeon[hx - 1][yy + 1] = 52;
dungeon[hx - 2][yy - 1] = 54;
} else {
const int xx = (lx + hx) / 2;
dungeon[xx - 1][hy - 1] = 57;
dungeon[xx][hy - 1] = 6;
dungeon[xx + 1][hy - 1] = 56;
dungeon[xx][hy - 2] = 59;
dungeon[xx - 1][hy - 2] = 58;
}
}
}
bool IsFloor(Point p, uint8_t floorID)
{
const int i = (p.x - 16) / 2;
const int j = (p.y - 16) / 2;
if (i < 0 || i >= DMAXX)
return false;
if (j < 0 || j >= DMAXY)
return false;
return dungeon[i][j] == floorID;
}
void FillTransparencyValues(Point floor, uint8_t floorID)
{
const Direction allDirections[] = {
Direction::North,
Direction::South,
Direction::East,
Direction::West,
Direction::NorthEast,
Direction::NorthWest,
Direction::SouthEast,
Direction::SouthWest,
};
// We only fill in the surrounding tiles if they are not floor tiles
// because they would otherwise not be visited by the span filling algorithm
for (const Direction dir : allDirections) {
const Point adjacent = floor + dir;
if (!IsFloor(adjacent, floorID))
dTransVal[adjacent.x][adjacent.y] = TransVal;
}
dTransVal[floor.x][floor.y] = TransVal;
}
void FindTransparencyValues(Point floor, uint8_t floorID)
{
// Algorithm adapted from https://en.wikipedia.org/wiki/Flood_fill#Span_Filling
// Modified to include diagonally adjacent tiles that would otherwise not be visited
// Also, Wikipedia's selection for the initial seed is incorrect
struct Seed {
int scanStart;
int scanEnd;
int y;
int dy;
};
std::stack<Seed, std::vector<Seed>> seedStack;
seedStack.push({ floor.x, floor.x + 1, floor.y, 1 });
const auto isInside = [floorID](int x, int y) {
if (dTransVal[x][y] != 0)
return false;
return IsFloor({ x, y }, floorID);
};
const auto set = [floorID](int x, int y) {
FillTransparencyValues({ x, y }, floorID);
};
const Displacement left = { -1, 0 };
const Displacement right = { 1, 0 };
const auto checkDiagonals = [&](Point p, Displacement direction) {
const Point up = p + Displacement { 0, -1 };
const Point upOver = up + direction;
if (!isInside(up.x, up.y) && isInside(upOver.x, upOver.y))
seedStack.push({ upOver.x, upOver.x + 1, upOver.y, -1 });
const Point down = p + Displacement { 0, 1 };
const Point downOver = down + direction;
if (!isInside(down.x, down.y) && isInside(downOver.x, downOver.y))
seedStack.push(Seed { downOver.x, downOver.x + 1, downOver.y, 1 });
};
while (!seedStack.empty()) {
const auto [scanStart, scanEnd, y, dy] = seedStack.top();
seedStack.pop();
int scanLeft = scanStart;
if (isInside(scanLeft, y)) {
while (isInside(scanLeft - 1, y)) {
set(scanLeft - 1, y);
scanLeft--;
}
checkDiagonals({ scanLeft, y }, left);
}
if (scanLeft < scanStart)
seedStack.push(Seed { scanLeft, scanStart - 1, y - dy, -dy });
int scanRight = scanStart;
while (scanRight < scanEnd) {
while (isInside(scanRight, y)) {
set(scanRight, y);
scanRight++;
}
seedStack.push(Seed { scanLeft, scanRight - 1, y + dy, dy });
if (scanRight - 1 > scanEnd)
seedStack.push(Seed { scanEnd + 1, scanRight - 1, y - dy, -dy });
if (scanLeft < scanRight)
checkDiagonals({ scanRight - 1, y }, right);
while (scanRight < scanEnd && !isInside(scanRight, y))
scanRight++;
scanLeft = scanRight;
if (scanLeft < scanEnd)
checkDiagonals({ scanLeft, y }, left);
}
}
}
void InitGlobals()
{
memset(dFlags, 0, sizeof(dFlags));
memset(dPlayer, 0, sizeof(dPlayer));
memset(dMonster, 0, sizeof(dMonster));
memset(dCorpse, 0, sizeof(dCorpse));
memset(dItem, 0, sizeof(dItem));
memset(dObject, 0, sizeof(dObject));
memset(dSpecial, 0, sizeof(dSpecial));
uint8_t defaultLight = leveltype == DTYPE_TOWN ? 0 : 15;
#ifdef _DEBUG
if (DisableLighting)
defaultLight = 0;
#endif
memset(dLight, defaultLight, sizeof(dLight));
DRLG_InitTrans();
dminPosition = WorldTilePosition(0, 0).megaToWorld();
dmaxPosition = WorldTilePosition(40, 40).megaToWorld();
SetPieceRoom = { { 0, 0 }, { 0, 0 } };
SetPiece = { { 0, 0 }, { 0, 0 } };
}
} // namespace
#ifdef BUILD_TESTING
std::optional<WorldTileSize> GetSizeForThemeRoom()
{
return GetSizeForThemeRoom(0, { 0, 0 }, 5, 10);
}
#endif
dungeon_type GetLevelType(int level)
{
if (level == 0)
return DTYPE_TOWN;
if (level <= 4)
return DTYPE_CATHEDRAL;
if (level <= 8)
return DTYPE_CATACOMBS;
if (level <= 12)
return DTYPE_CAVES;
if (level <= 16)
return DTYPE_HELL;
if (level <= 20)
return DTYPE_NEST;
if (level <= 24)
return DTYPE_CRYPT;
return DTYPE_NONE;
}
void CreateDungeon(uint32_t rseed, lvl_entry entry)
{
InitGlobals();
switch (leveltype) {
case DTYPE_TOWN:
CreateTown(entry);
break;
case DTYPE_CATHEDRAL:
case DTYPE_CRYPT:
CreateL5Dungeon(rseed, entry);
break;
case DTYPE_CATACOMBS:
CreateL2Dungeon(rseed, entry);
break;
case DTYPE_CAVES:
case DTYPE_NEST:
CreateL3Dungeon(rseed, entry);
break;
case DTYPE_HELL:
CreateL4Dungeon(rseed, entry);
break;
default:
app_fatal("Invalid level type");
}
Make_SetPC(SetPiece);
}
tl::expected<void, std::string> LoadLevelSOLData()
{
switch (leveltype) {
case DTYPE_TOWN:
if (!LoadFileInMemWithStatus("nlevels\\towndata\\town.sol", SOLData).has_value()) {
RETURN_IF_ERROR(LoadFileInMemWithStatus("levels\\towndata\\town.sol", SOLData));
}
break;
case DTYPE_CATHEDRAL:
RETURN_IF_ERROR(LoadFileInMemWithStatus("levels\\l1data\\l1.sol", SOLData));
// Fix incorrectly marked arched tiles
SOLData[9] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[15] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[16] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[20] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[21] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[27] |= TileProperties::BlockMissile;
SOLData[28] |= TileProperties::BlockMissile;
SOLData[51] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[56] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[58] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[61] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[63] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[65] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[72] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[208] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[247] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[253] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[257] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[323] |= TileProperties::BlockLight | TileProperties::BlockMissile;
SOLData[403] |= TileProperties::BlockLight;
// Fix incorrectly marked pillar tile
SOLData[24] |= TileProperties::BlockLight;
// Fix incorrectly marked wall tile
SOLData[450] |= TileProperties::BlockLight | TileProperties::BlockMissile;
break;
case DTYPE_CATACOMBS:
RETURN_IF_ERROR(LoadFileInMemWithStatus("levels\\l2data\\l2.sol", SOLData));
break;
case DTYPE_CAVES:
RETURN_IF_ERROR(LoadFileInMemWithStatus("levels\\l3data\\l3.sol", SOLData));
// The graphics for tile 48 sub-tile 171 frame 461 are partly incorrect, as they
// have a few pixels that should belong to the solid tile 49 instead.
// Marks the sub-tile as "BlockMissile" to avoid treating it as a floor during rendering.
SOLData[170] |= TileProperties::BlockMissile;
// Fence sub-tiles 481 and 487 are substitutes for solid sub-tiles 473 and 479
// but are not marked as solid.
SOLData[481] |= TileProperties::Solid;
SOLData[487] |= TileProperties::Solid;
break;
case DTYPE_HELL:
RETURN_IF_ERROR(LoadFileInMemWithStatus("levels\\l4data\\l4.sol", SOLData));
SOLData[210] = TileProperties::None; // Tile is incorrectly marked as being solid
break;
case DTYPE_NEST:
RETURN_IF_ERROR(LoadFileInMemWithStatus("nlevels\\l6data\\l6.sol", SOLData));
break;
case DTYPE_CRYPT:
RETURN_IF_ERROR(LoadFileInMemWithStatus("nlevels\\l5data\\l5.sol", SOLData));
SOLData[142] = TileProperties::None; // Tile is incorrectly marked as being solid
break;
default:
return tl::make_unexpected("LoadLevelSOLData");
}
return {};
}
Make `dun_render` a standalone library Does not make `dun_render_benchmark` standalone yet as that will require more untangling. Benchmark is neutral: ``` Benchmark Time CPU Time Old Time New CPU Old CPU New ---------------------------------------------------------------------------------------------------------------------------------------------------------- Render<LeftTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyLit>_mean +0.0119 +0.0120 8377 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_median +0.0119 +0.0119 8376 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_stddev -0.0884 -0.2462 2 1 1 1 Render<LeftTriangle, Solid, FullyLit>_cv -0.0992 -0.2551 0 0 0 0 Render<LeftTriangle, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyDark>_mean +0.0910 +0.0910 21174 23100 21170 23097 Render<LeftTriangle, Solid, FullyDark>_median +0.0869 +0.0869 21183 23023 21179 23019 Render<LeftTriangle, Solid, FullyDark>_stddev -0.1528 -0.1593 267 226 268 225 Render<LeftTriangle, Solid, FullyDark>_cv -0.2234 -0.2294 0 0 0 0 Render<LeftTriangle, Solid, PartiallyLit>_pvalue 0.0013 0.0013 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, PartiallyLit>_mean +0.0065 +0.0065 81168 81698 81151 81680 Render<LeftTriangle, Solid, PartiallyLit>_median +0.0075 +0.0073 81143 81748 81136 81730 Render<LeftTriangle, Solid, PartiallyLit>_stddev +0.8663 +0.8787 167 311 164 307 Render<LeftTriangle, Solid, PartiallyLit>_cv +0.8542 +0.8665 0 0 0 0 Render<LeftTriangle, Transparent, FullyLit>_pvalue 0.0028 0.0017 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyLit>_mean -0.0239 -0.0239 94989 92719 94973 92703 Render<LeftTriangle, Transparent, FullyLit>_median -0.0122 -0.0123 93867 92717 93856 92704 Render<LeftTriangle, Transparent, FullyLit>_stddev -0.9920 -0.9955 2370 19 2368 11 Render<LeftTriangle, Transparent, FullyLit>_cv -0.9918 -0.9954 0 0 0 0 Render<LeftTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyDark>_mean -0.0841 -0.0841 76234 69821 76220 69809 Render<LeftTriangle, Transparent, FullyDark>_median -0.0831 -0.0832 76209 69877 76202 69864 Render<LeftTriangle, Transparent, FullyDark>_stddev -0.4486 -0.4538 441 243 440 241 Render<LeftTriangle, Transparent, FullyDark>_cv -0.3979 -0.4037 0 0 0 0 Render<LeftTriangle, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, PartiallyLit>_mean +0.0022 +0.0021 128812 129091 128792 129067 Render<LeftTriangle, Transparent, PartiallyLit>_median +0.0023 +0.0023 128820 129115 128805 129096 Render<LeftTriangle, Transparent, PartiallyLit>_stddev +0.8757 +0.6866 50 93 53 90 Render<LeftTriangle, Transparent, PartiallyLit>_cv +0.8716 +0.6830 0 0 0 0 Render<RightTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyLit>_mean +0.0057 +0.0057 8521 8570 8520 8569 Render<RightTriangle, Solid, FullyLit>_median +0.0057 +0.0057 8522 8570 8520 8568 Render<RightTriangle, Solid, FullyLit>_stddev -0.1826 -0.0420 1 1 1 1 Render<RightTriangle, Solid, FullyLit>_cv -0.1872 -0.0475 0 0 0 0 Render<RightTriangle, Solid, FullyDark>_pvalue 0.0006 0.0006 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyDark>_mean -0.0303 -0.0303 22678 21991 22675 21987 Render<RightTriangle, Solid, FullyDark>_median -0.0360 -0.0359 22704 21888 22699 21883 Render<RightTriangle, Solid, FullyDark>_stddev +0.4759 +0.4648 195 288 196 287 Render<RightTriangle, Solid, FullyDark>_cv +0.5220 +0.5106 0 0 0 0 Render<RightTriangle, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, PartiallyLit>_mean +0.0338 +0.0338 83355 86170 83341 86157 Render<RightTriangle, Solid, PartiallyLit>_median +0.0347 +0.0348 83248 86140 83230 86126 Render<RightTriangle, Solid, PartiallyLit>_stddev +0.3670 +0.3423 238 326 240 322 Render<RightTriangle, Solid, PartiallyLit>_cv +0.3224 +0.2985 0 0 0 0 Render<RightTriangle, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyLit>_mean -0.0617 -0.0616 102726 96392 102706 96375 Render<RightTriangle, Transparent, FullyLit>_median -0.0598 -0.0597 102521 96394 102498 96375 Render<RightTriangle, Transparent, FullyLit>_stddev -0.9516 -0.9548 456 22 461 21 Render<RightTriangle, Transparent, FullyLit>_cv -0.9485 -0.9518 0 0 0 0 Render<RightTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyDark>_mean -0.1377 -0.1377 84505 72865 84492 72853 Render<RightTriangle, Transparent, FullyDark>_median -0.1374 -0.1374 84339 72748 84323 72740 Render<RightTriangle, Transparent, FullyDark>_stddev -0.2760 -0.2867 526 381 528 377 Render<RightTriangle, Transparent, FullyDark>_cv -0.1604 -0.1727 0 0 0 0 Render<RightTriangle, Transparent, PartiallyLit>_pvalue 0.0036 0.0017 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, PartiallyLit>_mean +0.0010 +0.0010 131672 131808 131649 131784 Render<RightTriangle, Transparent, PartiallyLit>_median +0.0010 +0.0008 131665 131797 131654 131757 Render<RightTriangle, Transparent, PartiallyLit>_stddev -0.0688 -0.0128 81 75 72 71 Render<RightTriangle, Transparent, PartiallyLit>_cv -0.0697 -0.0138 0 0 0 0 Render<TransparentSquare, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyLit>_mean -0.0300 -0.0300 143323 139021 143300 139000 Render<TransparentSquare, Solid, FullyLit>_median -0.0300 -0.0301 143321 139014 143310 138990 Render<TransparentSquare, Solid, FullyLit>_stddev +0.0008 -0.0820 43 43 43 39 Render<TransparentSquare, Solid, FullyLit>_cv +0.0318 -0.0536 0 0 0 0 Render<TransparentSquare, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyDark>_mean -0.0100 -0.0100 134939 133588 134914 133565 Render<TransparentSquare, Solid, FullyDark>_median -0.0106 -0.0108 134964 133526 134948 133497 Render<TransparentSquare, Solid, FullyDark>_stddev +1.7508 +1.8682 99 273 96 276 Render<TransparentSquare, Solid, FullyDark>_cv +1.7786 +1.8972 0 0 0 0 Render<TransparentSquare, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, PartiallyLit>_mean -0.0460 -0.0460 152043 145043 152016 145020 Render<TransparentSquare, Solid, PartiallyLit>_median -0.0463 -0.0461 152012 144978 151964 144962 Render<TransparentSquare, Solid, PartiallyLit>_stddev -0.4453 -0.4334 267 148 266 151 Render<TransparentSquare, Solid, PartiallyLit>_cv -0.4185 -0.4060 0 0 0 0 Render<TransparentSquare, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyLit>_mean -0.0846 -0.0846 181333 165997 181304 165969 Render<TransparentSquare, Transparent, FullyLit>_median -0.0840 -0.0839 181184 165972 181147 165945 Render<TransparentSquare, Transparent, FullyLit>_stddev -0.5808 -0.5755 319 134 320 136 Render<TransparentSquare, Transparent, FullyLit>_cv -0.5421 -0.5362 0 0 0 0 Render<TransparentSquare, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyDark>_mean -0.0250 -0.0250 142232 138672 142208 138648 Render<TransparentSquare, Transparent, FullyDark>_median -0.0245 -0.0245 142144 138663 142128 138639 Render<TransparentSquare, Transparent, FullyDark>_stddev +0.1011 +0.0806 288 317 290 313 Render<TransparentSquare, Transparent, FullyDark>_cv +0.1294 +0.1084 0 0 0 0 Render<TransparentSquare, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, PartiallyLit>_mean +0.0105 +0.0105 205439 207589 205397 207556 Render<TransparentSquare, Transparent, PartiallyLit>_median +0.0106 +0.0107 205402 207575 205355 207558 Render<TransparentSquare, Transparent, PartiallyLit>_stddev -0.4410 -0.3876 182 102 167 102 Render<TransparentSquare, Transparent, PartiallyLit>_cv -0.4468 -0.3940 0 0 0 0 Render<Square, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyLit>_mean -0.0010 -0.0010 11109 11098 11107 11096 Render<Square, Solid, FullyLit>_median -0.0010 -0.0010 11109 11097 11107 11095 Render<Square, Solid, FullyLit>_stddev -0.2265 +0.2791 3 2 2 2 Render<Square, Solid, FullyLit>_cv -0.2257 +0.2804 0 0 0 0 Render<Square, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyDark>_mean +0.0904 +0.0904 8513 9283 8512 9282 Render<Square, Solid, FullyDark>_median +0.0902 +0.0902 8521 9290 8519 9288 Render<Square, Solid, FullyDark>_stddev -0.1884 -0.1616 21 17 21 18 Render<Square, Solid, FullyDark>_cv -0.2557 -0.2311 0 0 0 0 Render<Square, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, PartiallyLit>_mean +0.0038 +0.0038 163661 164289 163632 164259 Render<Square, Solid, PartiallyLit>_median +0.0038 +0.0040 163665 164290 163621 164269 Render<Square, Solid, PartiallyLit>_stddev +0.1746 +0.4412 34 40 28 40 Render<Square, Solid, PartiallyLit>_cv +0.1701 +0.4356 0 0 0 0 Render<Square, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyLit>_mean -0.0029 -0.0029 197906 197340 197876 197304 Render<Square, Transparent, FullyLit>_median -0.0030 -0.0029 197929 197339 197872 197307 Render<Square, Transparent, FullyLit>_stddev -0.5965 -0.7554 61 25 62 15 Render<Square, Transparent, FullyLit>_cv -0.5953 -0.7547 0 0 0 0 Render<Square, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyDark>_mean -0.0163 -0.0163 125659 123607 125641 123588 Render<Square, Transparent, FullyDark>_median -0.0163 -0.0163 125651 123609 125629 123579 Render<Square, Transparent, FullyDark>_stddev -0.7943 -0.8033 180 37 181 36 Render<Square, Transparent, FullyDark>_cv -0.7909 -0.8000 0 0 0 0 Render<Square, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, PartiallyLit>_mean +0.0182 +0.0182 278103 283157 278043 283107 Render<Square, Transparent, PartiallyLit>_median +0.0184 +0.0184 278086 283190 278017 283120 Render<Square, Transparent, PartiallyLit>_stddev +1.6051 +1.5303 81 210 82 209 Render<Square, Transparent, PartiallyLit>_cv +1.5586 +1.4850 0 0 0 0 Render<LeftTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyLit>_mean -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_median -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_stddev -0.4844 -0.6856 1 0 1 0 Render<LeftTrapezoid, Solid, FullyLit>_cv -0.4809 -0.6834 0 0 0 0 Render<LeftTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyDark>_mean +0.3996 +0.3997 5163 7227 5162 7226 Render<LeftTrapezoid, Solid, FullyDark>_median +0.3973 +0.3974 5174 7230 5173 7229 Render<LeftTrapezoid, Solid, FullyDark>_stddev -0.7835 -0.7789 89 19 89 20 Render<LeftTrapezoid, Solid, FullyDark>_cv -0.8453 -0.8420 0 0 0 0 Render<LeftTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, PartiallyLit>_mean -0.1228 -0.1228 50053 43907 50044 43900 Render<LeftTrapezoid, Solid, PartiallyLit>_median -0.1228 -0.1228 50062 43916 50054 43906 Render<LeftTrapezoid, Solid, PartiallyLit>_stddev +1.3916 +1.3800 63 150 64 151 Render<LeftTrapezoid, Solid, PartiallyLit>_cv +1.7263 +1.7131 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyLit>_mean -0.1584 -0.1583 62677 52751 62665 52743 Render<LeftTrapezoid, Transparent, FullyLit>_median -0.1585 -0.1585 62670 52736 62656 52728 Render<LeftTrapezoid, Transparent, FullyLit>_stddev +1.1429 +1.4086 26 55 23 55 Render<LeftTrapezoid, Transparent, FullyLit>_cv +1.5461 +1.8617 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyDark>_mean -0.1929 -0.1929 57688 46558 57679 46551 Render<LeftTrapezoid, Transparent, FullyDark>_median -0.1943 -0.1944 57681 46473 57672 46459 Render<LeftTrapezoid, Transparent, FullyDark>_stddev +2.8190 +2.7914 62 237 63 238 Render<LeftTrapezoid, Transparent, FullyDark>_cv +3.7319 +3.6978 0 0 0 0 Render<LeftTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, PartiallyLit>_mean -0.0054 -0.0054 70694 70313 70682 70301 Render<LeftTrapezoid, Transparent, PartiallyLit>_median -0.0050 -0.0048 70671 70319 70650 70311 Render<LeftTrapezoid, Transparent, PartiallyLit>_stddev -0.7448 -0.7617 163 42 168 40 Render<LeftTrapezoid, Transparent, PartiallyLit>_cv -0.7434 -0.7604 0 0 0 0 Render<RightTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyLit>_mean +0.0123 +0.0123 2985 3022 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_median +0.0123 +0.0123 2985 3021 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_stddev -0.4207 -0.4667 1 0 1 0 Render<RightTrapezoid, Solid, FullyLit>_cv -0.4277 -0.4731 0 0 0 0 Render<RightTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyDark>_mean +0.1105 +0.1105 4894 5435 4893 5434 Render<RightTrapezoid, Solid, FullyDark>_median +0.1083 +0.1082 4902 5433 4901 5432 Render<RightTrapezoid, Solid, FullyDark>_stddev -0.1973 -0.1947 45 37 45 37 Render<RightTrapezoid, Solid, FullyDark>_cv -0.2772 -0.2748 0 0 0 0 Render<RightTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, PartiallyLit>_mean -0.0169 -0.0169 48201 47386 48192 47379 Render<RightTrapezoid, Solid, PartiallyLit>_median -0.0172 -0.0170 48184 47355 48170 47351 Render<RightTrapezoid, Solid, PartiallyLit>_stddev +0.6070 +0.5204 48 78 50 76 Render<RightTrapezoid, Solid, PartiallyLit>_cv +0.6346 +0.5465 0 0 0 0 Render<RightTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyLit>_mean -0.0023 -0.0023 48751 48639 48742 48632 Render<RightTrapezoid, Transparent, FullyLit>_median -0.0020 -0.0018 48751 48654 48738 48651 Render<RightTrapezoid, Transparent, FullyLit>_stddev +2.4354 +2.4427 10 35 11 36 Render<RightTrapezoid, Transparent, FullyLit>_cv +2.4433 +2.4505 0 0 0 0 Render<RightTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyDark>_mean -0.2247 -0.2247 40942 31742 40936 31736 Render<RightTrapezoid, Transparent, FullyDark>_median -0.2241 -0.2240 40904 31739 40895 31734 Render<RightTrapezoid, Transparent, FullyDark>_stddev -0.3455 -0.3546 165 108 167 108 Render<RightTrapezoid, Transparent, FullyDark>_cv -0.1558 -0.1676 0 0 0 0 Render<RightTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, PartiallyLit>_mean -0.0908 -0.0908 74269 67523 74256 67512 Render<RightTrapezoid, Transparent, PartiallyLit>_median -0.0898 -0.0897 74196 67536 74176 67523 Render<RightTrapezoid, Transparent, PartiallyLit>_stddev -0.6590 -0.6568 147 50 146 50 Render<RightTrapezoid, Transparent, PartiallyLit>_cv -0.6250 -0.6225 0 0 0 0 BM_RenderBlackTile_pvalue 0.0539 0.0539 U Test, Repetitions: 10 vs 10 BM_RenderBlackTile_mean -0.0188 -0.0188 125 123 125 123 BM_RenderBlackTile_median -0.0263 -0.0264 126 122 125 122 BM_RenderBlackTile_stddev +1.0907 +1.0966 1 3 1 3 BM_RenderBlackTile_cv +1.1307 +1.1368 0 0 0 0 OVERALL_GEOMEAN -0.0207 -0.0207 0 0 0 0 ```
8 months ago
void SetDungeonMicros(std::unique_ptr<std::byte[]> &dungeonCels, uint_fast8_t &microTileLen)
{
Make `dun_render` a standalone library Does not make `dun_render_benchmark` standalone yet as that will require more untangling. Benchmark is neutral: ``` Benchmark Time CPU Time Old Time New CPU Old CPU New ---------------------------------------------------------------------------------------------------------------------------------------------------------- Render<LeftTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyLit>_mean +0.0119 +0.0120 8377 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_median +0.0119 +0.0119 8376 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_stddev -0.0884 -0.2462 2 1 1 1 Render<LeftTriangle, Solid, FullyLit>_cv -0.0992 -0.2551 0 0 0 0 Render<LeftTriangle, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyDark>_mean +0.0910 +0.0910 21174 23100 21170 23097 Render<LeftTriangle, Solid, FullyDark>_median +0.0869 +0.0869 21183 23023 21179 23019 Render<LeftTriangle, Solid, FullyDark>_stddev -0.1528 -0.1593 267 226 268 225 Render<LeftTriangle, Solid, FullyDark>_cv -0.2234 -0.2294 0 0 0 0 Render<LeftTriangle, Solid, PartiallyLit>_pvalue 0.0013 0.0013 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, PartiallyLit>_mean +0.0065 +0.0065 81168 81698 81151 81680 Render<LeftTriangle, Solid, PartiallyLit>_median +0.0075 +0.0073 81143 81748 81136 81730 Render<LeftTriangle, Solid, PartiallyLit>_stddev +0.8663 +0.8787 167 311 164 307 Render<LeftTriangle, Solid, PartiallyLit>_cv +0.8542 +0.8665 0 0 0 0 Render<LeftTriangle, Transparent, FullyLit>_pvalue 0.0028 0.0017 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyLit>_mean -0.0239 -0.0239 94989 92719 94973 92703 Render<LeftTriangle, Transparent, FullyLit>_median -0.0122 -0.0123 93867 92717 93856 92704 Render<LeftTriangle, Transparent, FullyLit>_stddev -0.9920 -0.9955 2370 19 2368 11 Render<LeftTriangle, Transparent, FullyLit>_cv -0.9918 -0.9954 0 0 0 0 Render<LeftTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyDark>_mean -0.0841 -0.0841 76234 69821 76220 69809 Render<LeftTriangle, Transparent, FullyDark>_median -0.0831 -0.0832 76209 69877 76202 69864 Render<LeftTriangle, Transparent, FullyDark>_stddev -0.4486 -0.4538 441 243 440 241 Render<LeftTriangle, Transparent, FullyDark>_cv -0.3979 -0.4037 0 0 0 0 Render<LeftTriangle, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, PartiallyLit>_mean +0.0022 +0.0021 128812 129091 128792 129067 Render<LeftTriangle, Transparent, PartiallyLit>_median +0.0023 +0.0023 128820 129115 128805 129096 Render<LeftTriangle, Transparent, PartiallyLit>_stddev +0.8757 +0.6866 50 93 53 90 Render<LeftTriangle, Transparent, PartiallyLit>_cv +0.8716 +0.6830 0 0 0 0 Render<RightTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyLit>_mean +0.0057 +0.0057 8521 8570 8520 8569 Render<RightTriangle, Solid, FullyLit>_median +0.0057 +0.0057 8522 8570 8520 8568 Render<RightTriangle, Solid, FullyLit>_stddev -0.1826 -0.0420 1 1 1 1 Render<RightTriangle, Solid, FullyLit>_cv -0.1872 -0.0475 0 0 0 0 Render<RightTriangle, Solid, FullyDark>_pvalue 0.0006 0.0006 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyDark>_mean -0.0303 -0.0303 22678 21991 22675 21987 Render<RightTriangle, Solid, FullyDark>_median -0.0360 -0.0359 22704 21888 22699 21883 Render<RightTriangle, Solid, FullyDark>_stddev +0.4759 +0.4648 195 288 196 287 Render<RightTriangle, Solid, FullyDark>_cv +0.5220 +0.5106 0 0 0 0 Render<RightTriangle, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, PartiallyLit>_mean +0.0338 +0.0338 83355 86170 83341 86157 Render<RightTriangle, Solid, PartiallyLit>_median +0.0347 +0.0348 83248 86140 83230 86126 Render<RightTriangle, Solid, PartiallyLit>_stddev +0.3670 +0.3423 238 326 240 322 Render<RightTriangle, Solid, PartiallyLit>_cv +0.3224 +0.2985 0 0 0 0 Render<RightTriangle, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyLit>_mean -0.0617 -0.0616 102726 96392 102706 96375 Render<RightTriangle, Transparent, FullyLit>_median -0.0598 -0.0597 102521 96394 102498 96375 Render<RightTriangle, Transparent, FullyLit>_stddev -0.9516 -0.9548 456 22 461 21 Render<RightTriangle, Transparent, FullyLit>_cv -0.9485 -0.9518 0 0 0 0 Render<RightTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyDark>_mean -0.1377 -0.1377 84505 72865 84492 72853 Render<RightTriangle, Transparent, FullyDark>_median -0.1374 -0.1374 84339 72748 84323 72740 Render<RightTriangle, Transparent, FullyDark>_stddev -0.2760 -0.2867 526 381 528 377 Render<RightTriangle, Transparent, FullyDark>_cv -0.1604 -0.1727 0 0 0 0 Render<RightTriangle, Transparent, PartiallyLit>_pvalue 0.0036 0.0017 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, PartiallyLit>_mean +0.0010 +0.0010 131672 131808 131649 131784 Render<RightTriangle, Transparent, PartiallyLit>_median +0.0010 +0.0008 131665 131797 131654 131757 Render<RightTriangle, Transparent, PartiallyLit>_stddev -0.0688 -0.0128 81 75 72 71 Render<RightTriangle, Transparent, PartiallyLit>_cv -0.0697 -0.0138 0 0 0 0 Render<TransparentSquare, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyLit>_mean -0.0300 -0.0300 143323 139021 143300 139000 Render<TransparentSquare, Solid, FullyLit>_median -0.0300 -0.0301 143321 139014 143310 138990 Render<TransparentSquare, Solid, FullyLit>_stddev +0.0008 -0.0820 43 43 43 39 Render<TransparentSquare, Solid, FullyLit>_cv +0.0318 -0.0536 0 0 0 0 Render<TransparentSquare, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyDark>_mean -0.0100 -0.0100 134939 133588 134914 133565 Render<TransparentSquare, Solid, FullyDark>_median -0.0106 -0.0108 134964 133526 134948 133497 Render<TransparentSquare, Solid, FullyDark>_stddev +1.7508 +1.8682 99 273 96 276 Render<TransparentSquare, Solid, FullyDark>_cv +1.7786 +1.8972 0 0 0 0 Render<TransparentSquare, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, PartiallyLit>_mean -0.0460 -0.0460 152043 145043 152016 145020 Render<TransparentSquare, Solid, PartiallyLit>_median -0.0463 -0.0461 152012 144978 151964 144962 Render<TransparentSquare, Solid, PartiallyLit>_stddev -0.4453 -0.4334 267 148 266 151 Render<TransparentSquare, Solid, PartiallyLit>_cv -0.4185 -0.4060 0 0 0 0 Render<TransparentSquare, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyLit>_mean -0.0846 -0.0846 181333 165997 181304 165969 Render<TransparentSquare, Transparent, FullyLit>_median -0.0840 -0.0839 181184 165972 181147 165945 Render<TransparentSquare, Transparent, FullyLit>_stddev -0.5808 -0.5755 319 134 320 136 Render<TransparentSquare, Transparent, FullyLit>_cv -0.5421 -0.5362 0 0 0 0 Render<TransparentSquare, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyDark>_mean -0.0250 -0.0250 142232 138672 142208 138648 Render<TransparentSquare, Transparent, FullyDark>_median -0.0245 -0.0245 142144 138663 142128 138639 Render<TransparentSquare, Transparent, FullyDark>_stddev +0.1011 +0.0806 288 317 290 313 Render<TransparentSquare, Transparent, FullyDark>_cv +0.1294 +0.1084 0 0 0 0 Render<TransparentSquare, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, PartiallyLit>_mean +0.0105 +0.0105 205439 207589 205397 207556 Render<TransparentSquare, Transparent, PartiallyLit>_median +0.0106 +0.0107 205402 207575 205355 207558 Render<TransparentSquare, Transparent, PartiallyLit>_stddev -0.4410 -0.3876 182 102 167 102 Render<TransparentSquare, Transparent, PartiallyLit>_cv -0.4468 -0.3940 0 0 0 0 Render<Square, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyLit>_mean -0.0010 -0.0010 11109 11098 11107 11096 Render<Square, Solid, FullyLit>_median -0.0010 -0.0010 11109 11097 11107 11095 Render<Square, Solid, FullyLit>_stddev -0.2265 +0.2791 3 2 2 2 Render<Square, Solid, FullyLit>_cv -0.2257 +0.2804 0 0 0 0 Render<Square, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyDark>_mean +0.0904 +0.0904 8513 9283 8512 9282 Render<Square, Solid, FullyDark>_median +0.0902 +0.0902 8521 9290 8519 9288 Render<Square, Solid, FullyDark>_stddev -0.1884 -0.1616 21 17 21 18 Render<Square, Solid, FullyDark>_cv -0.2557 -0.2311 0 0 0 0 Render<Square, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, PartiallyLit>_mean +0.0038 +0.0038 163661 164289 163632 164259 Render<Square, Solid, PartiallyLit>_median +0.0038 +0.0040 163665 164290 163621 164269 Render<Square, Solid, PartiallyLit>_stddev +0.1746 +0.4412 34 40 28 40 Render<Square, Solid, PartiallyLit>_cv +0.1701 +0.4356 0 0 0 0 Render<Square, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyLit>_mean -0.0029 -0.0029 197906 197340 197876 197304 Render<Square, Transparent, FullyLit>_median -0.0030 -0.0029 197929 197339 197872 197307 Render<Square, Transparent, FullyLit>_stddev -0.5965 -0.7554 61 25 62 15 Render<Square, Transparent, FullyLit>_cv -0.5953 -0.7547 0 0 0 0 Render<Square, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyDark>_mean -0.0163 -0.0163 125659 123607 125641 123588 Render<Square, Transparent, FullyDark>_median -0.0163 -0.0163 125651 123609 125629 123579 Render<Square, Transparent, FullyDark>_stddev -0.7943 -0.8033 180 37 181 36 Render<Square, Transparent, FullyDark>_cv -0.7909 -0.8000 0 0 0 0 Render<Square, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, PartiallyLit>_mean +0.0182 +0.0182 278103 283157 278043 283107 Render<Square, Transparent, PartiallyLit>_median +0.0184 +0.0184 278086 283190 278017 283120 Render<Square, Transparent, PartiallyLit>_stddev +1.6051 +1.5303 81 210 82 209 Render<Square, Transparent, PartiallyLit>_cv +1.5586 +1.4850 0 0 0 0 Render<LeftTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyLit>_mean -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_median -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_stddev -0.4844 -0.6856 1 0 1 0 Render<LeftTrapezoid, Solid, FullyLit>_cv -0.4809 -0.6834 0 0 0 0 Render<LeftTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyDark>_mean +0.3996 +0.3997 5163 7227 5162 7226 Render<LeftTrapezoid, Solid, FullyDark>_median +0.3973 +0.3974 5174 7230 5173 7229 Render<LeftTrapezoid, Solid, FullyDark>_stddev -0.7835 -0.7789 89 19 89 20 Render<LeftTrapezoid, Solid, FullyDark>_cv -0.8453 -0.8420 0 0 0 0 Render<LeftTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, PartiallyLit>_mean -0.1228 -0.1228 50053 43907 50044 43900 Render<LeftTrapezoid, Solid, PartiallyLit>_median -0.1228 -0.1228 50062 43916 50054 43906 Render<LeftTrapezoid, Solid, PartiallyLit>_stddev +1.3916 +1.3800 63 150 64 151 Render<LeftTrapezoid, Solid, PartiallyLit>_cv +1.7263 +1.7131 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyLit>_mean -0.1584 -0.1583 62677 52751 62665 52743 Render<LeftTrapezoid, Transparent, FullyLit>_median -0.1585 -0.1585 62670 52736 62656 52728 Render<LeftTrapezoid, Transparent, FullyLit>_stddev +1.1429 +1.4086 26 55 23 55 Render<LeftTrapezoid, Transparent, FullyLit>_cv +1.5461 +1.8617 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyDark>_mean -0.1929 -0.1929 57688 46558 57679 46551 Render<LeftTrapezoid, Transparent, FullyDark>_median -0.1943 -0.1944 57681 46473 57672 46459 Render<LeftTrapezoid, Transparent, FullyDark>_stddev +2.8190 +2.7914 62 237 63 238 Render<LeftTrapezoid, Transparent, FullyDark>_cv +3.7319 +3.6978 0 0 0 0 Render<LeftTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, PartiallyLit>_mean -0.0054 -0.0054 70694 70313 70682 70301 Render<LeftTrapezoid, Transparent, PartiallyLit>_median -0.0050 -0.0048 70671 70319 70650 70311 Render<LeftTrapezoid, Transparent, PartiallyLit>_stddev -0.7448 -0.7617 163 42 168 40 Render<LeftTrapezoid, Transparent, PartiallyLit>_cv -0.7434 -0.7604 0 0 0 0 Render<RightTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyLit>_mean +0.0123 +0.0123 2985 3022 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_median +0.0123 +0.0123 2985 3021 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_stddev -0.4207 -0.4667 1 0 1 0 Render<RightTrapezoid, Solid, FullyLit>_cv -0.4277 -0.4731 0 0 0 0 Render<RightTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyDark>_mean +0.1105 +0.1105 4894 5435 4893 5434 Render<RightTrapezoid, Solid, FullyDark>_median +0.1083 +0.1082 4902 5433 4901 5432 Render<RightTrapezoid, Solid, FullyDark>_stddev -0.1973 -0.1947 45 37 45 37 Render<RightTrapezoid, Solid, FullyDark>_cv -0.2772 -0.2748 0 0 0 0 Render<RightTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, PartiallyLit>_mean -0.0169 -0.0169 48201 47386 48192 47379 Render<RightTrapezoid, Solid, PartiallyLit>_median -0.0172 -0.0170 48184 47355 48170 47351 Render<RightTrapezoid, Solid, PartiallyLit>_stddev +0.6070 +0.5204 48 78 50 76 Render<RightTrapezoid, Solid, PartiallyLit>_cv +0.6346 +0.5465 0 0 0 0 Render<RightTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyLit>_mean -0.0023 -0.0023 48751 48639 48742 48632 Render<RightTrapezoid, Transparent, FullyLit>_median -0.0020 -0.0018 48751 48654 48738 48651 Render<RightTrapezoid, Transparent, FullyLit>_stddev +2.4354 +2.4427 10 35 11 36 Render<RightTrapezoid, Transparent, FullyLit>_cv +2.4433 +2.4505 0 0 0 0 Render<RightTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyDark>_mean -0.2247 -0.2247 40942 31742 40936 31736 Render<RightTrapezoid, Transparent, FullyDark>_median -0.2241 -0.2240 40904 31739 40895 31734 Render<RightTrapezoid, Transparent, FullyDark>_stddev -0.3455 -0.3546 165 108 167 108 Render<RightTrapezoid, Transparent, FullyDark>_cv -0.1558 -0.1676 0 0 0 0 Render<RightTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, PartiallyLit>_mean -0.0908 -0.0908 74269 67523 74256 67512 Render<RightTrapezoid, Transparent, PartiallyLit>_median -0.0898 -0.0897 74196 67536 74176 67523 Render<RightTrapezoid, Transparent, PartiallyLit>_stddev -0.6590 -0.6568 147 50 146 50 Render<RightTrapezoid, Transparent, PartiallyLit>_cv -0.6250 -0.6225 0 0 0 0 BM_RenderBlackTile_pvalue 0.0539 0.0539 U Test, Repetitions: 10 vs 10 BM_RenderBlackTile_mean -0.0188 -0.0188 125 123 125 123 BM_RenderBlackTile_median -0.0263 -0.0264 126 122 125 122 BM_RenderBlackTile_stddev +1.0907 +1.0966 1 3 1 3 BM_RenderBlackTile_cv +1.1307 +1.1368 0 0 0 0 OVERALL_GEOMEAN -0.0207 -0.0207 0 0 0 0 ```
8 months ago
microTileLen = 10;
size_t blocks = 10;
if (leveltype == DTYPE_TOWN) {
Make `dun_render` a standalone library Does not make `dun_render_benchmark` standalone yet as that will require more untangling. Benchmark is neutral: ``` Benchmark Time CPU Time Old Time New CPU Old CPU New ---------------------------------------------------------------------------------------------------------------------------------------------------------- Render<LeftTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyLit>_mean +0.0119 +0.0120 8377 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_median +0.0119 +0.0119 8376 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_stddev -0.0884 -0.2462 2 1 1 1 Render<LeftTriangle, Solid, FullyLit>_cv -0.0992 -0.2551 0 0 0 0 Render<LeftTriangle, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyDark>_mean +0.0910 +0.0910 21174 23100 21170 23097 Render<LeftTriangle, Solid, FullyDark>_median +0.0869 +0.0869 21183 23023 21179 23019 Render<LeftTriangle, Solid, FullyDark>_stddev -0.1528 -0.1593 267 226 268 225 Render<LeftTriangle, Solid, FullyDark>_cv -0.2234 -0.2294 0 0 0 0 Render<LeftTriangle, Solid, PartiallyLit>_pvalue 0.0013 0.0013 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, PartiallyLit>_mean +0.0065 +0.0065 81168 81698 81151 81680 Render<LeftTriangle, Solid, PartiallyLit>_median +0.0075 +0.0073 81143 81748 81136 81730 Render<LeftTriangle, Solid, PartiallyLit>_stddev +0.8663 +0.8787 167 311 164 307 Render<LeftTriangle, Solid, PartiallyLit>_cv +0.8542 +0.8665 0 0 0 0 Render<LeftTriangle, Transparent, FullyLit>_pvalue 0.0028 0.0017 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyLit>_mean -0.0239 -0.0239 94989 92719 94973 92703 Render<LeftTriangle, Transparent, FullyLit>_median -0.0122 -0.0123 93867 92717 93856 92704 Render<LeftTriangle, Transparent, FullyLit>_stddev -0.9920 -0.9955 2370 19 2368 11 Render<LeftTriangle, Transparent, FullyLit>_cv -0.9918 -0.9954 0 0 0 0 Render<LeftTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyDark>_mean -0.0841 -0.0841 76234 69821 76220 69809 Render<LeftTriangle, Transparent, FullyDark>_median -0.0831 -0.0832 76209 69877 76202 69864 Render<LeftTriangle, Transparent, FullyDark>_stddev -0.4486 -0.4538 441 243 440 241 Render<LeftTriangle, Transparent, FullyDark>_cv -0.3979 -0.4037 0 0 0 0 Render<LeftTriangle, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, PartiallyLit>_mean +0.0022 +0.0021 128812 129091 128792 129067 Render<LeftTriangle, Transparent, PartiallyLit>_median +0.0023 +0.0023 128820 129115 128805 129096 Render<LeftTriangle, Transparent, PartiallyLit>_stddev +0.8757 +0.6866 50 93 53 90 Render<LeftTriangle, Transparent, PartiallyLit>_cv +0.8716 +0.6830 0 0 0 0 Render<RightTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyLit>_mean +0.0057 +0.0057 8521 8570 8520 8569 Render<RightTriangle, Solid, FullyLit>_median +0.0057 +0.0057 8522 8570 8520 8568 Render<RightTriangle, Solid, FullyLit>_stddev -0.1826 -0.0420 1 1 1 1 Render<RightTriangle, Solid, FullyLit>_cv -0.1872 -0.0475 0 0 0 0 Render<RightTriangle, Solid, FullyDark>_pvalue 0.0006 0.0006 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyDark>_mean -0.0303 -0.0303 22678 21991 22675 21987 Render<RightTriangle, Solid, FullyDark>_median -0.0360 -0.0359 22704 21888 22699 21883 Render<RightTriangle, Solid, FullyDark>_stddev +0.4759 +0.4648 195 288 196 287 Render<RightTriangle, Solid, FullyDark>_cv +0.5220 +0.5106 0 0 0 0 Render<RightTriangle, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, PartiallyLit>_mean +0.0338 +0.0338 83355 86170 83341 86157 Render<RightTriangle, Solid, PartiallyLit>_median +0.0347 +0.0348 83248 86140 83230 86126 Render<RightTriangle, Solid, PartiallyLit>_stddev +0.3670 +0.3423 238 326 240 322 Render<RightTriangle, Solid, PartiallyLit>_cv +0.3224 +0.2985 0 0 0 0 Render<RightTriangle, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyLit>_mean -0.0617 -0.0616 102726 96392 102706 96375 Render<RightTriangle, Transparent, FullyLit>_median -0.0598 -0.0597 102521 96394 102498 96375 Render<RightTriangle, Transparent, FullyLit>_stddev -0.9516 -0.9548 456 22 461 21 Render<RightTriangle, Transparent, FullyLit>_cv -0.9485 -0.9518 0 0 0 0 Render<RightTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyDark>_mean -0.1377 -0.1377 84505 72865 84492 72853 Render<RightTriangle, Transparent, FullyDark>_median -0.1374 -0.1374 84339 72748 84323 72740 Render<RightTriangle, Transparent, FullyDark>_stddev -0.2760 -0.2867 526 381 528 377 Render<RightTriangle, Transparent, FullyDark>_cv -0.1604 -0.1727 0 0 0 0 Render<RightTriangle, Transparent, PartiallyLit>_pvalue 0.0036 0.0017 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, PartiallyLit>_mean +0.0010 +0.0010 131672 131808 131649 131784 Render<RightTriangle, Transparent, PartiallyLit>_median +0.0010 +0.0008 131665 131797 131654 131757 Render<RightTriangle, Transparent, PartiallyLit>_stddev -0.0688 -0.0128 81 75 72 71 Render<RightTriangle, Transparent, PartiallyLit>_cv -0.0697 -0.0138 0 0 0 0 Render<TransparentSquare, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyLit>_mean -0.0300 -0.0300 143323 139021 143300 139000 Render<TransparentSquare, Solid, FullyLit>_median -0.0300 -0.0301 143321 139014 143310 138990 Render<TransparentSquare, Solid, FullyLit>_stddev +0.0008 -0.0820 43 43 43 39 Render<TransparentSquare, Solid, FullyLit>_cv +0.0318 -0.0536 0 0 0 0 Render<TransparentSquare, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyDark>_mean -0.0100 -0.0100 134939 133588 134914 133565 Render<TransparentSquare, Solid, FullyDark>_median -0.0106 -0.0108 134964 133526 134948 133497 Render<TransparentSquare, Solid, FullyDark>_stddev +1.7508 +1.8682 99 273 96 276 Render<TransparentSquare, Solid, FullyDark>_cv +1.7786 +1.8972 0 0 0 0 Render<TransparentSquare, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, PartiallyLit>_mean -0.0460 -0.0460 152043 145043 152016 145020 Render<TransparentSquare, Solid, PartiallyLit>_median -0.0463 -0.0461 152012 144978 151964 144962 Render<TransparentSquare, Solid, PartiallyLit>_stddev -0.4453 -0.4334 267 148 266 151 Render<TransparentSquare, Solid, PartiallyLit>_cv -0.4185 -0.4060 0 0 0 0 Render<TransparentSquare, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyLit>_mean -0.0846 -0.0846 181333 165997 181304 165969 Render<TransparentSquare, Transparent, FullyLit>_median -0.0840 -0.0839 181184 165972 181147 165945 Render<TransparentSquare, Transparent, FullyLit>_stddev -0.5808 -0.5755 319 134 320 136 Render<TransparentSquare, Transparent, FullyLit>_cv -0.5421 -0.5362 0 0 0 0 Render<TransparentSquare, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyDark>_mean -0.0250 -0.0250 142232 138672 142208 138648 Render<TransparentSquare, Transparent, FullyDark>_median -0.0245 -0.0245 142144 138663 142128 138639 Render<TransparentSquare, Transparent, FullyDark>_stddev +0.1011 +0.0806 288 317 290 313 Render<TransparentSquare, Transparent, FullyDark>_cv +0.1294 +0.1084 0 0 0 0 Render<TransparentSquare, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, PartiallyLit>_mean +0.0105 +0.0105 205439 207589 205397 207556 Render<TransparentSquare, Transparent, PartiallyLit>_median +0.0106 +0.0107 205402 207575 205355 207558 Render<TransparentSquare, Transparent, PartiallyLit>_stddev -0.4410 -0.3876 182 102 167 102 Render<TransparentSquare, Transparent, PartiallyLit>_cv -0.4468 -0.3940 0 0 0 0 Render<Square, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyLit>_mean -0.0010 -0.0010 11109 11098 11107 11096 Render<Square, Solid, FullyLit>_median -0.0010 -0.0010 11109 11097 11107 11095 Render<Square, Solid, FullyLit>_stddev -0.2265 +0.2791 3 2 2 2 Render<Square, Solid, FullyLit>_cv -0.2257 +0.2804 0 0 0 0 Render<Square, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyDark>_mean +0.0904 +0.0904 8513 9283 8512 9282 Render<Square, Solid, FullyDark>_median +0.0902 +0.0902 8521 9290 8519 9288 Render<Square, Solid, FullyDark>_stddev -0.1884 -0.1616 21 17 21 18 Render<Square, Solid, FullyDark>_cv -0.2557 -0.2311 0 0 0 0 Render<Square, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, PartiallyLit>_mean +0.0038 +0.0038 163661 164289 163632 164259 Render<Square, Solid, PartiallyLit>_median +0.0038 +0.0040 163665 164290 163621 164269 Render<Square, Solid, PartiallyLit>_stddev +0.1746 +0.4412 34 40 28 40 Render<Square, Solid, PartiallyLit>_cv +0.1701 +0.4356 0 0 0 0 Render<Square, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyLit>_mean -0.0029 -0.0029 197906 197340 197876 197304 Render<Square, Transparent, FullyLit>_median -0.0030 -0.0029 197929 197339 197872 197307 Render<Square, Transparent, FullyLit>_stddev -0.5965 -0.7554 61 25 62 15 Render<Square, Transparent, FullyLit>_cv -0.5953 -0.7547 0 0 0 0 Render<Square, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyDark>_mean -0.0163 -0.0163 125659 123607 125641 123588 Render<Square, Transparent, FullyDark>_median -0.0163 -0.0163 125651 123609 125629 123579 Render<Square, Transparent, FullyDark>_stddev -0.7943 -0.8033 180 37 181 36 Render<Square, Transparent, FullyDark>_cv -0.7909 -0.8000 0 0 0 0 Render<Square, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, PartiallyLit>_mean +0.0182 +0.0182 278103 283157 278043 283107 Render<Square, Transparent, PartiallyLit>_median +0.0184 +0.0184 278086 283190 278017 283120 Render<Square, Transparent, PartiallyLit>_stddev +1.6051 +1.5303 81 210 82 209 Render<Square, Transparent, PartiallyLit>_cv +1.5586 +1.4850 0 0 0 0 Render<LeftTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyLit>_mean -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_median -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_stddev -0.4844 -0.6856 1 0 1 0 Render<LeftTrapezoid, Solid, FullyLit>_cv -0.4809 -0.6834 0 0 0 0 Render<LeftTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyDark>_mean +0.3996 +0.3997 5163 7227 5162 7226 Render<LeftTrapezoid, Solid, FullyDark>_median +0.3973 +0.3974 5174 7230 5173 7229 Render<LeftTrapezoid, Solid, FullyDark>_stddev -0.7835 -0.7789 89 19 89 20 Render<LeftTrapezoid, Solid, FullyDark>_cv -0.8453 -0.8420 0 0 0 0 Render<LeftTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, PartiallyLit>_mean -0.1228 -0.1228 50053 43907 50044 43900 Render<LeftTrapezoid, Solid, PartiallyLit>_median -0.1228 -0.1228 50062 43916 50054 43906 Render<LeftTrapezoid, Solid, PartiallyLit>_stddev +1.3916 +1.3800 63 150 64 151 Render<LeftTrapezoid, Solid, PartiallyLit>_cv +1.7263 +1.7131 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyLit>_mean -0.1584 -0.1583 62677 52751 62665 52743 Render<LeftTrapezoid, Transparent, FullyLit>_median -0.1585 -0.1585 62670 52736 62656 52728 Render<LeftTrapezoid, Transparent, FullyLit>_stddev +1.1429 +1.4086 26 55 23 55 Render<LeftTrapezoid, Transparent, FullyLit>_cv +1.5461 +1.8617 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyDark>_mean -0.1929 -0.1929 57688 46558 57679 46551 Render<LeftTrapezoid, Transparent, FullyDark>_median -0.1943 -0.1944 57681 46473 57672 46459 Render<LeftTrapezoid, Transparent, FullyDark>_stddev +2.8190 +2.7914 62 237 63 238 Render<LeftTrapezoid, Transparent, FullyDark>_cv +3.7319 +3.6978 0 0 0 0 Render<LeftTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, PartiallyLit>_mean -0.0054 -0.0054 70694 70313 70682 70301 Render<LeftTrapezoid, Transparent, PartiallyLit>_median -0.0050 -0.0048 70671 70319 70650 70311 Render<LeftTrapezoid, Transparent, PartiallyLit>_stddev -0.7448 -0.7617 163 42 168 40 Render<LeftTrapezoid, Transparent, PartiallyLit>_cv -0.7434 -0.7604 0 0 0 0 Render<RightTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyLit>_mean +0.0123 +0.0123 2985 3022 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_median +0.0123 +0.0123 2985 3021 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_stddev -0.4207 -0.4667 1 0 1 0 Render<RightTrapezoid, Solid, FullyLit>_cv -0.4277 -0.4731 0 0 0 0 Render<RightTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyDark>_mean +0.1105 +0.1105 4894 5435 4893 5434 Render<RightTrapezoid, Solid, FullyDark>_median +0.1083 +0.1082 4902 5433 4901 5432 Render<RightTrapezoid, Solid, FullyDark>_stddev -0.1973 -0.1947 45 37 45 37 Render<RightTrapezoid, Solid, FullyDark>_cv -0.2772 -0.2748 0 0 0 0 Render<RightTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, PartiallyLit>_mean -0.0169 -0.0169 48201 47386 48192 47379 Render<RightTrapezoid, Solid, PartiallyLit>_median -0.0172 -0.0170 48184 47355 48170 47351 Render<RightTrapezoid, Solid, PartiallyLit>_stddev +0.6070 +0.5204 48 78 50 76 Render<RightTrapezoid, Solid, PartiallyLit>_cv +0.6346 +0.5465 0 0 0 0 Render<RightTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyLit>_mean -0.0023 -0.0023 48751 48639 48742 48632 Render<RightTrapezoid, Transparent, FullyLit>_median -0.0020 -0.0018 48751 48654 48738 48651 Render<RightTrapezoid, Transparent, FullyLit>_stddev +2.4354 +2.4427 10 35 11 36 Render<RightTrapezoid, Transparent, FullyLit>_cv +2.4433 +2.4505 0 0 0 0 Render<RightTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyDark>_mean -0.2247 -0.2247 40942 31742 40936 31736 Render<RightTrapezoid, Transparent, FullyDark>_median -0.2241 -0.2240 40904 31739 40895 31734 Render<RightTrapezoid, Transparent, FullyDark>_stddev -0.3455 -0.3546 165 108 167 108 Render<RightTrapezoid, Transparent, FullyDark>_cv -0.1558 -0.1676 0 0 0 0 Render<RightTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, PartiallyLit>_mean -0.0908 -0.0908 74269 67523 74256 67512 Render<RightTrapezoid, Transparent, PartiallyLit>_median -0.0898 -0.0897 74196 67536 74176 67523 Render<RightTrapezoid, Transparent, PartiallyLit>_stddev -0.6590 -0.6568 147 50 146 50 Render<RightTrapezoid, Transparent, PartiallyLit>_cv -0.6250 -0.6225 0 0 0 0 BM_RenderBlackTile_pvalue 0.0539 0.0539 U Test, Repetitions: 10 vs 10 BM_RenderBlackTile_mean -0.0188 -0.0188 125 123 125 123 BM_RenderBlackTile_median -0.0263 -0.0264 126 122 125 122 BM_RenderBlackTile_stddev +1.0907 +1.0966 1 3 1 3 BM_RenderBlackTile_cv +1.1307 +1.1368 0 0 0 0 OVERALL_GEOMEAN -0.0207 -0.0207 0 0 0 0 ```
8 months ago
microTileLen = 16;
blocks = 16;
} else if (leveltype == DTYPE_HELL) {
Make `dun_render` a standalone library Does not make `dun_render_benchmark` standalone yet as that will require more untangling. Benchmark is neutral: ``` Benchmark Time CPU Time Old Time New CPU Old CPU New ---------------------------------------------------------------------------------------------------------------------------------------------------------- Render<LeftTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyLit>_mean +0.0119 +0.0120 8377 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_median +0.0119 +0.0119 8376 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_stddev -0.0884 -0.2462 2 1 1 1 Render<LeftTriangle, Solid, FullyLit>_cv -0.0992 -0.2551 0 0 0 0 Render<LeftTriangle, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyDark>_mean +0.0910 +0.0910 21174 23100 21170 23097 Render<LeftTriangle, Solid, FullyDark>_median +0.0869 +0.0869 21183 23023 21179 23019 Render<LeftTriangle, Solid, FullyDark>_stddev -0.1528 -0.1593 267 226 268 225 Render<LeftTriangle, Solid, FullyDark>_cv -0.2234 -0.2294 0 0 0 0 Render<LeftTriangle, Solid, PartiallyLit>_pvalue 0.0013 0.0013 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, PartiallyLit>_mean +0.0065 +0.0065 81168 81698 81151 81680 Render<LeftTriangle, Solid, PartiallyLit>_median +0.0075 +0.0073 81143 81748 81136 81730 Render<LeftTriangle, Solid, PartiallyLit>_stddev +0.8663 +0.8787 167 311 164 307 Render<LeftTriangle, Solid, PartiallyLit>_cv +0.8542 +0.8665 0 0 0 0 Render<LeftTriangle, Transparent, FullyLit>_pvalue 0.0028 0.0017 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyLit>_mean -0.0239 -0.0239 94989 92719 94973 92703 Render<LeftTriangle, Transparent, FullyLit>_median -0.0122 -0.0123 93867 92717 93856 92704 Render<LeftTriangle, Transparent, FullyLit>_stddev -0.9920 -0.9955 2370 19 2368 11 Render<LeftTriangle, Transparent, FullyLit>_cv -0.9918 -0.9954 0 0 0 0 Render<LeftTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyDark>_mean -0.0841 -0.0841 76234 69821 76220 69809 Render<LeftTriangle, Transparent, FullyDark>_median -0.0831 -0.0832 76209 69877 76202 69864 Render<LeftTriangle, Transparent, FullyDark>_stddev -0.4486 -0.4538 441 243 440 241 Render<LeftTriangle, Transparent, FullyDark>_cv -0.3979 -0.4037 0 0 0 0 Render<LeftTriangle, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, PartiallyLit>_mean +0.0022 +0.0021 128812 129091 128792 129067 Render<LeftTriangle, Transparent, PartiallyLit>_median +0.0023 +0.0023 128820 129115 128805 129096 Render<LeftTriangle, Transparent, PartiallyLit>_stddev +0.8757 +0.6866 50 93 53 90 Render<LeftTriangle, Transparent, PartiallyLit>_cv +0.8716 +0.6830 0 0 0 0 Render<RightTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyLit>_mean +0.0057 +0.0057 8521 8570 8520 8569 Render<RightTriangle, Solid, FullyLit>_median +0.0057 +0.0057 8522 8570 8520 8568 Render<RightTriangle, Solid, FullyLit>_stddev -0.1826 -0.0420 1 1 1 1 Render<RightTriangle, Solid, FullyLit>_cv -0.1872 -0.0475 0 0 0 0 Render<RightTriangle, Solid, FullyDark>_pvalue 0.0006 0.0006 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyDark>_mean -0.0303 -0.0303 22678 21991 22675 21987 Render<RightTriangle, Solid, FullyDark>_median -0.0360 -0.0359 22704 21888 22699 21883 Render<RightTriangle, Solid, FullyDark>_stddev +0.4759 +0.4648 195 288 196 287 Render<RightTriangle, Solid, FullyDark>_cv +0.5220 +0.5106 0 0 0 0 Render<RightTriangle, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, PartiallyLit>_mean +0.0338 +0.0338 83355 86170 83341 86157 Render<RightTriangle, Solid, PartiallyLit>_median +0.0347 +0.0348 83248 86140 83230 86126 Render<RightTriangle, Solid, PartiallyLit>_stddev +0.3670 +0.3423 238 326 240 322 Render<RightTriangle, Solid, PartiallyLit>_cv +0.3224 +0.2985 0 0 0 0 Render<RightTriangle, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyLit>_mean -0.0617 -0.0616 102726 96392 102706 96375 Render<RightTriangle, Transparent, FullyLit>_median -0.0598 -0.0597 102521 96394 102498 96375 Render<RightTriangle, Transparent, FullyLit>_stddev -0.9516 -0.9548 456 22 461 21 Render<RightTriangle, Transparent, FullyLit>_cv -0.9485 -0.9518 0 0 0 0 Render<RightTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyDark>_mean -0.1377 -0.1377 84505 72865 84492 72853 Render<RightTriangle, Transparent, FullyDark>_median -0.1374 -0.1374 84339 72748 84323 72740 Render<RightTriangle, Transparent, FullyDark>_stddev -0.2760 -0.2867 526 381 528 377 Render<RightTriangle, Transparent, FullyDark>_cv -0.1604 -0.1727 0 0 0 0 Render<RightTriangle, Transparent, PartiallyLit>_pvalue 0.0036 0.0017 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, PartiallyLit>_mean +0.0010 +0.0010 131672 131808 131649 131784 Render<RightTriangle, Transparent, PartiallyLit>_median +0.0010 +0.0008 131665 131797 131654 131757 Render<RightTriangle, Transparent, PartiallyLit>_stddev -0.0688 -0.0128 81 75 72 71 Render<RightTriangle, Transparent, PartiallyLit>_cv -0.0697 -0.0138 0 0 0 0 Render<TransparentSquare, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyLit>_mean -0.0300 -0.0300 143323 139021 143300 139000 Render<TransparentSquare, Solid, FullyLit>_median -0.0300 -0.0301 143321 139014 143310 138990 Render<TransparentSquare, Solid, FullyLit>_stddev +0.0008 -0.0820 43 43 43 39 Render<TransparentSquare, Solid, FullyLit>_cv +0.0318 -0.0536 0 0 0 0 Render<TransparentSquare, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyDark>_mean -0.0100 -0.0100 134939 133588 134914 133565 Render<TransparentSquare, Solid, FullyDark>_median -0.0106 -0.0108 134964 133526 134948 133497 Render<TransparentSquare, Solid, FullyDark>_stddev +1.7508 +1.8682 99 273 96 276 Render<TransparentSquare, Solid, FullyDark>_cv +1.7786 +1.8972 0 0 0 0 Render<TransparentSquare, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, PartiallyLit>_mean -0.0460 -0.0460 152043 145043 152016 145020 Render<TransparentSquare, Solid, PartiallyLit>_median -0.0463 -0.0461 152012 144978 151964 144962 Render<TransparentSquare, Solid, PartiallyLit>_stddev -0.4453 -0.4334 267 148 266 151 Render<TransparentSquare, Solid, PartiallyLit>_cv -0.4185 -0.4060 0 0 0 0 Render<TransparentSquare, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyLit>_mean -0.0846 -0.0846 181333 165997 181304 165969 Render<TransparentSquare, Transparent, FullyLit>_median -0.0840 -0.0839 181184 165972 181147 165945 Render<TransparentSquare, Transparent, FullyLit>_stddev -0.5808 -0.5755 319 134 320 136 Render<TransparentSquare, Transparent, FullyLit>_cv -0.5421 -0.5362 0 0 0 0 Render<TransparentSquare, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyDark>_mean -0.0250 -0.0250 142232 138672 142208 138648 Render<TransparentSquare, Transparent, FullyDark>_median -0.0245 -0.0245 142144 138663 142128 138639 Render<TransparentSquare, Transparent, FullyDark>_stddev +0.1011 +0.0806 288 317 290 313 Render<TransparentSquare, Transparent, FullyDark>_cv +0.1294 +0.1084 0 0 0 0 Render<TransparentSquare, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, PartiallyLit>_mean +0.0105 +0.0105 205439 207589 205397 207556 Render<TransparentSquare, Transparent, PartiallyLit>_median +0.0106 +0.0107 205402 207575 205355 207558 Render<TransparentSquare, Transparent, PartiallyLit>_stddev -0.4410 -0.3876 182 102 167 102 Render<TransparentSquare, Transparent, PartiallyLit>_cv -0.4468 -0.3940 0 0 0 0 Render<Square, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyLit>_mean -0.0010 -0.0010 11109 11098 11107 11096 Render<Square, Solid, FullyLit>_median -0.0010 -0.0010 11109 11097 11107 11095 Render<Square, Solid, FullyLit>_stddev -0.2265 +0.2791 3 2 2 2 Render<Square, Solid, FullyLit>_cv -0.2257 +0.2804 0 0 0 0 Render<Square, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyDark>_mean +0.0904 +0.0904 8513 9283 8512 9282 Render<Square, Solid, FullyDark>_median +0.0902 +0.0902 8521 9290 8519 9288 Render<Square, Solid, FullyDark>_stddev -0.1884 -0.1616 21 17 21 18 Render<Square, Solid, FullyDark>_cv -0.2557 -0.2311 0 0 0 0 Render<Square, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, PartiallyLit>_mean +0.0038 +0.0038 163661 164289 163632 164259 Render<Square, Solid, PartiallyLit>_median +0.0038 +0.0040 163665 164290 163621 164269 Render<Square, Solid, PartiallyLit>_stddev +0.1746 +0.4412 34 40 28 40 Render<Square, Solid, PartiallyLit>_cv +0.1701 +0.4356 0 0 0 0 Render<Square, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyLit>_mean -0.0029 -0.0029 197906 197340 197876 197304 Render<Square, Transparent, FullyLit>_median -0.0030 -0.0029 197929 197339 197872 197307 Render<Square, Transparent, FullyLit>_stddev -0.5965 -0.7554 61 25 62 15 Render<Square, Transparent, FullyLit>_cv -0.5953 -0.7547 0 0 0 0 Render<Square, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyDark>_mean -0.0163 -0.0163 125659 123607 125641 123588 Render<Square, Transparent, FullyDark>_median -0.0163 -0.0163 125651 123609 125629 123579 Render<Square, Transparent, FullyDark>_stddev -0.7943 -0.8033 180 37 181 36 Render<Square, Transparent, FullyDark>_cv -0.7909 -0.8000 0 0 0 0 Render<Square, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, PartiallyLit>_mean +0.0182 +0.0182 278103 283157 278043 283107 Render<Square, Transparent, PartiallyLit>_median +0.0184 +0.0184 278086 283190 278017 283120 Render<Square, Transparent, PartiallyLit>_stddev +1.6051 +1.5303 81 210 82 209 Render<Square, Transparent, PartiallyLit>_cv +1.5586 +1.4850 0 0 0 0 Render<LeftTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyLit>_mean -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_median -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_stddev -0.4844 -0.6856 1 0 1 0 Render<LeftTrapezoid, Solid, FullyLit>_cv -0.4809 -0.6834 0 0 0 0 Render<LeftTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyDark>_mean +0.3996 +0.3997 5163 7227 5162 7226 Render<LeftTrapezoid, Solid, FullyDark>_median +0.3973 +0.3974 5174 7230 5173 7229 Render<LeftTrapezoid, Solid, FullyDark>_stddev -0.7835 -0.7789 89 19 89 20 Render<LeftTrapezoid, Solid, FullyDark>_cv -0.8453 -0.8420 0 0 0 0 Render<LeftTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, PartiallyLit>_mean -0.1228 -0.1228 50053 43907 50044 43900 Render<LeftTrapezoid, Solid, PartiallyLit>_median -0.1228 -0.1228 50062 43916 50054 43906 Render<LeftTrapezoid, Solid, PartiallyLit>_stddev +1.3916 +1.3800 63 150 64 151 Render<LeftTrapezoid, Solid, PartiallyLit>_cv +1.7263 +1.7131 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyLit>_mean -0.1584 -0.1583 62677 52751 62665 52743 Render<LeftTrapezoid, Transparent, FullyLit>_median -0.1585 -0.1585 62670 52736 62656 52728 Render<LeftTrapezoid, Transparent, FullyLit>_stddev +1.1429 +1.4086 26 55 23 55 Render<LeftTrapezoid, Transparent, FullyLit>_cv +1.5461 +1.8617 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyDark>_mean -0.1929 -0.1929 57688 46558 57679 46551 Render<LeftTrapezoid, Transparent, FullyDark>_median -0.1943 -0.1944 57681 46473 57672 46459 Render<LeftTrapezoid, Transparent, FullyDark>_stddev +2.8190 +2.7914 62 237 63 238 Render<LeftTrapezoid, Transparent, FullyDark>_cv +3.7319 +3.6978 0 0 0 0 Render<LeftTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, PartiallyLit>_mean -0.0054 -0.0054 70694 70313 70682 70301 Render<LeftTrapezoid, Transparent, PartiallyLit>_median -0.0050 -0.0048 70671 70319 70650 70311 Render<LeftTrapezoid, Transparent, PartiallyLit>_stddev -0.7448 -0.7617 163 42 168 40 Render<LeftTrapezoid, Transparent, PartiallyLit>_cv -0.7434 -0.7604 0 0 0 0 Render<RightTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyLit>_mean +0.0123 +0.0123 2985 3022 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_median +0.0123 +0.0123 2985 3021 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_stddev -0.4207 -0.4667 1 0 1 0 Render<RightTrapezoid, Solid, FullyLit>_cv -0.4277 -0.4731 0 0 0 0 Render<RightTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyDark>_mean +0.1105 +0.1105 4894 5435 4893 5434 Render<RightTrapezoid, Solid, FullyDark>_median +0.1083 +0.1082 4902 5433 4901 5432 Render<RightTrapezoid, Solid, FullyDark>_stddev -0.1973 -0.1947 45 37 45 37 Render<RightTrapezoid, Solid, FullyDark>_cv -0.2772 -0.2748 0 0 0 0 Render<RightTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, PartiallyLit>_mean -0.0169 -0.0169 48201 47386 48192 47379 Render<RightTrapezoid, Solid, PartiallyLit>_median -0.0172 -0.0170 48184 47355 48170 47351 Render<RightTrapezoid, Solid, PartiallyLit>_stddev +0.6070 +0.5204 48 78 50 76 Render<RightTrapezoid, Solid, PartiallyLit>_cv +0.6346 +0.5465 0 0 0 0 Render<RightTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyLit>_mean -0.0023 -0.0023 48751 48639 48742 48632 Render<RightTrapezoid, Transparent, FullyLit>_median -0.0020 -0.0018 48751 48654 48738 48651 Render<RightTrapezoid, Transparent, FullyLit>_stddev +2.4354 +2.4427 10 35 11 36 Render<RightTrapezoid, Transparent, FullyLit>_cv +2.4433 +2.4505 0 0 0 0 Render<RightTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyDark>_mean -0.2247 -0.2247 40942 31742 40936 31736 Render<RightTrapezoid, Transparent, FullyDark>_median -0.2241 -0.2240 40904 31739 40895 31734 Render<RightTrapezoid, Transparent, FullyDark>_stddev -0.3455 -0.3546 165 108 167 108 Render<RightTrapezoid, Transparent, FullyDark>_cv -0.1558 -0.1676 0 0 0 0 Render<RightTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, PartiallyLit>_mean -0.0908 -0.0908 74269 67523 74256 67512 Render<RightTrapezoid, Transparent, PartiallyLit>_median -0.0898 -0.0897 74196 67536 74176 67523 Render<RightTrapezoid, Transparent, PartiallyLit>_stddev -0.6590 -0.6568 147 50 146 50 Render<RightTrapezoid, Transparent, PartiallyLit>_cv -0.6250 -0.6225 0 0 0 0 BM_RenderBlackTile_pvalue 0.0539 0.0539 U Test, Repetitions: 10 vs 10 BM_RenderBlackTile_mean -0.0188 -0.0188 125 123 125 123 BM_RenderBlackTile_median -0.0263 -0.0264 126 122 125 122 BM_RenderBlackTile_stddev +1.0907 +1.0966 1 3 1 3 BM_RenderBlackTile_cv +1.1307 +1.1368 0 0 0 0 OVERALL_GEOMEAN -0.0207 -0.0207 0 0 0 0 ```
8 months ago
microTileLen = 12;
blocks = 16;
}
size_t tileCount;
const std::unique_ptr<uint16_t[]> levelPieces = LoadMinData(tileCount);
ankerl::unordered_dense::map<uint16_t, DunFrameInfo> frameToTypeMap;
frameToTypeMap.reserve(4096);
for (size_t levelPieceId = 0; levelPieceId < tileCount / blocks; levelPieceId++) {
uint16_t *pieces = &levelPieces[blocks * levelPieceId];
for (uint32_t block = 0; block < blocks; block++) {
const LevelCelBlock levelCelBlock { Swap16LE(pieces[blocks - 2 + (block & 1) - (block & 0xE)]) };
DPieceMicros[levelPieceId].mt[block] = levelCelBlock;
if (levelCelBlock.hasValue()) {
if (const auto it = frameToTypeMap.find(levelCelBlock.frame()); it == frameToTypeMap.end()) {
frameToTypeMap.emplace_hint(it, levelCelBlock.frame(),
DunFrameInfo { static_cast<uint8_t>(block), levelCelBlock.type(), SOLData[levelPieceId] });
}
}
}
}
std::vector<std::pair<uint16_t, DunFrameInfo>> frameToTypeList = std::move(frameToTypeMap).extract();
c_sort(frameToTypeList, [](const std::pair<uint16_t, DunFrameInfo> &a, const std::pair<uint16_t, DunFrameInfo> &b) {
return a.first < b.first;
});
Make `dun_render` a standalone library Does not make `dun_render_benchmark` standalone yet as that will require more untangling. Benchmark is neutral: ``` Benchmark Time CPU Time Old Time New CPU Old CPU New ---------------------------------------------------------------------------------------------------------------------------------------------------------- Render<LeftTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyLit>_mean +0.0119 +0.0120 8377 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_median +0.0119 +0.0119 8376 8477 8375 8475 Render<LeftTriangle, Solid, FullyLit>_stddev -0.0884 -0.2462 2 1 1 1 Render<LeftTriangle, Solid, FullyLit>_cv -0.0992 -0.2551 0 0 0 0 Render<LeftTriangle, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, FullyDark>_mean +0.0910 +0.0910 21174 23100 21170 23097 Render<LeftTriangle, Solid, FullyDark>_median +0.0869 +0.0869 21183 23023 21179 23019 Render<LeftTriangle, Solid, FullyDark>_stddev -0.1528 -0.1593 267 226 268 225 Render<LeftTriangle, Solid, FullyDark>_cv -0.2234 -0.2294 0 0 0 0 Render<LeftTriangle, Solid, PartiallyLit>_pvalue 0.0013 0.0013 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Solid, PartiallyLit>_mean +0.0065 +0.0065 81168 81698 81151 81680 Render<LeftTriangle, Solid, PartiallyLit>_median +0.0075 +0.0073 81143 81748 81136 81730 Render<LeftTriangle, Solid, PartiallyLit>_stddev +0.8663 +0.8787 167 311 164 307 Render<LeftTriangle, Solid, PartiallyLit>_cv +0.8542 +0.8665 0 0 0 0 Render<LeftTriangle, Transparent, FullyLit>_pvalue 0.0028 0.0017 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyLit>_mean -0.0239 -0.0239 94989 92719 94973 92703 Render<LeftTriangle, Transparent, FullyLit>_median -0.0122 -0.0123 93867 92717 93856 92704 Render<LeftTriangle, Transparent, FullyLit>_stddev -0.9920 -0.9955 2370 19 2368 11 Render<LeftTriangle, Transparent, FullyLit>_cv -0.9918 -0.9954 0 0 0 0 Render<LeftTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, FullyDark>_mean -0.0841 -0.0841 76234 69821 76220 69809 Render<LeftTriangle, Transparent, FullyDark>_median -0.0831 -0.0832 76209 69877 76202 69864 Render<LeftTriangle, Transparent, FullyDark>_stddev -0.4486 -0.4538 441 243 440 241 Render<LeftTriangle, Transparent, FullyDark>_cv -0.3979 -0.4037 0 0 0 0 Render<LeftTriangle, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTriangle, Transparent, PartiallyLit>_mean +0.0022 +0.0021 128812 129091 128792 129067 Render<LeftTriangle, Transparent, PartiallyLit>_median +0.0023 +0.0023 128820 129115 128805 129096 Render<LeftTriangle, Transparent, PartiallyLit>_stddev +0.8757 +0.6866 50 93 53 90 Render<LeftTriangle, Transparent, PartiallyLit>_cv +0.8716 +0.6830 0 0 0 0 Render<RightTriangle, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyLit>_mean +0.0057 +0.0057 8521 8570 8520 8569 Render<RightTriangle, Solid, FullyLit>_median +0.0057 +0.0057 8522 8570 8520 8568 Render<RightTriangle, Solid, FullyLit>_stddev -0.1826 -0.0420 1 1 1 1 Render<RightTriangle, Solid, FullyLit>_cv -0.1872 -0.0475 0 0 0 0 Render<RightTriangle, Solid, FullyDark>_pvalue 0.0006 0.0006 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, FullyDark>_mean -0.0303 -0.0303 22678 21991 22675 21987 Render<RightTriangle, Solid, FullyDark>_median -0.0360 -0.0359 22704 21888 22699 21883 Render<RightTriangle, Solid, FullyDark>_stddev +0.4759 +0.4648 195 288 196 287 Render<RightTriangle, Solid, FullyDark>_cv +0.5220 +0.5106 0 0 0 0 Render<RightTriangle, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Solid, PartiallyLit>_mean +0.0338 +0.0338 83355 86170 83341 86157 Render<RightTriangle, Solid, PartiallyLit>_median +0.0347 +0.0348 83248 86140 83230 86126 Render<RightTriangle, Solid, PartiallyLit>_stddev +0.3670 +0.3423 238 326 240 322 Render<RightTriangle, Solid, PartiallyLit>_cv +0.3224 +0.2985 0 0 0 0 Render<RightTriangle, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyLit>_mean -0.0617 -0.0616 102726 96392 102706 96375 Render<RightTriangle, Transparent, FullyLit>_median -0.0598 -0.0597 102521 96394 102498 96375 Render<RightTriangle, Transparent, FullyLit>_stddev -0.9516 -0.9548 456 22 461 21 Render<RightTriangle, Transparent, FullyLit>_cv -0.9485 -0.9518 0 0 0 0 Render<RightTriangle, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, FullyDark>_mean -0.1377 -0.1377 84505 72865 84492 72853 Render<RightTriangle, Transparent, FullyDark>_median -0.1374 -0.1374 84339 72748 84323 72740 Render<RightTriangle, Transparent, FullyDark>_stddev -0.2760 -0.2867 526 381 528 377 Render<RightTriangle, Transparent, FullyDark>_cv -0.1604 -0.1727 0 0 0 0 Render<RightTriangle, Transparent, PartiallyLit>_pvalue 0.0036 0.0017 U Test, Repetitions: 10 vs 10 Render<RightTriangle, Transparent, PartiallyLit>_mean +0.0010 +0.0010 131672 131808 131649 131784 Render<RightTriangle, Transparent, PartiallyLit>_median +0.0010 +0.0008 131665 131797 131654 131757 Render<RightTriangle, Transparent, PartiallyLit>_stddev -0.0688 -0.0128 81 75 72 71 Render<RightTriangle, Transparent, PartiallyLit>_cv -0.0697 -0.0138 0 0 0 0 Render<TransparentSquare, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyLit>_mean -0.0300 -0.0300 143323 139021 143300 139000 Render<TransparentSquare, Solid, FullyLit>_median -0.0300 -0.0301 143321 139014 143310 138990 Render<TransparentSquare, Solid, FullyLit>_stddev +0.0008 -0.0820 43 43 43 39 Render<TransparentSquare, Solid, FullyLit>_cv +0.0318 -0.0536 0 0 0 0 Render<TransparentSquare, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, FullyDark>_mean -0.0100 -0.0100 134939 133588 134914 133565 Render<TransparentSquare, Solid, FullyDark>_median -0.0106 -0.0108 134964 133526 134948 133497 Render<TransparentSquare, Solid, FullyDark>_stddev +1.7508 +1.8682 99 273 96 276 Render<TransparentSquare, Solid, FullyDark>_cv +1.7786 +1.8972 0 0 0 0 Render<TransparentSquare, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Solid, PartiallyLit>_mean -0.0460 -0.0460 152043 145043 152016 145020 Render<TransparentSquare, Solid, PartiallyLit>_median -0.0463 -0.0461 152012 144978 151964 144962 Render<TransparentSquare, Solid, PartiallyLit>_stddev -0.4453 -0.4334 267 148 266 151 Render<TransparentSquare, Solid, PartiallyLit>_cv -0.4185 -0.4060 0 0 0 0 Render<TransparentSquare, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyLit>_mean -0.0846 -0.0846 181333 165997 181304 165969 Render<TransparentSquare, Transparent, FullyLit>_median -0.0840 -0.0839 181184 165972 181147 165945 Render<TransparentSquare, Transparent, FullyLit>_stddev -0.5808 -0.5755 319 134 320 136 Render<TransparentSquare, Transparent, FullyLit>_cv -0.5421 -0.5362 0 0 0 0 Render<TransparentSquare, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, FullyDark>_mean -0.0250 -0.0250 142232 138672 142208 138648 Render<TransparentSquare, Transparent, FullyDark>_median -0.0245 -0.0245 142144 138663 142128 138639 Render<TransparentSquare, Transparent, FullyDark>_stddev +0.1011 +0.0806 288 317 290 313 Render<TransparentSquare, Transparent, FullyDark>_cv +0.1294 +0.1084 0 0 0 0 Render<TransparentSquare, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<TransparentSquare, Transparent, PartiallyLit>_mean +0.0105 +0.0105 205439 207589 205397 207556 Render<TransparentSquare, Transparent, PartiallyLit>_median +0.0106 +0.0107 205402 207575 205355 207558 Render<TransparentSquare, Transparent, PartiallyLit>_stddev -0.4410 -0.3876 182 102 167 102 Render<TransparentSquare, Transparent, PartiallyLit>_cv -0.4468 -0.3940 0 0 0 0 Render<Square, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyLit>_mean -0.0010 -0.0010 11109 11098 11107 11096 Render<Square, Solid, FullyLit>_median -0.0010 -0.0010 11109 11097 11107 11095 Render<Square, Solid, FullyLit>_stddev -0.2265 +0.2791 3 2 2 2 Render<Square, Solid, FullyLit>_cv -0.2257 +0.2804 0 0 0 0 Render<Square, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, FullyDark>_mean +0.0904 +0.0904 8513 9283 8512 9282 Render<Square, Solid, FullyDark>_median +0.0902 +0.0902 8521 9290 8519 9288 Render<Square, Solid, FullyDark>_stddev -0.1884 -0.1616 21 17 21 18 Render<Square, Solid, FullyDark>_cv -0.2557 -0.2311 0 0 0 0 Render<Square, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Solid, PartiallyLit>_mean +0.0038 +0.0038 163661 164289 163632 164259 Render<Square, Solid, PartiallyLit>_median +0.0038 +0.0040 163665 164290 163621 164269 Render<Square, Solid, PartiallyLit>_stddev +0.1746 +0.4412 34 40 28 40 Render<Square, Solid, PartiallyLit>_cv +0.1701 +0.4356 0 0 0 0 Render<Square, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyLit>_mean -0.0029 -0.0029 197906 197340 197876 197304 Render<Square, Transparent, FullyLit>_median -0.0030 -0.0029 197929 197339 197872 197307 Render<Square, Transparent, FullyLit>_stddev -0.5965 -0.7554 61 25 62 15 Render<Square, Transparent, FullyLit>_cv -0.5953 -0.7547 0 0 0 0 Render<Square, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, FullyDark>_mean -0.0163 -0.0163 125659 123607 125641 123588 Render<Square, Transparent, FullyDark>_median -0.0163 -0.0163 125651 123609 125629 123579 Render<Square, Transparent, FullyDark>_stddev -0.7943 -0.8033 180 37 181 36 Render<Square, Transparent, FullyDark>_cv -0.7909 -0.8000 0 0 0 0 Render<Square, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<Square, Transparent, PartiallyLit>_mean +0.0182 +0.0182 278103 283157 278043 283107 Render<Square, Transparent, PartiallyLit>_median +0.0184 +0.0184 278086 283190 278017 283120 Render<Square, Transparent, PartiallyLit>_stddev +1.6051 +1.5303 81 210 82 209 Render<Square, Transparent, PartiallyLit>_cv +1.5586 +1.4850 0 0 0 0 Render<LeftTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyLit>_mean -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_median -0.0068 -0.0068 3299 3276 3298 3276 Render<LeftTrapezoid, Solid, FullyLit>_stddev -0.4844 -0.6856 1 0 1 0 Render<LeftTrapezoid, Solid, FullyLit>_cv -0.4809 -0.6834 0 0 0 0 Render<LeftTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, FullyDark>_mean +0.3996 +0.3997 5163 7227 5162 7226 Render<LeftTrapezoid, Solid, FullyDark>_median +0.3973 +0.3974 5174 7230 5173 7229 Render<LeftTrapezoid, Solid, FullyDark>_stddev -0.7835 -0.7789 89 19 89 20 Render<LeftTrapezoid, Solid, FullyDark>_cv -0.8453 -0.8420 0 0 0 0 Render<LeftTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Solid, PartiallyLit>_mean -0.1228 -0.1228 50053 43907 50044 43900 Render<LeftTrapezoid, Solid, PartiallyLit>_median -0.1228 -0.1228 50062 43916 50054 43906 Render<LeftTrapezoid, Solid, PartiallyLit>_stddev +1.3916 +1.3800 63 150 64 151 Render<LeftTrapezoid, Solid, PartiallyLit>_cv +1.7263 +1.7131 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyLit>_mean -0.1584 -0.1583 62677 52751 62665 52743 Render<LeftTrapezoid, Transparent, FullyLit>_median -0.1585 -0.1585 62670 52736 62656 52728 Render<LeftTrapezoid, Transparent, FullyLit>_stddev +1.1429 +1.4086 26 55 23 55 Render<LeftTrapezoid, Transparent, FullyLit>_cv +1.5461 +1.8617 0 0 0 0 Render<LeftTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, FullyDark>_mean -0.1929 -0.1929 57688 46558 57679 46551 Render<LeftTrapezoid, Transparent, FullyDark>_median -0.1943 -0.1944 57681 46473 57672 46459 Render<LeftTrapezoid, Transparent, FullyDark>_stddev +2.8190 +2.7914 62 237 63 238 Render<LeftTrapezoid, Transparent, FullyDark>_cv +3.7319 +3.6978 0 0 0 0 Render<LeftTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<LeftTrapezoid, Transparent, PartiallyLit>_mean -0.0054 -0.0054 70694 70313 70682 70301 Render<LeftTrapezoid, Transparent, PartiallyLit>_median -0.0050 -0.0048 70671 70319 70650 70311 Render<LeftTrapezoid, Transparent, PartiallyLit>_stddev -0.7448 -0.7617 163 42 168 40 Render<LeftTrapezoid, Transparent, PartiallyLit>_cv -0.7434 -0.7604 0 0 0 0 Render<RightTrapezoid, Solid, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyLit>_mean +0.0123 +0.0123 2985 3022 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_median +0.0123 +0.0123 2985 3021 2984 3021 Render<RightTrapezoid, Solid, FullyLit>_stddev -0.4207 -0.4667 1 0 1 0 Render<RightTrapezoid, Solid, FullyLit>_cv -0.4277 -0.4731 0 0 0 0 Render<RightTrapezoid, Solid, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, FullyDark>_mean +0.1105 +0.1105 4894 5435 4893 5434 Render<RightTrapezoid, Solid, FullyDark>_median +0.1083 +0.1082 4902 5433 4901 5432 Render<RightTrapezoid, Solid, FullyDark>_stddev -0.1973 -0.1947 45 37 45 37 Render<RightTrapezoid, Solid, FullyDark>_cv -0.2772 -0.2748 0 0 0 0 Render<RightTrapezoid, Solid, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Solid, PartiallyLit>_mean -0.0169 -0.0169 48201 47386 48192 47379 Render<RightTrapezoid, Solid, PartiallyLit>_median -0.0172 -0.0170 48184 47355 48170 47351 Render<RightTrapezoid, Solid, PartiallyLit>_stddev +0.6070 +0.5204 48 78 50 76 Render<RightTrapezoid, Solid, PartiallyLit>_cv +0.6346 +0.5465 0 0 0 0 Render<RightTrapezoid, Transparent, FullyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyLit>_mean -0.0023 -0.0023 48751 48639 48742 48632 Render<RightTrapezoid, Transparent, FullyLit>_median -0.0020 -0.0018 48751 48654 48738 48651 Render<RightTrapezoid, Transparent, FullyLit>_stddev +2.4354 +2.4427 10 35 11 36 Render<RightTrapezoid, Transparent, FullyLit>_cv +2.4433 +2.4505 0 0 0 0 Render<RightTrapezoid, Transparent, FullyDark>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, FullyDark>_mean -0.2247 -0.2247 40942 31742 40936 31736 Render<RightTrapezoid, Transparent, FullyDark>_median -0.2241 -0.2240 40904 31739 40895 31734 Render<RightTrapezoid, Transparent, FullyDark>_stddev -0.3455 -0.3546 165 108 167 108 Render<RightTrapezoid, Transparent, FullyDark>_cv -0.1558 -0.1676 0 0 0 0 Render<RightTrapezoid, Transparent, PartiallyLit>_pvalue 0.0002 0.0002 U Test, Repetitions: 10 vs 10 Render<RightTrapezoid, Transparent, PartiallyLit>_mean -0.0908 -0.0908 74269 67523 74256 67512 Render<RightTrapezoid, Transparent, PartiallyLit>_median -0.0898 -0.0897 74196 67536 74176 67523 Render<RightTrapezoid, Transparent, PartiallyLit>_stddev -0.6590 -0.6568 147 50 146 50 Render<RightTrapezoid, Transparent, PartiallyLit>_cv -0.6250 -0.6225 0 0 0 0 BM_RenderBlackTile_pvalue 0.0539 0.0539 U Test, Repetitions: 10 vs 10 BM_RenderBlackTile_mean -0.0188 -0.0188 125 123 125 123 BM_RenderBlackTile_median -0.0263 -0.0264 126 122 125 122 BM_RenderBlackTile_stddev +1.0907 +1.0966 1 3 1 3 BM_RenderBlackTile_cv +1.1307 +1.1368 0 0 0 0 OVERALL_GEOMEAN -0.0207 -0.0207 0 0 0 0 ```
8 months ago
ReencodeDungeonCels(dungeonCels, frameToTypeList);
std::vector<std::pair<uint16_t, uint16_t>> celBlockAdjustments = ComputeCelBlockAdjustments(frameToTypeList);
if (celBlockAdjustments.size() == 0) return;
for (size_t levelPieceId = 0; levelPieceId < tileCount / blocks; levelPieceId++) {
for (uint32_t block = 0; block < blocks; block++) {
LevelCelBlock &levelCelBlock = DPieceMicros[levelPieceId].mt[block];
const uint16_t frame = levelCelBlock.frame();
const auto pair = std::make_pair(frame, frame);
const auto it = std::upper_bound(celBlockAdjustments.begin(), celBlockAdjustments.end(), pair,
[](std::pair<uint16_t, uint16_t> p1, std::pair<uint16_t, uint16_t> p2) { return p1.first < p2.first; });
if (it != celBlockAdjustments.end()) {
levelCelBlock.data -= it->second;
}
}
}
}
void DRLG_InitTrans()
{
memset(dTransVal, 0, sizeof(dTransVal));
TransList = {}; // TODO duplicate reset in InitLighting()
TransVal = 1;
}
void DRLG_RectTrans(WorldTileRectangle area)
{
const WorldTilePosition position = area.position;
const WorldTileSize size = area.size;
for (int j = position.y; j <= position.y + size.height; j++) {
for (int i = position.x; i <= position.x + size.width; i++) {
dTransVal[i][j] = TransVal;
}
}
TransVal++;
}
void DRLG_MRectTrans(WorldTileRectangle area)
{
DRLG_RectTrans({ area.position.megaToWorld() + WorldTileDisplacement { 1, 1 }, area.size * 2 - 1 });
}
void DRLG_MRectTrans(WorldTilePosition origin, WorldTilePosition extent)
{
DRLG_MRectTrans({ origin, WorldTileSize(extent.x - origin.x, extent.y - origin.y) });
}
void DRLG_CopyTrans(int sx, int sy, int dx, int dy)
{
dTransVal[dx][dy] = dTransVal[sx][sy];
}
void LoadTransparency(const uint16_t *dunData)
{
WorldTileSize size = GetDunSize(dunData);
const int layer2Offset = 2 + size.width * size.height;
// The rest of the layers are at dPiece scale
size *= static_cast<WorldTileCoord>(2);
const uint16_t *transparentLayer = &dunData[layer2Offset + size.width * size.height * 3];
for (WorldTileCoord j = 0; j < size.height; j++) {
for (WorldTileCoord i = 0; i < size.width; i++) {
dTransVal[16 + i][16 + j] = static_cast<int8_t>(Swap16LE(*transparentLayer));
transparentLayer++;
}
}
}
void LoadDungeonBase(const char *path, Point spawn, int floorId, int dirtId)
{
ViewPosition = spawn;
InitGlobals();
memset(dungeon, dirtId, sizeof(dungeon));
auto dunData = LoadFileInMem<uint16_t>(path);
PlaceDunTiles(dunData.get(), { 0, 0 }, floorId);
LoadTransparency(dunData.get());
SetMapMonsters(dunData.get(), Point(0, 0).megaToWorld());
InitAllMonsterGFX();
SetMapObjects(dunData.get(), 0, 0);
}
void Make_SetPC(WorldTileRectangle area)
{
const WorldTilePosition position = area.position.megaToWorld();
const WorldTileSize size = area.size * 2;
for (unsigned j = 0; j < size.height; j++) {
for (unsigned i = 0; i < size.width; i++) {
dFlags[position.x + i][position.y + j] |= DungeonFlag::Populated;
}
}
}
std::optional<Point> PlaceMiniSet(const Miniset &miniset, int tries, bool drlg1Quirk)
{
const int sw = miniset.size.width;
const int sh = miniset.size.height;
Point position { GenerateRnd(DMAXX - sw), GenerateRnd(DMAXY - sh) };
for (int i = 0; i < tries; i++, position.x++) {
if (position.x == DMAXX - sw) {
position.x = 0;
position.y++;
if (position.y == DMAXY - sh) {
position.y = 0;
}
}
// Limit the position of SetPieces for compatibility with Diablo bug
if (drlg1Quirk) {
bool valid = true;
if (position.x <= 12) {
position.x++;
valid = false;
}
if (position.y <= 12) {
position.y++;
valid = false;
}
if (!valid) {
continue;
}
}
if (SetPieceRoom.contains(position))
continue;
if (!miniset.matches(position))
continue;
miniset.place(position);
return position;
}
return {};
}
void PlaceDunTiles(const uint16_t *dunData, Point position, int floorId)
{
const WorldTileSize size = GetDunSize(dunData);
const uint16_t *tileLayer = &dunData[2];
for (WorldTileCoord j = 0; j < size.height; j++) {
for (WorldTileCoord i = 0; i < size.width; i++) {
auto tileId = static_cast<uint8_t>(Swap16LE(tileLayer[j * size.width + i]));
if (tileId != 0) {
dungeon[position.x + i][position.y + j] = tileId;
Protected.set(position.x + i, position.y + j);
} else if (floorId != 0) {
dungeon[position.x + i][position.y + j] = floorId;
}
}
}
}
void DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, bool rndSize)
{
themeCount = 0;
memset(themeLoc, 0, sizeof(*themeLoc));
for (WorldTileCoord j = 0; j < DMAXY; j++) {
for (WorldTileCoord i = 0; i < DMAXX; i++) {
if (dungeon[i][j] == floor && FlipCoin(freq)) {
std::optional<WorldTileSize> themeSize = GetSizeForThemeRoom(floor, { i, j }, minSize, maxSize);
if (!themeSize)
continue;
if (rndSize) {
const int min = minSize - 2;
const int max = maxSize - 2;
themeSize->width = min + GenerateRnd(GenerateRnd(themeSize->width - min + 1));
if (themeSize->width < min || themeSize->width > max)
themeSize->width = min;
themeSize->height = min + GenerateRnd(GenerateRnd(themeSize->height - min + 1));
if (themeSize->height < min || themeSize->height > max)
themeSize->height = min;
}
THEME_LOC &theme = themeLoc[themeCount];
theme.room = { WorldTilePosition { i, j } + Direction::South, *themeSize };
if (IsAnyOf(leveltype, DTYPE_CAVES, DTYPE_NEST)) {
DRLG_RectTrans({ (theme.room.position + Direction::South).megaToWorld(), theme.room.size * 2 - 5 });
} else {
DRLG_MRectTrans({ theme.room.position, theme.room.size - 1 });
}
theme.ttval = TransVal - 1;
CreateThemeRoom(themeCount);
themeCount++;
}
}
}
} // namespace
void DRLG_HoldThemeRooms()
{
for (int i = 0; i < themeCount; i++) {
for (int y = themeLoc[i].room.position.y; y < themeLoc[i].room.position.y + themeLoc[i].room.size.height - 1; y++) {
for (int x = themeLoc[i].room.position.x; x < themeLoc[i].room.position.x + themeLoc[i].room.size.width - 1; x++) {
const int xx = 2 * x + 16;
const int yy = 2 * y + 16;
dFlags[xx][yy] |= DungeonFlag::Populated;
dFlags[xx + 1][yy] |= DungeonFlag::Populated;
dFlags[xx][yy + 1] |= DungeonFlag::Populated;
dFlags[xx + 1][yy + 1] |= DungeonFlag::Populated;
}
}
}
}
WorldTileSize GetDunSize(const uint16_t *dunData)
{
return WorldTileSize(static_cast<WorldTileCoord>(Swap16LE(dunData[0])), static_cast<WorldTileCoord>(Swap16LE(dunData[1])));
}
void DRLG_LPass3(int lv)
{
{
const MegaTile mega = pMegaTiles[lv];
const int v1 = Swap16LE(mega.micro1);
const int v2 = Swap16LE(mega.micro2);
const int v3 = Swap16LE(mega.micro3);
const int v4 = Swap16LE(mega.micro4);
for (int j = 0; j < MAXDUNY; j += 2) {
for (int i = 0; i < MAXDUNX; i += 2) {
dPiece[i + 0][j + 0] = v1;
dPiece[i + 1][j + 0] = v2;
dPiece[i + 0][j + 1] = v3;
dPiece[i + 1][j + 1] = v4;
}
}
}
int yy = 16;
for (int j = 0; j < DMAXY; j++) {
int xx = 16;
for (int i = 0; i < DMAXX; i++) { // NOLINT(modernize-loop-convert)
const int tileId = dungeon[i][j] - 1;
const MegaTile mega = pMegaTiles[tileId];
dPiece[xx + 0][yy + 0] = Swap16LE(mega.micro1);
dPiece[xx + 1][yy + 0] = Swap16LE(mega.micro2);
dPiece[xx + 0][yy + 1] = Swap16LE(mega.micro3);
dPiece[xx + 1][yy + 1] = Swap16LE(mega.micro4);
xx += 2;
}
yy += 2;
}
}
bool IsNearThemeRoom(WorldTilePosition testPosition)
{
for (int i = 0; i < themeCount; i++) {
if (WorldTileRectangle(themeLoc[i].room.position - WorldTileDisplacement { 2 }, themeLoc[i].room.size + 5).contains(testPosition))
return true;
}
return false;
}
void InitLevels()
{
currlevel = 0;
leveltype = DTYPE_TOWN;
setlevel = false;
}
void FloodTransparencyValues(uint8_t floorID)
{
int yy = 16;
for (int j = 0; j < DMAXY; j++) {
int xx = 16;
for (int i = 0; i < DMAXX; i++) {
if (dungeon[i][j] == floorID && dTransVal[xx][yy] == 0) {
FindTransparencyValues({ xx, yy }, floorID);
TransVal++;
}
xx += 2;
}
yy += 2;
}
}
tl::expected<dungeon_type, std::string> ParseDungeonType(std::string_view value)
{
if (value.empty()) return DTYPE_NONE;
if (value == "DTYPE_TOWN") return DTYPE_TOWN;
if (value == "DTYPE_CATHEDRAL") return DTYPE_CATHEDRAL;
if (value == "DTYPE_CATACOMBS") return DTYPE_CATACOMBS;
if (value == "DTYPE_CAVES") return DTYPE_CAVES;
if (value == "DTYPE_HELL") return DTYPE_HELL;
if (value == "DTYPE_NEST") return DTYPE_NEST;
if (value == "DTYPE_CRYPT") return DTYPE_CRYPT;
return tl::make_unexpected("Unknown enum value");
}
tl::expected<_setlevels, std::string> ParseSetLevel(std::string_view value)
{
const std::optional<_setlevels> enumValueOpt = magic_enum::enum_cast<_setlevels>(value);
if (enumValueOpt.has_value()) {
return enumValueOpt.value();
}
return tl::make_unexpected("Unknown enum value");
}
} // namespace devilution