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

This commit is contained in:
Magnus Norddahl 2019-06-23 20:29:04 +02:00
commit 706bc0b7c6
41 changed files with 199 additions and 86 deletions

View file

@ -8,21 +8,24 @@ clone_depth: 10
image: image:
- Visual Studio 2019 - Visual Studio 2019
- Visual Studio 2015
environment: environment:
matrix: matrix:
- ARCH: x64 - ARCH: x64
CONFIG: Release
- ARCH: Win32 - ARCH: Win32
CONFIG: Release
- ARCH: x64
CONFIG: Debug
build_script: build_script:
- md build - md build
- cd build - cd build
- cmake -A %ARCH% -DPK3_QUIET_ZIPDIR=YES .. - cmake -A %ARCH% -DPK3_QUIET_ZIPDIR=YES ..
- cmake --build . --config Release -- -maxcpucount -verbosity:minimal - cmake --build . --config %CONFIG% -- -maxcpucount -verbosity:minimal
after_build: 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" - 7z a ..\gzdoom.zip "%OUTPUT_DIR%gzdoom.exe" "%OUTPUT_DIR%*.pk3"
artifacts: artifacts:

View file

@ -20,6 +20,14 @@ matrix:
env: env:
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9" - 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 - os: linux
compiler: gcc compiler: gcc
env: env:
@ -86,18 +94,31 @@ matrix:
- libsdl2-dev - libsdl2-dev
- libgtk-3-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 - os: linux
compiler: clang compiler: clang
env: 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" - CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=MinSizeRel -DDYN_OPENAL=NO -DDYN_SNDFILE=NO -DDYN_MPG123=NO -DDYN_FLUIDSYNTH=NO"
addons: addons:
apt: apt:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7 - llvm-toolchain-xenial-8
packages: packages:
- clang-7 - clang-8
- libsdl2-dev - libsdl2-dev
- libgme-dev - libgme-dev
- libopenal-dev - libopenal-dev
@ -106,14 +127,6 @@ matrix:
- libfluidsynth-dev - libfluidsynth-dev
- libgtk-3-dev - libgtk-3-dev
- os: windows
env:
- CMAKE_OPTIONS="-A Win32"
- os: windows
env:
- CMAKE_OPTIONS="-A x64"
before_install: before_install:
- if [ -n "$GCC_VERSION" ]; then export CC="gcc-${GCC_VERSION}" CXX="g++-${GCC_VERSION}"; fi - 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 - if [ -n "$CLANG_VERSION" ]; then export CC="clang-${CLANG_VERSION}" CXX="clang++-${CLANG_VERSION}"; fi

View file

@ -182,9 +182,9 @@ if( MSVC )
# Function-level linking # Function-level linking
# Disable run-time type information # Disable run-time type information
if ( HAVE_VULKAN ) if ( HAVE_VULKAN )
set( ALL_C_FLAGS "/GF /Gy /GR- /DHAVE_VULKAN" ) set( ALL_C_FLAGS "/GF /Gy /GR- /permissive- /DHAVE_VULKAN" )
else() else()
set( ALL_C_FLAGS "/GF /Gy /GR-" ) set( ALL_C_FLAGS "/GF /Gy /GR- /permissive-" )
endif() endif()
# Use SSE 2 as minimum always as the true color drawers needs it for __vectorcall # Use SSE 2 as minimum always as the true color drawers needs it for __vectorcall

View file

@ -224,11 +224,11 @@ 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_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_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_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_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_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_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. lightfloor = <integer>; // The floor's light level. Default is 0.
lightceiling = <integer>; // The ceiling'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

View file

@ -441,7 +441,7 @@ struct FPlayerStart
DVector3 pos; DVector3 pos;
int16_t angle, type; int16_t angle, type;
FPlayerStart() { } FPlayerStart() = default;
FPlayerStart(const FMapThing *mthing, int pnum) FPlayerStart(const FMapThing *mthing, int pnum)
: pos(mthing->pos), : pos(mthing->pos),
angle(mthing->angle), angle(mthing->angle),

View file

@ -744,12 +744,39 @@ void FLevelLocals::ExitLevel (int position, bool keepFacing)
ChangeLevel(NextMap, position, keepFacing ? CHANGELEVEL_KEEPFACING : 0); 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) void FLevelLocals::SecretExitLevel (int position)
{ {
flags3 |= LEVEL3_EXITSECRETUSED; flags3 |= LEVEL3_EXITSECRETUSED;
ChangeLevel(GetSecretExitMap(), position, 0); 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, ext->mDefined & FExitText::DEF_LOOKUP,
true, endsequence); true, endsequence);
} }
else else if (!(info->flags2 & LEVEL2_NOCLUSTERTEXT))
{ {
F_StartFinale(thiscluster->MessageMusic, thiscluster->musicorder, F_StartFinale(thiscluster->MessageMusic, thiscluster->musicorder,
thiscluster->cdtrack, thiscluster->cdid, thiscluster->cdtrack, thiscluster->cdid,
@ -1259,7 +1286,7 @@ void FLevelLocals::WorldDone (void)
true, endsequence); true, endsequence);
} }
} }
else else if (!deathmatch)
{ {
FExitText *ext = nullptr; FExitText *ext = nullptr;
@ -1286,7 +1313,7 @@ void FLevelLocals::WorldDone (void)
nextcluster = FindClusterInfo (FindLevelInfo (nextlevel)->cluster); 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 // Only start the finale if the next level's cluster is different
// than the current one and we're not in deathmatch. // than the current one and we're not in deathmatch.

View file

@ -142,9 +142,6 @@ public:
FThinkerIterator (FLevelLocals *Level, const PClass *type, int statnum, DThinker *prev); FThinkerIterator (FLevelLocals *Level, const PClass *type, int statnum, DThinker *prev);
DThinker *Next (bool exact = false); DThinker *Next (bool exact = false);
void Reinit (); void Reinit ();
protected:
FThinkerIterator() {}
}; };
template <class T> class TThinkerIterator : public FThinkerIterator template <class T> class TThinkerIterator : public FThinkerIterator

View file

@ -1620,6 +1620,8 @@ MapFlagHandlers[] =
{ "rememberstate", MITYPE_CLRFLAG2, LEVEL2_FORGETSTATE, 0 }, { "rememberstate", MITYPE_CLRFLAG2, LEVEL2_FORGETSTATE, 0 },
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 }, { "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
{ "spawnwithweaponraised", MITYPE_SETFLAG2, LEVEL2_PRERAISEWEAPON, 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 }, { "forcefakecontrast", MITYPE_SETFLAG3, LEVEL3_FORCEFAKECONTRAST, 0 },
{ "nolightfade", MITYPE_SETFLAG3, LEVEL3_NOLIGHTFADE, 0 }, { "nolightfade", MITYPE_SETFLAG3, LEVEL3_NOLIGHTFADE, 0 },
{ "nocoloredspritelighting", MITYPE_SETFLAG3, LEVEL3_NOCOLOREDSPRITELIGHTING, 0 }, { "nocoloredspritelighting", MITYPE_SETFLAG3, LEVEL3_NOCOLOREDSPRITELIGHTING, 0 },

View file

@ -201,7 +201,7 @@ enum ELevelFlags : unsigned int
LEVEL2_LAXACTIVATIONMAPINFO = 0x00000008, // LEVEL_LAXMONSTERACTIVATION is not a default. LEVEL2_LAXACTIVATIONMAPINFO = 0x00000008, // LEVEL_LAXMONSTERACTIVATION is not a default.
LEVEL2_MISSILESACTIVATEIMPACT=0x00000010, // Missiles are the activators of SPAC_IMPACT events, not their shooters 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 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_FORCETEAMPLAYOFF = 0x00080000,
LEVEL2_CONV_SINGLE_UNFREEZE = 0x00100000, 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_DUMMYSWITCHES = 0x00400000,
LEVEL2_HEXENHACK = 0x00800000, // Level was defined in a Hexen style MAPINFO LEVEL2_HEXENHACK = 0x00800000, // Level was defined in a Hexen style MAPINFO
@ -528,7 +528,7 @@ struct FSkillInfo
int Infighting; int Infighting;
bool PlayerRespawn; bool PlayerRespawn;
FSkillInfo() {} FSkillInfo() = default;
FSkillInfo(const FSkillInfo &other) FSkillInfo(const FSkillInfo &other)
{ {
operator=(other); operator=(other);

View file

@ -267,7 +267,7 @@ struct FActorInfo
uint8_t DefaultStateUsage = 0; // state flag defaults for blocks without a qualifier. uint8_t DefaultStateUsage = 0; // state flag defaults for blocks without a qualifier.
FActorInfo() {} FActorInfo() = default;
FActorInfo(const FActorInfo & other) FActorInfo(const FActorInfo & other)
{ {
// only copy the fields that get inherited // only copy the fields that get inherited

View file

@ -216,15 +216,7 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape)
if (Episode.IsEmpty()) return 0; if (Episode.IsEmpty()) return 0;
if (Episode.Compare("-") == 0) if (Episode.Compare("-") == 0)
{ {
// clear the given episode AllEpisodes.Clear();
for (unsigned i = 0; i < AllEpisodes.Size(); i++)
{
if (AllEpisodes[i].mEpisodeMap.CompareNoCase(mape->MapName) == 0)
{
AllEpisodes.Delete(i);
break;
}
}
} }
else else
{ {
@ -236,6 +228,7 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape)
epi.mEpisodeMap = mape->MapName; epi.mEpisodeMap = mape->MapName;
epi.mPicName = split[0]; epi.mPicName = split[0];
epi.mShortcut = split[2][0]; epi.mShortcut = split[2][0];
epi.mNoSkill = false;
unsigned i; unsigned i;
for (i = 0; i < AllEpisodes.Size(); i++) for (i = 0; i < AllEpisodes.Size(); i++)
@ -364,7 +357,7 @@ int ParseUMapInfo(int lumpnum)
if (!parsed.MapName.Compare(Maps[i].MapName)) if (!parsed.MapName.Compare(Maps[i].MapName))
{ {
Maps[i] = parsed; Maps[i] = parsed;
return 1; continue;
} }
} }
// Not found so create a new one. // Not found so create a new one.
@ -380,7 +373,7 @@ void CommitUMapinfo(level_info_t *defaultinfo)
{ {
for (auto &map : Maps) for (auto &map : Maps)
{ {
auto levelinfo = FindLevelInfo(map.MapName); auto levelinfo = FindLevelInfo(map.MapName, false);
if (levelinfo == nullptr) if (levelinfo == nullptr)
{ {
// Map did not exist yet. // Map did not exist yet.
@ -462,6 +455,7 @@ void CommitUMapinfo(level_info_t *defaultinfo)
levelinfo->ExitMapTexts[NAME_Secret] = { 0, 0 }; levelinfo->ExitMapTexts[NAME_Secret] = { 0, 0 };
} }
if (map.nointermission) levelinfo->flags |= LEVEL_NOINTERMISSION; if (map.nointermission) levelinfo->flags |= LEVEL_NOINTERMISSION;
if (!(levelinfo->flags2 & LEVEL2_NEEDCLUSTERTEXT)) levelinfo->flags2 |= LEVEL2_NOCLUSTERTEXT; // UMAPINFO should ignore cluster intermission texts.
} }

View file

@ -135,6 +135,7 @@ void ActivateEndGameMenu()
M_ClearMenus(); M_ClearMenus();
if (!netgame) if (!netgame)
{ {
if (demorecording)
G_CheckDemoStatus(); G_CheckDemoStatus();
D_StartTitle(); D_StartTitle();
} }

View file

@ -251,13 +251,13 @@ void FModelRenderer::RenderFrameModels(FLevelLocals *Level, const FSpriteModelFr
inter /= 2.; inter /= 2.;
inter += 0.5; inter += 0.5;
} }
if ((curState->sprite == nextState->sprite) && (curState->Frame == nextState->Frame)) if (nextState && ((curState->sprite == nextState->sprite) && (curState->Frame == nextState->Frame)))
{ {
inter /= 2.; inter /= 2.;
nextState = nextState->GetNextState(); nextState = nextState->GetNextState();
} }
} }
if (inter != 0.0) if (nextState && inter != 0.0)
smfNext = FindModelFrame(ti, nextState->sprite, nextState->Frame, false); smfNext = FindModelFrame(ti, nextState->sprite, nextState->Frame, false);
} }
} }

View file

@ -68,18 +68,10 @@ void FGLRenderer::PostProcessScene(int fixedcm, const std::function<void()> &aft
GLPPRenderState renderstate(mBuffers); GLPPRenderState renderstate(mBuffers);
hw_postprocess.exposure.Render(&renderstate, sceneWidth, sceneHeight); hw_postprocess.Pass1(&renderstate, fixedcm, sceneWidth, sceneHeight);
hw_postprocess.customShaders.Run(&renderstate, "beforebloom");
hw_postprocess.bloom.RenderBloom(&renderstate, sceneWidth, sceneHeight, fixedcm);
mBuffers->BindCurrentFB(); mBuffers->BindCurrentFB();
afterBloomDrawEndScene2D(); afterBloomDrawEndScene2D();
hw_postprocess.Pass2(&renderstate, fixedcm, sceneWidth, sceneHeight);
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");
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -78,7 +78,7 @@ void HWViewpointBuffer::Set2D(FRenderState &di, int width, int height)
if (width != m2DWidth || height != m2DHeight) if (width != m2DWidth || height != m2DHeight)
{ {
HWViewpointUniforms matrices; HWViewpointUniforms matrices;
matrices.SetDefaults(); matrices.SetDefaults(nullptr);
matrices.mProjectionMatrix.ortho(0, (float)width, (float)height, 0, -1.0f, 1.0f); matrices.mProjectionMatrix.ortho(0, (float)width, (float)height, 0, -1.0f, 1.0f);
matrices.CalcDependencies(); matrices.CalcDependencies();
mBuffer->Map(); mBuffer->Map();

View file

@ -1081,3 +1081,20 @@ void PPCustomShaderInstance::AddUniformField(size_t &offset, const FString &name
offset += alignment - fieldsize; 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");
}

View file

@ -834,6 +834,10 @@ public:
PPPresent present; PPPresent present;
PPShadowMap shadowmap; PPShadowMap shadowmap;
PPCustomShaders customShaders; 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; extern Postprocess hw_postprocess;

View file

@ -135,7 +135,7 @@ void HWDrawInfo::StartScene(FRenderViewpoint &parentvp, HWViewpointUniforms *uni
VPUniforms.mClipLine.X = -1000001.f; VPUniforms.mClipLine.X = -1000001.f;
VPUniforms.mClipHeight = 0; VPUniforms.mClipHeight = 0;
} }
else VPUniforms.SetDefaults(); else VPUniforms.SetDefaults(this);
mClipper->SetViewpoint(Viewpoint); mClipper->SetViewpoint(Viewpoint);
ClearBuffers(); ClearBuffers();
@ -387,14 +387,15 @@ HWPortal * HWDrawInfo::FindPortal(const void * src)
// //
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void HWViewpointUniforms::SetDefaults() void HWViewpointUniforms::SetDefaults(HWDrawInfo *drawInfo)
{ {
mProjectionMatrix.loadIdentity(); mProjectionMatrix.loadIdentity();
mViewMatrix.loadIdentity(); mViewMatrix.loadIdentity();
mNormalViewMatrix.loadIdentity(); mNormalViewMatrix.loadIdentity();
mViewHeight = viewheight; mViewHeight = viewheight;
mGlobVis = (float)R_GetGlobVis(r_viewwindow, r_visibility) / 32.f; mGlobVis = (float)R_GetGlobVis(r_viewwindow, r_visibility) / 32.f;
mPalLightLevels = static_cast<int>(gl_bandedswlight) | (static_cast<int>(gl_fogmode) << 8) | (static_cast<int>(gl_lightmode) << 16); const int lightMode = drawInfo == nullptr ? static_cast<int>(*gl_lightmode) : static_cast<int>(drawInfo->lightmode);
mPalLightLevels = static_cast<int>(gl_bandedswlight) | (static_cast<int>(gl_fogmode) << 8) | (lightMode << 16);
mClipLine.X = -10000000.0f; mClipLine.X = -10000000.0f;
mShadowmapFilter = gl_shadowmap_filter; mShadowmapFilter = gl_shadowmap_filter;

View file

@ -3,6 +3,8 @@
#include "r_data/matrix.h" #include "r_data/matrix.h"
#include "r_utility.h" #include "r_utility.h"
struct HWDrawInfo;
struct HWViewpointUniforms struct HWViewpointUniforms
{ {
VSMatrix mProjectionMatrix; VSMatrix mProjectionMatrix;
@ -23,7 +25,7 @@ struct HWViewpointUniforms
mNormalViewMatrix.computeNormalMatrix(mViewMatrix); mNormalViewMatrix.computeNormalMatrix(mViewMatrix);
} }
void SetDefaults(); void SetDefaults(HWDrawInfo *drawInfo);
}; };

View file

@ -46,18 +46,10 @@ void VkPostprocess::PostProcessScene(int fixedcm, const std::function<void()> &a
VkPPRenderState renderstate; VkPPRenderState renderstate;
hw_postprocess.exposure.Render(&renderstate, sceneWidth, sceneHeight); hw_postprocess.Pass1(&renderstate, fixedcm, sceneWidth, sceneHeight);
hw_postprocess.customShaders.Run(&renderstate, "beforebloom");
hw_postprocess.bloom.RenderBloom(&renderstate, sceneWidth, sceneHeight, fixedcm);
SetActiveRenderTarget(); SetActiveRenderTarget();
afterBloomDrawEndScene2D(); afterBloomDrawEndScene2D();
hw_postprocess.Pass2(&renderstate, fixedcm, sceneWidth, sceneHeight);
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");
} }
void VkPostprocess::BlitSceneToPostprocess() void VkPostprocess::BlitSceneToPostprocess()

View file

@ -168,13 +168,13 @@ void VkRenderState::Apply(int dt)
mApplyCount = 0; mApplyCount = 0;
} }
ApplyStreamData();
ApplyMatrices();
ApplyRenderPass(dt); ApplyRenderPass(dt);
ApplyScissor(); ApplyScissor();
ApplyViewport(); ApplyViewport();
ApplyStencilRef(); ApplyStencilRef();
ApplyDepthBias(); ApplyDepthBias();
ApplyStreamData();
ApplyMatrices();
ApplyPushConstants(); ApplyPushConstants();
ApplyVertexBuffers(); ApplyVertexBuffers();
ApplyDynamicSet(); ApplyDynamicSet();
@ -327,6 +327,9 @@ void VkRenderState::ApplyStreamData()
{ {
mDataIndex = 0; mDataIndex = 0;
mStreamDataOffset += sizeof(StreamUBO); mStreamDataOffset += sizeof(StreamUBO);
if (mStreamDataOffset + sizeof(StreamUBO) >= fb->StreamUBO->Size())
WaitForStreamBuffers();
} }
uint8_t *ptr = (uint8_t*)fb->StreamUBO->Memory(); uint8_t *ptr = (uint8_t*)fb->StreamUBO->Memory();
memcpy(ptr + mStreamDataOffset + sizeof(StreamData) * mDataIndex, &mStreamData, sizeof(StreamData)); memcpy(ptr + mStreamDataOffset + sizeof(StreamData) * mDataIndex, &mStreamData, sizeof(StreamData));
@ -420,13 +423,13 @@ void VkRenderState::ApplyMatrices()
{ {
auto fb = GetVulkanFrameBuffer(); auto fb = GetVulkanFrameBuffer();
if (mMatricesOffset + (fb->UniformBufferAlignedSize<MatricesUBO>() << 1) < fb->MatricesUBO->Size()) if (mMatricesOffset + (fb->UniformBufferAlignedSize<MatricesUBO>() << 1) >= fb->MatricesUBO->Size())
{ WaitForStreamBuffers();
mMatricesOffset += fb->UniformBufferAlignedSize<MatricesUBO>(); mMatricesOffset += fb->UniformBufferAlignedSize<MatricesUBO>();
memcpy(static_cast<uint8_t*>(fb->MatricesUBO->Memory()) + mMatricesOffset, &mMatrices, sizeof(MatricesUBO)); memcpy(static_cast<uint8_t*>(fb->MatricesUBO->Memory()) + mMatricesOffset, &mMatrices, sizeof(MatricesUBO));
} }
} }
}
void VkRenderState::ApplyVertexBuffers() void VkRenderState::ApplyVertexBuffers()
{ {
@ -481,6 +484,16 @@ void VkRenderState::ApplyDynamicSet()
} }
} }
void VkRenderState::WaitForStreamBuffers()
{
EndRenderPass();
GetVulkanFrameBuffer()->WaitForCommands(false);
mApplyCount = 0;
mStreamDataOffset = 0;
mDataIndex = 0;
mMatricesOffset = 0;
}
void VkRenderState::Bind(int bindingpoint, uint32_t offset) void VkRenderState::Bind(int bindingpoint, uint32_t offset)
{ {
if (bindingpoint == VIEWPOINT_BINDINGPOINT) if (bindingpoint == VIEWPOINT_BINDINGPOINT)

View file

@ -63,6 +63,7 @@ protected:
void ApplyVertexBuffers(); void ApplyVertexBuffers();
void ApplyMaterial(); void ApplyMaterial();
void WaitForStreamBuffers();
void BeginRenderPass(VulkanCommandBuffer *cmdbuffer); void BeginRenderPass(VulkanCommandBuffer *cmdbuffer);
bool mDepthClamp = true; bool mDepthClamp = true;

View file

@ -12,6 +12,8 @@ public:
{ {
AspectMask = VK_IMAGE_ASPECT_COLOR_BIT; AspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
Layout = VK_IMAGE_LAYOUT_UNDEFINED; Layout = VK_IMAGE_LAYOUT_UNDEFINED;
PPFramebuffer.reset();
RSFramebuffers.clear();
DepthOnlyView.reset(); DepthOnlyView.reset();
View.reset(); View.reset();
Image.reset(); Image.reset();

View file

@ -135,8 +135,23 @@ private:
cc.movsd(epsilonXmm, epsilon); cc.movsd(epsilonXmm, epsilon);
cc.ucomisd(epsilonXmm, tmp); cc.ucomisd(epsilonXmm, tmp);
if (check) cc.ja(fail); if (check)
else cc.jna(fail); {
cc.jp(success);
if (i == (N - 1))
{
cc.ja(fail);
}
else
{
cc.jna(success);
}
}
else
{
cc.jp(fail);
cc.jna(fail);
}
} }
} }
} }

View file

@ -511,7 +511,7 @@ HANDLE WriteLogFile(HWND edit)
// //
//========================================================================== //==========================================================================
void CreateCrashLog (char *custominfo, DWORD customsize, HWND richlog) void CreateCrashLog (const char *custominfo, DWORD customsize, HWND richlog)
{ {
// Do not collect information more than once. // Do not collect information more than once.
if (NumFiles != 0) if (NumFiles != 0)

View file

@ -98,7 +98,7 @@
// EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
void CreateCrashLog (char *custominfo, DWORD customsize, HWND richedit); void CreateCrashLog (const char *custominfo, DWORD customsize, HWND richedit);
void DisplayCrashLog (); void DisplayCrashLog ();
extern uint8_t *ST_Util_BitsForBitmap (BITMAPINFO *bitmap_info); extern uint8_t *ST_Util_BitsForBitmap (BITMAPINFO *bitmap_info);
void I_FlushBufferedConsoleStuff(); void I_FlushBufferedConsoleStuff();

View file

@ -253,6 +253,7 @@ C98F79709BD7E0E4C19026AB9575EC6F // cc-cod.zip:codlev.wad map07
D7F6E9F08C39A17026349A04F8C0B0BE // Return to Hadron, e1m9 D7F6E9F08C39A17026349A04F8C0B0BE // Return to Hadron, e1m9
19D03FFC875589E21EDBB7AB74EF4AEF // Return to Hadron, e1m9, 2016.01.03 update 19D03FFC875589E21EDBB7AB74EF4AEF // Return to Hadron, e1m9, 2016.01.03 update
5BDA34DA60C0530794CC1EA2DA017976 // doom2.wad map14
{ {
pointonline pointonline
} }

View file

@ -256,6 +256,7 @@ map E1M5 lookup "CHUSTR_E1M5"
cluster = 1 cluster = 1
par = 165 par = 165
music = "$MUSIC_E1M5" music = "$MUSIC_E1M5"
needclustertext
} }
// Clusters (correspond with same-numbered episode) // Clusters (correspond with same-numbered episode)

View file

@ -152,6 +152,7 @@ map E1M8 lookup "HUSTR_E1M8"
baronspecial baronspecial
specialaction_lowerfloor specialaction_lowerfloor
music = "$MUSIC_E1M8" music = "$MUSIC_E1M8"
needclustertext
} }
map E1M9 lookup "HUSTR_E1M9" map E1M9 lookup "HUSTR_E1M9"
@ -266,6 +267,7 @@ map E2M8 lookup "HUSTR_E2M8"
cyberdemonspecial cyberdemonspecial
specialaction_exitlevel specialaction_exitlevel
music = "$MUSIC_E2M8" music = "$MUSIC_E2M8"
needclustertext
} }
map E2M9 lookup "HUSTR_E2M9" map E2M9 lookup "HUSTR_E2M9"
@ -380,6 +382,7 @@ map E3M8 lookup "HUSTR_E3M8"
spidermastermindspecial spidermastermindspecial
specialaction_exitlevel specialaction_exitlevel
music = "$MUSIC_E3M8" music = "$MUSIC_E3M8"
needclustertext
} }
map E3M9 lookup "HUSTR_E3M9" map E3M9 lookup "HUSTR_E3M9"
@ -496,6 +499,7 @@ map E4M8 lookup "HUSTR_E4M8"
spidermastermindspecial spidermastermindspecial
specialaction_lowerfloor specialaction_lowerfloor
music = "$MUSIC_E2M5" music = "$MUSIC_E2M5"
needclustertext
} }
map E4M9 lookup "HUSTR_E4M9" map E4M9 lookup "HUSTR_E4M9"

View file

@ -85,6 +85,7 @@ map MAP06 lookup "HUSTR_6"
par = 150 par = 150
sucktime = 1 sucktime = 1
music = "$MUSIC_THE_DA" music = "$MUSIC_THE_DA"
needclustertext
} }
map MAP07 lookup "HUSTR_7" map MAP07 lookup "HUSTR_7"
@ -141,6 +142,7 @@ map MAP11 lookup "HUSTR_11"
cluster = 6 cluster = 6
par = 210 par = 210
music = "$MUSIC_STLKS2" music = "$MUSIC_STLKS2"
needclustertext
} }
map MAP12 lookup "HUSTR_12" map MAP12 lookup "HUSTR_12"
@ -185,6 +187,7 @@ map MAP15 lookup "HUSTR_15"
cluster = 7 cluster = 7
par = 210 par = 210
music = "$MUSIC_RUNNI2" music = "$MUSIC_RUNNI2"
needclustertext
} }
map MAP16 lookup "HUSTR_16" map MAP16 lookup "HUSTR_16"
@ -240,6 +243,7 @@ map MAP20 lookup "HUSTR_20"
cluster = 7 cluster = 7
par = 150 par = 150
music = "$MUSIC_MESSAG" music = "$MUSIC_MESSAG"
needclustertext
} }
map MAP21 lookup "HUSTR_21" map MAP21 lookup "HUSTR_21"
@ -351,6 +355,7 @@ map MAP30 lookup "HUSTR_30"
par = 180 par = 180
allowmonstertelefrags allowmonstertelefrags
music = "$MUSIC_OPENIN" music = "$MUSIC_OPENIN"
needclustertext
} }
map MAP31 lookup "HUSTR_31" map MAP31 lookup "HUSTR_31"
@ -362,6 +367,7 @@ map MAP31 lookup "HUSTR_31"
cluster = 9 cluster = 9
par = 120 par = 120
music = "$MUSIC_EVIL" music = "$MUSIC_EVIL"
needclustertext
} }
map MAP32 lookup "HUSTR_32" map MAP32 lookup "HUSTR_32"
@ -515,6 +521,7 @@ map LEVEL08 lookup "NHUSTR_8"
cluster = 11 cluster = 11
par = 105 par = 105
music = "$MUSIC_SHAWN" music = "$MUSIC_SHAWN"
needclustertext
} }
map LEVEL09 lookup "NHUSTR_9" map LEVEL09 lookup "NHUSTR_9"

View file

@ -53,6 +53,7 @@ map MAP31 lookup "HUSTR_31B"
cluster = 9 cluster = 9
par = 120 par = 120
music = "$MUSIC_EVIL" music = "$MUSIC_EVIL"
needclustertext
} }
map MAP32 lookup "HUSTR_32B" map MAP32 lookup "HUSTR_32B"

View file

@ -421,6 +421,7 @@ map E1M8 lookup "HHUSTR_E1M8"
ironlichspecial ironlichspecial
specialaction_lowerfloortohighest specialaction_lowerfloortohighest
music = "MUS_E1M8" music = "MUS_E1M8"
needclustertext
} }
map E1M9 lookup "HHUSTR_E1M9" map E1M9 lookup "HHUSTR_E1M9"
@ -508,6 +509,7 @@ map E2M8 lookup "HHUSTR_E2M8"
specialaction_lowerfloortohighest specialaction_lowerfloortohighest
specialaction_killmonsters specialaction_killmonsters
music = "MUS_E2M8" music = "MUS_E2M8"
needclustertext
} }
map E2M9 lookup "HHUSTR_E2M9" map E2M9 lookup "HHUSTR_E2M9"
@ -595,6 +597,7 @@ map E3M8 lookup "HHUSTR_E3M8"
specialaction_lowerfloortohighest specialaction_lowerfloortohighest
specialaction_killmonsters specialaction_killmonsters
music = "MUS_E1M9" music = "MUS_E1M9"
needclustertext
} }
map E3M9 lookup "HHUSTR_E3M9" map E3M9 lookup "HHUSTR_E3M9"
@ -682,6 +685,7 @@ map E4M8 lookup "HHUSTR_E4M8"
specialaction_lowerfloortohighest specialaction_lowerfloortohighest
specialaction_killmonsters specialaction_killmonsters
music = "MUS_E1M8" music = "MUS_E1M8"
needclustertext
} }
map E4M9 lookup "HHUSTR_E4M9" map E4M9 lookup "HHUSTR_E4M9"
@ -769,6 +773,7 @@ map E5M8 lookup "HHUSTR_E5M8"
specialaction_killmonsters specialaction_killmonsters
specialaction_lowerfloortohighest specialaction_lowerfloortohighest
music = "MUS_E2M8" music = "MUS_E2M8"
needclustertext
} }
map E5M9 lookup "HHUSTR_E5M9" map E5M9 lookup "HHUSTR_E5M9"

View file

@ -79,6 +79,7 @@ map MAP06 lookup "PHUSTR_6"
cluster = 5 cluster = 5
par = 150 par = 150
music = "$MUSIC_THE_DA" music = "$MUSIC_THE_DA"
needclustertext
} }
map MAP07 lookup "PHUSTR_7" map MAP07 lookup "PHUSTR_7"
@ -135,6 +136,7 @@ map MAP11 lookup "PHUSTR_11"
cluster = 6 cluster = 6
par = 210 par = 210
music = "$MUSIC_STLKS2" music = "$MUSIC_STLKS2"
needclustertext
} }
map MAP12 lookup "PHUSTR_12" map MAP12 lookup "PHUSTR_12"
@ -179,6 +181,7 @@ map MAP15 lookup "PHUSTR_15"
cluster = 7 cluster = 7
par = 210 par = 210
music = "$MUSIC_RUNNI2" music = "$MUSIC_RUNNI2"
needclustertext
} }
map MAP16 lookup "PHUSTR_16" map MAP16 lookup "PHUSTR_16"
@ -234,6 +237,7 @@ map MAP20 lookup "PHUSTR_20"
cluster = 7 cluster = 7
par = 150 par = 150
music = "$MUSIC_MESSAG" music = "$MUSIC_MESSAG"
needclustertext
} }
map MAP21 lookup "PHUSTR_21" map MAP21 lookup "PHUSTR_21"
@ -345,6 +349,7 @@ map MAP30 lookup "PHUSTR_30"
par = 180 par = 180
allowmonstertelefrags allowmonstertelefrags
music = "$MUSIC_OPENIN" music = "$MUSIC_OPENIN"
needclustertext
} }
map MAP31 lookup "PHUSTR_31" map MAP31 lookup "PHUSTR_31"
@ -356,6 +361,7 @@ map MAP31 lookup "PHUSTR_31"
cluster = 9 cluster = 9
par = 120 par = 120
music = "$MUSIC_EVIL" music = "$MUSIC_EVIL"
needclustertext
} }
map MAP32 lookup "PHUSTR_32" map MAP32 lookup "PHUSTR_32"

View file

@ -79,6 +79,7 @@ map MAP06 lookup "THUSTR_6"
cluster = 5 cluster = 5
par = 150 par = 150
music = "$MUSIC_THE_DA" music = "$MUSIC_THE_DA"
needclustertext
} }
map MAP07 lookup "THUSTR_7" map MAP07 lookup "THUSTR_7"
@ -135,6 +136,7 @@ map MAP11 lookup "THUSTR_11"
cluster = 6 cluster = 6
par = 210 par = 210
music = "$MUSIC_STLKS2" music = "$MUSIC_STLKS2"
needclustertext
} }
map MAP12 lookup "THUSTR_12" map MAP12 lookup "THUSTR_12"
@ -179,6 +181,7 @@ map MAP15 lookup "THUSTR_15"
cluster = 7 cluster = 7
par = 210 par = 210
music = "$MUSIC_RUNNI2" music = "$MUSIC_RUNNI2"
needclustertext
} }
map MAP16 lookup "THUSTR_16" map MAP16 lookup "THUSTR_16"
@ -234,6 +237,7 @@ map MAP20 lookup "THUSTR_20"
cluster = 7 cluster = 7
par = 150 par = 150
music = "$MUSIC_MESSAG" music = "$MUSIC_MESSAG"
needclustertext
} }
map MAP21 lookup "THUSTR_21" map MAP21 lookup "THUSTR_21"
@ -345,6 +349,7 @@ map MAP30 lookup "THUSTR_30"
par = 180 par = 180
allowmonstertelefrags allowmonstertelefrags
music = "$MUSIC_OPENIN" music = "$MUSIC_OPENIN"
needclustertext
} }
map MAP31 lookup "THUSTR_31" map MAP31 lookup "THUSTR_31"
@ -356,6 +361,7 @@ map MAP31 lookup "THUSTR_31"
cluster = 9 cluster = 9
par = 120 par = 120
music = "$MUSIC_EVIL" music = "$MUSIC_EVIL"
needclustertext
} }
map MAP32 lookup "THUSTR_32" map MAP32 lookup "THUSTR_32"

View file

@ -1,4 +1,6 @@
000b:00007f7f7f7f7f7f7f7f7f7f7f7f0000 000a:00000008142200000008142200000000
000b:ffffffffffffffffffffffffffffffff
000c:0000002A1C2A00000008142200000000
001c:00000070101010101010101010107000 001c:00000070101010101010101010107000
0021:0000183C3C3C18181800181800000000 0021:0000183C3C3C18181800181800000000
0022:00666666240000000000000000000000 0022:00666666240000000000000000000000

View file

@ -52,6 +52,8 @@ void main()
// NVIDIA FXAA 3.11 by TIMOTHY LOTTES // NVIDIA FXAA 3.11 by TIMOTHY LOTTES
//============================================================================ //============================================================================
#define FXAA_DISCARD 0
#define FXAA_GREEN_AS_LUMA 0 #define FXAA_GREEN_AS_LUMA 0
#define FxaaBool bool #define FxaaBool bool

View file

@ -214,7 +214,7 @@ extend class Actor
} }
} while (count != 0); } while (count != 0);
} }
Exit_Normal(0); Level.ExitLevel(0, false);
} }
void A_BrainSpit(class<Actor> spawntype = null) void A_BrainSpit(class<Actor> spawntype = null)

View file

@ -289,7 +289,7 @@ class EntitySecond : SpectralMonster
{ {
if (CheckBossDeath ()) if (CheckBossDeath ())
{ {
Exit_Normal(0); Level.ExitLevel(0, false);
} }
} }
} }

View file

@ -211,7 +211,7 @@ class ProgLevelEnder : Inventory
{ {
special1 = 255; special1 = 255;
special2 = 1; special2 = 1;
Exit_Normal(0); Level.ExitLevel(0, false);
} }
} }
else else

View file

@ -784,6 +784,8 @@ struct LevelLocals native
native play bool CreateCeiling(sector sec, int type, line ln, double speed, double speed2, double height = 0, int crush = -1, int silent = 0, int change = 0, int crushmode = 0 /*Floor.crushDoom*/); native play bool CreateCeiling(sector sec, int type, line ln, double speed, double speed2, double height = 0, int crush = -1, int silent = 0, int change = 0, int crushmode = 0 /*Floor.crushDoom*/);
native play bool CreateFloor(sector sec, int floortype, line ln, double speed, double height = 0, int crush = -1, int change = 0, bool crushmode = false, bool hereticlower = false); native play bool CreateFloor(sector sec, int floortype, line ln, double speed, double height = 0, int crush = -1, int change = 0, bool crushmode = false, bool hereticlower = false);
native void ExitLevel(int position, bool keepFacing);
native void SecretExitLevel(int position);
} }
struct StringTable native struct StringTable native

View file

@ -89,7 +89,7 @@ class os_Menu : OptionMenu
string actionN = item.GetAction(); string actionN = item.GetAction();
let textItem = ListMenuItemTextItem(item); let textItem = ListMenuItemTextItem(item);
string newPath = textItem string newPath = textItem
? makePath(path, textItem.mText) ? makePath(path, StringTable.Localize(textItem.mText))
: path; : path;
found |= listOptions(targetDesc, actionN, query, newPath, isAnyTermMatches); found |= listOptions(targetDesc, actionN, query, newPath, isAnyTermMatches);