Slight performance improvements

This commit is contained in:
Simon 2020-04-03 23:20:50 +01:00
parent d3c4f71d5b
commit b55c77987c
4 changed files with 12 additions and 5 deletions

View file

@ -95,7 +95,7 @@ PFNEGLGETSYNCATTRIBKHRPROC eglGetSyncAttribKHR;
//Let's go to the maximum! //Let's go to the maximum!
int CPU_LEVEL = 4; int CPU_LEVEL = 4;
int GPU_LEVEL = 4; int GPU_LEVEL = 4;
int NUM_MULTI_SAMPLES = 2; int NUM_MULTI_SAMPLES = 1;
float SS_MULTIPLIER = 1.0f; float SS_MULTIPLIER = 1.0f;
jclass clazz; jclass clazz;
@ -112,6 +112,7 @@ float degrees(float rad) {
struct arg_dbl *ss; struct arg_dbl *ss;
struct arg_int *cpu; struct arg_int *cpu;
struct arg_int *gpu; struct arg_int *gpu;
struct arg_int *msaa;
struct arg_end *end; struct arg_end *end;
char **argv; char **argv;
@ -1743,6 +1744,7 @@ JNIEXPORT jlong JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onCreate( JNIEnv
ss = arg_dbl0("s", "supersampling", "<double>", "super sampling value (e.g. 1.0)"), ss = arg_dbl0("s", "supersampling", "<double>", "super sampling value (e.g. 1.0)"),
cpu = arg_int0("c", "cpu", "<int>", "CPU perf index 1-4 (default: 2)"), cpu = arg_int0("c", "cpu", "<int>", "CPU perf index 1-4 (default: 2)"),
gpu = arg_int0("g", "gpu", "<int>", "GPU perf index 1-4 (default: 3)"), gpu = arg_int0("g", "gpu", "<int>", "GPU perf index 1-4 (default: 3)"),
msaa = arg_int0("m", "msaa", "<int>", "MSAA 1-4 (default: 1)"),
end = arg_end(20) end = arg_end(20)
}; };
@ -1780,6 +1782,11 @@ JNIEXPORT jlong JNICALL Java_com_drbeef_questzdoom_GLES3JNILib_onCreate( JNIEnv
{ {
GPU_LEVEL = gpu->ival[0]; GPU_LEVEL = gpu->ival[0];
} }
if (msaa->count > 0 && msaa->ival[0] > 0 && msaa->ival[0] < 5)
{
NUM_MULTI_SAMPLES = msaa->ival[0];
}
} }
//initialize_gl4es(); //initialize_gl4es();

View file

@ -116,7 +116,7 @@ IMPLEMENT_POINTERS_START(DCorpsePointer)
IMPLEMENT_POINTER(Corpse) IMPLEMENT_POINTER(Corpse)
IMPLEMENT_POINTERS_END IMPLEMENT_POINTERS_END
CUSTOM_CVAR(Int, sv_corpsequeuesize, 64, CVAR_ARCHIVE|CVAR_SERVERINFO) CUSTOM_CVAR(Int, sv_corpsequeuesize, 10, CVAR_ARCHIVE|CVAR_SERVERINFO)
{ {
if (self > 0) if (self > 0)
{ {

View file

@ -542,7 +542,7 @@ DBaseDecal *DBaseDecal::CloneSelf (const FDecalTemplate *tpl, double ix, double
return decal; return decal;
} }
CUSTOM_CVAR (Int, cl_maxdecals, 1024, CVAR_ARCHIVE) CUSTOM_CVAR (Int, cl_maxdecals, 20, CVAR_ARCHIVE)
{ {
if (self < 0) if (self < 0)
{ {

View file

@ -54,7 +54,7 @@
// Texture CVARs // Texture CVARs
// //
//========================================================================== //==========================================================================
CUSTOM_CVAR(Float,gl_texture_filter_anisotropic,8.0f,CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL) CUSTOM_CVAR(Float,gl_texture_filter_anisotropic,4.0f,CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
{ {
if (GLRenderer != NULL && GLRenderer->mSamplerManager != NULL) GLRenderer->mSamplerManager->SetTextureFilterMode(); if (GLRenderer != NULL && GLRenderer->mSamplerManager != NULL) GLRenderer->mSamplerManager->SetTextureFilterMode();
} }
@ -64,7 +64,7 @@ CCMD(gl_flush)
if (GLRenderer != NULL) GLRenderer->FlushTextures(); if (GLRenderer != NULL) GLRenderer->FlushTextures();
} }
CUSTOM_CVAR(Int, gl_texture_filter, 6, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL) CUSTOM_CVAR(Int, gl_texture_filter, 3, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCALL)
{ {
if (self < 0 || self > 6) self=4; if (self < 0 || self > 6) self=4;
if (GLRenderer != NULL && GLRenderer->mSamplerManager != NULL) GLRenderer->mSamplerManager->SetTextureFilterMode(); if (GLRenderer != NULL && GLRenderer->mSamplerManager != NULL) GLRenderer->mSamplerManager->SetTextureFilterMode();