Skip to content
Permalink
Browse files

Merge remote-tracking branch 'origin/master' into polybackend

  • Loading branch information...
dpjudas committed Jun 23, 2019
2 parents 82ebcc4 + 841a69d commit 706bc0b7c64c4f2d5f03a4e25eb5db61f716ebf9
Showing with 199 additions and 86 deletions.
  1. +6 −3 .appveyor.yml
  2. +24 −11 .travis.yml
  3. +2 −2 CMakeLists.txt
  4. +4 −4 specs/udmf_zdoom.txt
  5. +1 −1 src/doomdata.h
  6. +30 −3 src/g_level.cpp
  7. +0 −3 src/g_shared/dthinker.h
  8. +2 −0 src/gamedata/g_mapinfo.cpp
  9. +3 −3 src/gamedata/g_mapinfo.h
  10. +1 −1 src/gamedata/info.h
  11. +5 −11 src/gamedata/umapinfo.cpp
  12. +2 −1 src/menu/messagebox.cpp
  13. +2 −2 src/r_data/models/models.cpp
  14. +2 −10 src/rendering/gl/renderer/gl_postprocess.cpp
  15. +1 −1 src/rendering/hwrenderer/data/hw_viewpointbuffer.cpp
  16. +17 −0 src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp
  17. +4 −0 src/rendering/hwrenderer/postprocessing/hw_postprocess.h
  18. +4 −3 src/rendering/hwrenderer/scene/hw_drawinfo.cpp
  19. +3 −1 src/rendering/hwrenderer/scene/hw_viewpointuniforms.h
  20. +2 −10 src/rendering/vulkan/renderer/vk_postprocess.cpp
  21. +20 −7 src/rendering/vulkan/renderer/vk_renderstate.cpp
  22. +1 −0 src/rendering/vulkan/renderer/vk_renderstate.h
  23. +2 −0 src/rendering/vulkan/textures/vk_imagetransition.h
  24. +17 −2 src/scripting/vm/jitintern.h
  25. +1 −1 src/win32/i_crash.cpp
  26. +1 −1 src/win32/i_main.cpp
  27. +1 −0 wadsrc/static/compatibility.txt
  28. +1 −0 wadsrc/static/mapinfo/chex.txt
  29. +4 −0 wadsrc/static/mapinfo/doom1.txt
  30. +7 −0 wadsrc/static/mapinfo/doom2.txt
  31. +1 −0 wadsrc/static/mapinfo/doom2bfg.txt
  32. +5 −0 wadsrc/static/mapinfo/heretic.txt
  33. +6 −0 wadsrc/static/mapinfo/plutonia.txt
  34. +6 −0 wadsrc/static/mapinfo/tnt.txt
  35. +3 −1 wadsrc/static/newconsolefont.hex
  36. +2 −0 wadsrc/static/shaders/glsl/fxaa.fp
  37. +1 −1 wadsrc/static/zscript/actors/doom/bossbrain.zs
  38. +1 −1 wadsrc/static/zscript/actors/strife/entityboss.zs
  39. +1 −1 wadsrc/static/zscript/actors/strife/programmer.zs
  40. +2 −0 wadsrc/static/zscript/base.zs
  41. +1 −1 wadsrc/static/zscript/ui/menu/search/menu.zs
@@ -8,21 +8,24 @@ clone_depth: 10

image:
- Visual Studio 2019
- Visual Studio 2015

environment:
matrix:
- ARCH: x64
CONFIG: Release
- ARCH: Win32
CONFIG: Release
- ARCH: x64
CONFIG: Debug

build_script:
- md build
- cd build
- cmake -A %ARCH% -DPK3_QUIET_ZIPDIR=YES ..
- cmake --build . --config Release -- -maxcpucount -verbosity:minimal
- cmake --build . --config %CONFIG% -- -maxcpucount -verbosity:minimal

after_build:
- set OUTPUT_DIR=%APPVEYOR_BUILD_FOLDER%\build\Release\
- set OUTPUT_DIR=%APPVEYOR_BUILD_FOLDER%\build\%CONFIG%\
- 7z a ..\gzdoom.zip "%OUTPUT_DIR%gzdoom.exe" "%OUTPUT_DIR%*.pk3"

artifacts:
@@ -20,6 +20,14 @@ matrix:
env:
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"

- os: windows
env:
- CMAKE_OPTIONS="-A Win32"

- os: windows
env:
- CMAKE_OPTIONS="-A x64"

- os: linux
compiler: gcc
env:
@@ -86,18 +94,31 @@ matrix:
- libsdl2-dev
- libgtk-3-dev

- os: linux
compiler: gcc
env:
- GCC_VERSION=9
- CMAKE_OPTIONS="-DCMAKE_CXX_FLAGS=-Wno-implicit-fallthrough"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- libsdl2-dev

- os: linux
compiler: clang
env:
- CLANG_VERSION=7
- CLANG_VERSION=8
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=MinSizeRel -DDYN_OPENAL=NO -DDYN_SNDFILE=NO -DDYN_MPG123=NO -DDYN_FLUIDSYNTH=NO"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
- llvm-toolchain-xenial-8
packages:
- clang-7
- clang-8
- libsdl2-dev
- libgme-dev
- libopenal-dev
@@ -106,14 +127,6 @@ matrix:
- libfluidsynth-dev
- libgtk-3-dev

- os: windows
env:
- CMAKE_OPTIONS="-A Win32"

- os: windows
env:
- CMAKE_OPTIONS="-A x64"

before_install:
- if [ -n "$GCC_VERSION" ]; then export CC="gcc-${GCC_VERSION}" CXX="g++-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CC="clang-${CLANG_VERSION}" CXX="clang++-${CLANG_VERSION}"; fi
@@ -182,9 +182,9 @@ if( MSVC )
# Function-level linking
# Disable run-time type information
if ( HAVE_VULKAN )
set( ALL_C_FLAGS "/GF /Gy /GR- /DHAVE_VULKAN" )
set( ALL_C_FLAGS "/GF /Gy /GR- /permissive- /DHAVE_VULKAN" )
else()
set( ALL_C_FLAGS "/GF /Gy /GR-" )
set( ALL_C_FLAGS "/GF /Gy /GR- /permissive-" )
endif()

# Use SSE 2 as minimum always as the true color drawers needs it for __vectorcall
@@ -224,16 +224,16 @@ Note: All <bool> fields default to false unless mentioned otherwise.
ceilingplane_a = <float>; // Define the plane equation for the sector's ceiling. Default is a horizontal plane at 'heightceiling'.
ceilingplane_b = <float>; // 'heightceiling' will still be used to calculate texture alignment.
ceilingplane_c = <float>; // The plane equation will only be used if all 4 values are given.
ceilingplane_d = <float>;
ceilingplane_d = <float>; // The plane is defined as a*x + b*y + c*z + d = 0 with the normal vector pointing downward.
floorplane_a = <float>; // Define the plane equation for the sector's floor. Default is a horizontal plane at 'heightfloor'.
floorplane_b = <float>; // 'heightfloor' will still be used to calculate texture alignment.
floorplane_c = <float>; // The plane equation will only be used if all 4 values are given.
floorplane_d = <float>;
floorplane_d = <float>; // The plane is defined as a*x + b*y + c*z + d = 0 with the normal vector pointing upward.
lightfloor = <integer>; // The floor's light level. Default is 0.
lightceiling = <integer>; // The ceiling's light level. Default is 0.
lightfloorabsolute = <bool>; // true = 'lightfloor' is an absolute value. Default is
lightfloorabsolute = <bool>; // true = 'lightfloor' is an absolute value. Default is
// relative to the owning sector's light level.
lightceilingabsolute = <bool>; // true = 'lightceiling' is an absolute value. Default is
lightceilingabsolute = <bool>; // true = 'lightceiling' is an absolute value. Default is
// relative to the owning sector's light level.
alphafloor = <float>; // translucency of floor plane (only has meaning with Sector_SetPortal) Default is 1.0.
alphaceiling = <float>; // translucency of ceiling plane (only has meaning with Sector_SetPortal) Default is 1.0.
@@ -441,7 +441,7 @@ struct FPlayerStart
DVector3 pos;
int16_t angle, type;

FPlayerStart() { }
FPlayerStart() = default;
FPlayerStart(const FMapThing *mthing, int pnum)
: pos(mthing->pos),
angle(mthing->angle),
@@ -744,12 +744,39 @@ void FLevelLocals::ExitLevel (int position, bool keepFacing)
ChangeLevel(NextMap, position, keepFacing ? CHANGELEVEL_KEEPFACING : 0);
}

static void LevelLocals_ExitLevel(FLevelLocals *self, int position, bool keepFacing)
{
self->ExitLevel(position, keepFacing);
}

DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, ExitLevel, LevelLocals_ExitLevel)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_INT(position);
PARAM_INT(keepFacing);
self->ExitLevel(position, keepFacing);
return 0;
}

void FLevelLocals::SecretExitLevel (int position)
{
flags3 |= LEVEL3_EXITSECRETUSED;
ChangeLevel(GetSecretExitMap(), position, 0);
}

static void LevelLocals_SecretExitLevel(FLevelLocals *self, int position)
{
self->SecretExitLevel(position);
}

DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, SecretExitLevel, LevelLocals_SecretExitLevel)
{
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
PARAM_INT(position);
self->SecretExitLevel(position);
return 0;
}

//==========================================================================
//
//
@@ -1248,7 +1275,7 @@ void FLevelLocals::WorldDone (void)
ext->mDefined & FExitText::DEF_LOOKUP,
true, endsequence);
}
else
else if (!(info->flags2 & LEVEL2_NOCLUSTERTEXT))
{
F_StartFinale(thiscluster->MessageMusic, thiscluster->musicorder,
thiscluster->cdtrack, thiscluster->cdid,
@@ -1259,7 +1286,7 @@ void FLevelLocals::WorldDone (void)
true, endsequence);
}
}
else
else if (!deathmatch)
{
FExitText *ext = nullptr;

@@ -1286,7 +1313,7 @@ void FLevelLocals::WorldDone (void)

nextcluster = FindClusterInfo (FindLevelInfo (nextlevel)->cluster);

if (nextcluster->cluster != cluster && !deathmatch)
if (nextcluster->cluster != cluster && !(info->flags2 & LEVEL2_NOCLUSTERTEXT))
{
// Only start the finale if the next level's cluster is different
// than the current one and we're not in deathmatch.
@@ -142,9 +142,6 @@ class FThinkerIterator
FThinkerIterator (FLevelLocals *Level, const PClass *type, int statnum, DThinker *prev);
DThinker *Next (bool exact = false);
void Reinit ();

protected:
FThinkerIterator() {}
};

template <class T> class TThinkerIterator : public FThinkerIterator
@@ -1620,6 +1620,8 @@ MapFlagHandlers[] =
{ "rememberstate", MITYPE_CLRFLAG2, LEVEL2_FORGETSTATE, 0 },
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
{ "spawnwithweaponraised", MITYPE_SETFLAG2, LEVEL2_PRERAISEWEAPON, 0 },
{ "needclustertext", MITYPE_SETFLAG2, LEVEL2_NEEDCLUSTERTEXT, 0 },
{ "noclustertext", MITYPE_SETFLAG2, LEVEL2_NOCLUSTERTEXT, 0 }, // Normally there shouldn't be a need to explicitly set this
{ "forcefakecontrast", MITYPE_SETFLAG3, LEVEL3_FORCEFAKECONTRAST, 0 },
{ "nolightfade", MITYPE_SETFLAG3, LEVEL3_NOLIGHTFADE, 0 },
{ "nocoloredspritelighting", MITYPE_SETFLAG3, LEVEL3_NOCOLOREDSPRITELIGHTING, 0 },
@@ -201,7 +201,7 @@ enum ELevelFlags : unsigned int
LEVEL2_LAXACTIVATIONMAPINFO = 0x00000008, // LEVEL_LAXMONSTERACTIVATION is not a default.

LEVEL2_MISSILESACTIVATEIMPACT=0x00000010, // Missiles are the activators of SPAC_IMPACT events, not their shooters
// = 0x00000020, // unused
LEVEL2_NEEDCLUSTERTEXT = 0x00000020, // A map with this flag needs to retain its cluster intermission texts when being redefined in UMAPINFO

LEVEL2_KEEPFULLINVENTORY = 0x00000040, // doesn't reduce the amount of inventory items to 1

@@ -225,7 +225,7 @@ enum ELevelFlags : unsigned int
LEVEL2_FORCETEAMPLAYOFF = 0x00080000,

LEVEL2_CONV_SINGLE_UNFREEZE = 0x00100000,
// = 0x00200000, // unused, was LEVEL2_RAILINGHACK
LEVEL2_NOCLUSTERTEXT = 0x00200000, // ignore intermission texts fro clusters. This gets set when UMAPINFO is used to redefine its properties.
LEVEL2_DUMMYSWITCHES = 0x00400000,
LEVEL2_HEXENHACK = 0x00800000, // Level was defined in a Hexen style MAPINFO

@@ -528,7 +528,7 @@ struct FSkillInfo
int Infighting;
bool PlayerRespawn;

FSkillInfo() {}
FSkillInfo() = default;
FSkillInfo(const FSkillInfo &other)
{
operator=(other);
@@ -267,7 +267,7 @@ struct FActorInfo

uint8_t DefaultStateUsage = 0; // state flag defaults for blocks without a qualifier.

FActorInfo() {}
FActorInfo() = default;
FActorInfo(const FActorInfo & other)
{
// only copy the fields that get inherited
@@ -216,15 +216,7 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape)
if (Episode.IsEmpty()) return 0;
if (Episode.Compare("-") == 0)
{
// clear the given episode
for (unsigned i = 0; i < AllEpisodes.Size(); i++)
{
if (AllEpisodes[i].mEpisodeMap.CompareNoCase(mape->MapName) == 0)
{
AllEpisodes.Delete(i);
break;
}
}
AllEpisodes.Clear();
}
else
{
@@ -236,6 +228,7 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape)
epi.mEpisodeMap = mape->MapName;
epi.mPicName = split[0];
epi.mShortcut = split[2][0];
epi.mNoSkill = false;

unsigned i;
for (i = 0; i < AllEpisodes.Size(); i++)
@@ -364,7 +357,7 @@ int ParseUMapInfo(int lumpnum)
if (!parsed.MapName.Compare(Maps[i].MapName))
{
Maps[i] = parsed;
return 1;
continue;
}
}
// Not found so create a new one.
@@ -380,7 +373,7 @@ void CommitUMapinfo(level_info_t *defaultinfo)
{
for (auto &map : Maps)
{
auto levelinfo = FindLevelInfo(map.MapName);
auto levelinfo = FindLevelInfo(map.MapName, false);
if (levelinfo == nullptr)
{
// Map did not exist yet.
@@ -462,6 +455,7 @@ void CommitUMapinfo(level_info_t *defaultinfo)
levelinfo->ExitMapTexts[NAME_Secret] = { 0, 0 };
}
if (map.nointermission) levelinfo->flags |= LEVEL_NOINTERMISSION;
if (!(levelinfo->flags2 & LEVEL2_NEEDCLUSTERTEXT)) levelinfo->flags2 |= LEVEL2_NOCLUSTERTEXT; // UMAPINFO should ignore cluster intermission texts.
}


@@ -135,7 +135,8 @@ void ActivateEndGameMenu()
M_ClearMenus();
if (!netgame)
{
G_CheckDemoStatus();
if (demorecording)
G_CheckDemoStatus();
D_StartTitle();
}
});
@@ -251,13 +251,13 @@ void FModelRenderer::RenderFrameModels(FLevelLocals *Level, const FSpriteModelFr
inter /= 2.;
inter += 0.5;
}
if ((curState->sprite == nextState->sprite) && (curState->Frame == nextState->Frame))
if (nextState && ((curState->sprite == nextState->sprite) && (curState->Frame == nextState->Frame)))
{
inter /= 2.;
nextState = nextState->GetNextState();
}
}
if (inter != 0.0)
if (nextState && inter != 0.0)
smfNext = FindModelFrame(ti, nextState->sprite, nextState->Frame, false);
}
}
@@ -68,18 +68,10 @@ void FGLRenderer::PostProcessScene(int fixedcm, const std::function<void()> &aft

GLPPRenderState renderstate(mBuffers);

hw_postprocess.exposure.Render(&renderstate, sceneWidth, sceneHeight);
hw_postprocess.customShaders.Run(&renderstate, "beforebloom");
hw_postprocess.bloom.RenderBloom(&renderstate, sceneWidth, sceneHeight, fixedcm);

hw_postprocess.Pass1(&renderstate, fixedcm, sceneWidth, sceneHeight);
mBuffers->BindCurrentFB();
afterBloomDrawEndScene2D();

hw_postprocess.tonemap.Render(&renderstate);
hw_postprocess.colormap.Render(&renderstate, fixedcm);
hw_postprocess.lens.Render(&renderstate);
hw_postprocess.fxaa.Render(&renderstate);
hw_postprocess.customShaders.Run(&renderstate, "scene");
hw_postprocess.Pass2(&renderstate, fixedcm, sceneWidth, sceneHeight);
}

//-----------------------------------------------------------------------------
@@ -78,7 +78,7 @@ void HWViewpointBuffer::Set2D(FRenderState &di, int width, int height)
if (width != m2DWidth || height != m2DHeight)
{
HWViewpointUniforms matrices;
matrices.SetDefaults();
matrices.SetDefaults(nullptr);
matrices.mProjectionMatrix.ortho(0, (float)width, (float)height, 0, -1.0f, 1.0f);
matrices.CalcDependencies();
mBuffer->Map();
@@ -1081,3 +1081,20 @@ void PPCustomShaderInstance::AddUniformField(size_t &offset, const FString &name
offset += alignment - fieldsize;
}
}


void Postprocess::Pass1(PPRenderState* state, int fixedcm, int sceneWidth, int sceneHeight)
{
exposure.Render(state, sceneWidth, sceneHeight);
customShaders.Run(state, "beforebloom");
bloom.RenderBloom(state, sceneWidth, sceneHeight, fixedcm);
}

void Postprocess::Pass2(PPRenderState* state, int fixedcm, int sceneWidth, int sceneHeight)
{
tonemap.Render(state);
colormap.Render(state, fixedcm);
lens.Render(state);
fxaa.Render(state);
customShaders.Run(state, "scene");
}
@@ -834,6 +834,10 @@ class Postprocess
PPPresent present;
PPShadowMap shadowmap;
PPCustomShaders customShaders;


void Pass1(PPRenderState *state, int fixedcm, int sceneWidth, int sceneHeight);
void Pass2(PPRenderState* state, int fixedcm, int sceneWidth, int sceneHeight);
};

extern Postprocess hw_postprocess;

0 comments on commit 706bc0b

Please sign in to comment.
You can’t perform that action at this time.