]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Make r_fxaa also enable postprocessing shaders so only one cvar is
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 5 Apr 2014 10:07:18 +0000 (10:07 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 5 Apr 2014 10:07:18 +0000 (10:07 +0000)
needed to enable FXAA.

From: graphitemaster

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12060 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c
makefile.inc

index 9b498cb830000244289a2f27cc66016f8cdcf255..831f3ce3f74c964392a97076c00e10f0d2659233 100644 (file)
@@ -895,7 +895,7 @@ extern qboolean r_shadow_shadowmapsampler;
 extern int r_shadow_shadowmappcf;
 qboolean R_CompileShader_CheckStaticParms(void)
 {
 extern int r_shadow_shadowmappcf;
 qboolean R_CompileShader_CheckStaticParms(void)
 {
-       static int r_compileshader_staticparms_save[1];
+       static int r_compileshader_staticparms_save[(SHADERSTATICPARMS_COUNT + 0x1F) >> 5];
        memcpy(r_compileshader_staticparms_save, r_compileshader_staticparms, sizeof(r_compileshader_staticparms));
        memset(r_compileshader_staticparms, 0, sizeof(r_compileshader_staticparms));
 
        memcpy(r_compileshader_staticparms_save, r_compileshader_staticparms, sizeof(r_compileshader_staticparms));
        memset(r_compileshader_staticparms, 0, sizeof(r_compileshader_staticparms));
 
@@ -6412,7 +6412,7 @@ static void R_Bloom_StartFrame(void)
                Cvar_SetValueQuick(&r_damageblur, 0);
        }
 
                Cvar_SetValueQuick(&r_damageblur, 0);
        }
 
-       if (!(r_glsl_postprocess.integer || (!R_Stereo_ColorMasking() && r_glsl_saturation.value != 1) || (v_glslgamma.integer && !vid_gammatables_trivial))
+       if (!((r_glsl_postprocess.integer || r_fxaa.integer) || (!R_Stereo_ColorMasking() && r_glsl_saturation.value != 1) || (v_glslgamma.integer && !vid_gammatables_trivial))
         && !r_bloom.integer
         && (R_Stereo_Active() || (r_motionblur.value <= 0 && r_damageblur.value <= 0))
         && !useviewfbo
         && !r_bloom.integer
         && (R_Stereo_Active() || (r_motionblur.value <= 0 && r_damageblur.value <= 0))
         && !useviewfbo
index e215245af0532d523886f6f87fd0008980dbae55..c7e98d22ab8a1d60112496e8cf9c31067972c9a3 100644 (file)
@@ -26,6 +26,7 @@ CPUOPTIMIZATIONS?=-fno-math-errno -ffinite-math-only -fno-rounding-math -fno-sig
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
 
 SDL_CONFIG?=sdl-config
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
 
 SDL_CONFIG?=sdl-config
+SDL2_CONFIG?=sdl2-config
 SDLCONFIG_UNIXCFLAGS?=`$(SDL_CONFIG) --cflags`
 SDLCONFIG_UNIXCFLAGS_X11?=
 SDLCONFIG_UNIXLIBS?=`$(SDL_CONFIG) --libs`
 SDLCONFIG_UNIXCFLAGS?=`$(SDL_CONFIG) --cflags`
 SDLCONFIG_UNIXCFLAGS_X11?=
 SDLCONFIG_UNIXLIBS?=`$(SDL_CONFIG) --libs`
@@ -300,36 +301,41 @@ VPATH := ../../../
 help:
        @echo
        @echo "===== Choose one ====="
 help:
        @echo
        @echo "===== Choose one ====="
-       @echo "* $(MAKE) clean               : delete all files produced by the build except"
-       @echo "                             profiling information"
-       @echo "* $(MAKE) clean-profile       : delete all files produced by the build, including"
-       @echo "                             profiling informaiton"
-       @echo "* $(MAKE) help                : this help"
-       @echo "* $(MAKE) debug               : make client and server binaries (debug versions)"
-       @echo "* $(MAKE) profile             : make client and server binaries (profile versions)"
-       @echo "* $(MAKE) release             : make client and server binaries (release versions)"
-       @echo "* $(MAKE) release-profile     : make client and server binaries (release versions)"
-       @echo "                             with profileing optomizations) The profiled"
-       @echo "                             version of the program must have been"
-       @echo "                             previously compiled"
-       @echo "* $(MAKE) nexuiz              : make client and server binaries with nexuiz icon"
-       @echo "                             (release versions)"
-       @echo "* $(MAKE) cl-debug            : make client (debug version)"
-       @echo "* $(MAKE) cl-profile          : make client (profile version)"
-       @echo "* $(MAKE) cl-release          : make client (release version)"
-       @echo "* $(MAKE) cl-release-profile  : make client (release version)"
-       @echo "* $(MAKE) cl-nexuiz           : make client with nexuiz icon (release version)"
-       @echo "* $(MAKE) sv-debug            : make dedicated server (debug version)"
-       @echo "* $(MAKE) sv-profile          : make dedicated server (profile version)"
-       @echo "* $(MAKE) sv-release          : make dedicated server (release version)"
-       @echo "* $(MAKE) sv-release-profile  : make dedicated server (release version)"
-       @echo "* $(MAKE) sv-nexuiz           : make dedicated server with nexuiz icon"
-       @echo "                             (release version)"
-       @echo "* $(MAKE) sdl-debug           : make SDL client (debug version)"
-       @echo "* $(MAKE) sdl-profile         : make SDL client (profile version)"
-       @echo "* $(MAKE) sdl-profile-profile : make SDL client (profile version)"
-       @echo "* $(MAKE) sdl-release         : make SDL client (release version)"
-       @echo "* $(MAKE) sdl-nexuiz          : make SDL client with nexuiz icon (release version)"
+       @echo "* $(MAKE) clean                : delete all files produced by the build except"
+       @echo "                              profiling information"
+       @echo "* $(MAKE) clean-profile        : delete all files produced by the build, including"
+       @echo "                              profiling informaiton"
+       @echo "* $(MAKE) help                 : this help"
+       @echo "* $(MAKE) debug                : make client and server binaries (debug versions)"
+       @echo "* $(MAKE) profile              : make client and server binaries (profile versions)"
+       @echo "* $(MAKE) release              : make client and server binaries (release versions)"
+       @echo "* $(MAKE) release-profile      : make client and server binaries (release versions)"
+       @echo "                              (with profiling optimizations) The profiled"
+       @echo "                              version of the program must have been"
+       @echo "                              previously compiled"
+       @echo "* $(MAKE) nexuiz               : make client and server binaries with nexuiz icon"
+       @echo "                              (release versions)"
+       @echo "* $(MAKE) cl-debug             : make client (debug version)"
+       @echo "* $(MAKE) cl-profile           : make client (profile version)"
+       @echo "* $(MAKE) cl-release-profile   : make client (release profile version)"
+       @echo "* $(MAKE) cl-release           : make client (release version)"
+       @echo "* $(MAKE) cl-nexuiz            : make client with nexuiz icon (release version)"
+       @echo "* $(MAKE) sv-debug             : make dedicated server (debug version)"
+       @echo "* $(MAKE) sv-profile           : make dedicated server (profile version)"
+       @echo "* $(MAKE) sv-release-profile   : make dedicated server (release profile version)"
+       @echo "* $(MAKE) sv-release           : make dedicated server (release version)"
+       @echo "* $(MAKE) sv-nexuiz            : make dedicated server with nexuiz icon"
+       @echo "                              (release version)"
+       @echo "* $(MAKE) sdl-debug            : make SDL client (debug version)"
+       @echo "* $(MAKE) sdl-profile          : make SDL client (profile version)"
+       @echo "* $(MAKE) sdl-release-profile  : make SDL client (release version)"
+       @echo "* $(MAKE) sdl-release          : make SDL client (release version)"
+       @echo "* $(MAKE) sdl-nexuiz           : make SDL client with nexuiz icon (release version)"
+       @echo "* $(MAKE) sdl2-debug           : make SDL2 client (debug version)"
+       @echo "* $(MAKE) sdl2-profile         : make SDL2 client (profile version)"
+       @echo "* $(MAKE) sdl2-release-profile : make SDL2 client (release profile version)"
+       @echo "* $(MAKE) sdl2-release         : make SDL2 client (release version)"
+       @echo "* $(MAKE) sdl2-nexuiz          : make SDL2 client with nexuiz icon (release version)"
        @echo
 
 debug :
        @echo
 
 debug :
@@ -422,6 +428,21 @@ sdl-nexuiz :
                DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \
                EXE='$(EXE_SDLNEXUIZ)' CFLAGS_FEATURES='$(CFLAGS_CLIENT)' LDFLAGS_COMMON='$(LDFLAGS_SDL)' LEVEL=1
 
                DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \
                EXE='$(EXE_SDLNEXUIZ)' CFLAGS_FEATURES='$(CFLAGS_CLIENT)' LDFLAGS_COMMON='$(LDFLAGS_SDL)' LEVEL=1
 
+sdl2-debug :
+       $(MAKE) SDL_CONFIG=$(SDL2_CONFIG) sdl-debug
+
+sdl2-profile :
+       $(MAKE) SDL_CONFIG=$(SDL2_CONFIG) sdl-profile
+
+sdl2-release :
+       $(MAKE) SDL_CONFIG=$(SDL2_CONFIG) sdl-release
+
+sdl2-release-profile :
+       $(MAKE) SDL_CONFIG=$(SDL2_CONFIG) sdl-release-profile
+
+sdl2-nexuiz :
+       $(MAKE) SDL_CONFIG=$(SDL2_CONFIG) sdl-nexuiz
+
 bin-debug :
        $(CHECKLEVEL1)
        @echo
 bin-debug :
        $(CHECKLEVEL1)
        @echo