mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 10:38:53 +00:00
Fixed compile and runtime problems
This commit is contained in:
parent
a18d2609ce
commit
77a73a2cd2
8 changed files with 11 additions and 44 deletions
|
@ -233,7 +233,7 @@ typedef enum
|
|||
STENCIL_OP_DECRWRAP
|
||||
} stencilOperation_t;
|
||||
|
||||
typedef struct
|
||||
struct stencilStage_t
|
||||
{
|
||||
// The value to be compared against (if Comp is anything else than always) and/or the value to be written to the buffer
|
||||
// (if either Pass, Fail or ZFail is set to replace).
|
||||
|
@ -259,7 +259,7 @@ typedef struct
|
|||
|
||||
// What to do with the contents of the buffer if the stencil test passes, but the depth test fails.
|
||||
stencilOperation_t zFail = STENCIL_OP_KEEP;
|
||||
} stencilStage_t;
|
||||
};
|
||||
// SP End
|
||||
|
||||
|
||||
|
|
|
@ -257,15 +257,15 @@ void Framebuffer::AddStencilBuffer( int format, int multiSamples )
|
|||
{
|
||||
}
|
||||
|
||||
void Framebuffer::AttachImage2D( int target, const idImage* image, int index, int mipmapLod )
|
||||
void Framebuffer::AttachImage2D( int target, idImage* image, int index, int mipmapLod )
|
||||
{
|
||||
}
|
||||
|
||||
void Framebuffer::AttachImageDepth( int target, const idImage* image )
|
||||
void Framebuffer::AttachImageDepth( int target, idImage* image )
|
||||
{
|
||||
}
|
||||
|
||||
void Framebuffer::AttachImageDepthLayer( const idImage* image, int layer )
|
||||
void Framebuffer::AttachImageDepthLayer( idImage* image, int layer )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -527,37 +527,6 @@ void Framebuffer::AddStencilBuffer( int format, int multiSamples )
|
|||
GL_CheckErrors();
|
||||
}
|
||||
|
||||
void Framebuffer::AddStencilBuffer( int format, int multiSamples )
|
||||
{
|
||||
stencilFormat = format;
|
||||
|
||||
bool notCreatedYet = stencilBuffer == 0;
|
||||
if( notCreatedYet )
|
||||
{
|
||||
glGenRenderbuffers( 1, &stencilBuffer );
|
||||
}
|
||||
|
||||
glBindRenderbuffer( GL_RENDERBUFFER, stencilBuffer );
|
||||
|
||||
if( multiSamples > 0 )
|
||||
{
|
||||
glRenderbufferStorageMultisample( GL_RENDERBUFFER, multiSamples, format, width, height );
|
||||
|
||||
msaaSamples = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
glRenderbufferStorage( GL_RENDERBUFFER, format, width, height );
|
||||
}
|
||||
|
||||
if( notCreatedYet )
|
||||
{
|
||||
glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, stencilBuffer );
|
||||
}
|
||||
|
||||
GL_CheckErrors();
|
||||
}
|
||||
|
||||
void Framebuffer::AttachImage2D( int target, idImage* image, int index, int mipmapLod )
|
||||
{
|
||||
if( ( target != GL_TEXTURE_2D ) && ( target != GL_TEXTURE_2D_MULTISAMPLE ) && ( target < GL_TEXTURE_CUBE_MAP_POSITIVE_X || target > GL_TEXTURE_CUBE_MAP_NEGATIVE_Z ) )
|
||||
|
|
|
@ -325,6 +325,7 @@ void idRenderBackend::BindVariableStageImage( const textureStage_t* texture, con
|
|||
else
|
||||
{
|
||||
globalImages->blackImage->Bind();
|
||||
|
||||
// because the shaders may have already been set - we need to make sure we are not using a bink shader which would
|
||||
// display incorrectly. We may want to get rid of RB_BindVariableStageImage and inline the code so that the
|
||||
// SWF GUI case is handled better, too
|
||||
|
|
|
@ -454,7 +454,8 @@ void idRenderProgManager::Init( nvrhi::IDevice* _device )
|
|||
// RB end
|
||||
{ BUILTIN_STEREO_DEGHOST, "builtin/VR/stereoDeGhost", "", {}, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
{ BUILTIN_STEREO_WARP, "builtin/VR/stereoWarp", "", {}, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
{ BUILTIN_BINK, "builtin/video/bink", "", {}, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
{ BUILTIN_BINK, "builtin/video/bink", "", { {"USE_SRGB", "0" } }, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
{ BUILTIN_BINK_SRGB, "builtin/video/bink", "_srgb", { {"USE_SRGB", "1" } }, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
{ BUILTIN_BINK_GUI, "builtin/video/bink_gui", "", {}, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
{ BUILTIN_STEREO_INTERLACE, "builtin/VR/stereoInterlace", "", {}, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
{ BUILTIN_MOTION_BLUR, "builtin/post/motionBlur", "", {}, false, SHADER_STAGE_DEFAULT, LAYOUT_DRAW_VERT, BINDING_LAYOUT_DEFAULT },
|
||||
|
|
|
@ -372,6 +372,7 @@ enum
|
|||
BUILTIN_STEREO_DEGHOST,
|
||||
BUILTIN_STEREO_WARP,
|
||||
BUILTIN_BINK,
|
||||
BUILTIN_BINK_SRGB, // SRS - Added Bink shader without sRGB to linear conversion for testVideo cmd
|
||||
BUILTIN_BINK_GUI,
|
||||
BUILTIN_STEREO_INTERLACE,
|
||||
BUILTIN_MOTION_BLUR,
|
||||
|
@ -856,7 +857,6 @@ public:
|
|||
BindShader_Builtin( BUILTIN_BINK );
|
||||
}
|
||||
|
||||
// SRS - Added Bink shader without sRGB to linear conversion for testVideo cmd
|
||||
void BindShader_Bink_sRGB()
|
||||
{
|
||||
BindShader_Builtin( BUILTIN_BINK_SRGB );
|
||||
|
@ -955,7 +955,6 @@ private:
|
|||
idStr StripDeadCode( const idStr& in, const char* name, const idStrList& compileMacros, bool builtin );
|
||||
idStr ConvertCG2GLSL( const idStr& in, const char* name, rpStage_t stage, idStr& outLayout, bool vkGLSL, bool hasGPUSkinning, vertexLayoutType_t vertexLayout );
|
||||
|
||||
BUILTIN_BINK_SRGB, // SRS - Added Bink shader without sRGB to linear conversion for testVideo cmd
|
||||
int builtinShaders[MAX_BUILTINS];
|
||||
void BindShader_Builtin( int i )
|
||||
{
|
||||
|
|
|
@ -666,9 +666,6 @@ void R_TestVideo_f( const idCmdArgs& args )
|
|||
int len = tr.testVideo->AnimationLength();
|
||||
common->Printf( "%5.1f seconds of video\n", len * 0.001 );
|
||||
|
||||
// SRS - Not needed or used since InitFromFile() sets the correct start time automatically
|
||||
//tr.testVideoStartTime = tr.primaryRenderView.time[1];
|
||||
|
||||
// try to play the matching wav file
|
||||
idStr wavString = args.Argv( ( args.Argc() == 2 ) ? 1 : 2 );
|
||||
wavString.StripFileExtension();
|
||||
|
|
|
@ -92,8 +92,8 @@ builtin/fog/blendLight.ps.hlsl -T ps_5_0
|
|||
builtin/fog/fog.vs.hlsl -T vs_5_0 -D USE_GPU_SKINNING={0,1}
|
||||
builtin/fog/fog.ps.hlsl -T ps_5_0 -D USE_GPU_SKINNING={0,1}
|
||||
|
||||
builtin/video/bink.vs.hlsl -T vs_5_0
|
||||
builtin/video/bink.ps.hlsl -T ps_5_0
|
||||
builtin/video/bink.vs.hlsl -T vs_5_0 -D USE_SRGB={0,1}
|
||||
builtin/video/bink.ps.hlsl -T ps_5_0 -D USE_SRGB={0,1}
|
||||
builtin/video/bink_gui.vs.hlsl -T vs_5_0
|
||||
builtin/video/bink_gui.ps.hlsl -T ps_5_0
|
||||
|
||||
|
|
Loading…
Reference in a new issue