Skip to content

Commit 8dbdaa7

Browse files
committed
Also remove some clang warnings. Including removing some compiler aguments that are properly only doing things worse now.
1 parent 57b2e3c commit 8dbdaa7

4 files changed

Lines changed: 26 additions & 36 deletions

File tree

Makefile

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,13 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
345345

346346

347347
ifeq ($(ARCH),x86_64)
348-
OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
349-
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
350-
-fstrength-reduce
348+
OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops
351349
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
352350
HAVE_VM_COMPILED = true
353351
else
354352
ifeq ($(ARCH),x86)
355353
OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
356-
-funroll-loops -falign-loops=2 -falign-jumps=2 \
357-
-falign-functions=2 -fstrength-reduce
354+
-funroll-loops
358355
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
359356
HAVE_VM_COMPILED=true
360357
else
@@ -579,15 +576,13 @@ ifeq ($(PLATFORM),mingw32)
579576

580577
ifeq ($(ARCH),x86_64)
581578
OPTIMIZEVM = -O3 -fno-omit-frame-pointer \
582-
-falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \
583-
-fstrength-reduce
579+
-funroll-loops
584580
OPTIMIZE = $(OPTIMIZEVM) --fast-math
585581
HAVE_VM_COMPILED = true
586582
endif
587583
ifeq ($(ARCH),x86)
588584
OPTIMIZEVM = -O3 -march=i586 -fno-omit-frame-pointer \
589-
-falign-loops=2 -funroll-loops -falign-jumps=2 -falign-functions=2 \
590-
-fstrength-reduce
585+
-funroll-loops
591586
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
592587
OPTIMIZE += -flto
593588
HAVE_VM_COMPILED = true
@@ -739,16 +734,13 @@ ifeq ($(PLATFORM),openbsd)
739734
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
740735

741736
ifeq ($(ARCH),x86_64)
742-
OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
743-
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
744-
-fstrength-reduce
737+
OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops
745738
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
746739
HAVE_VM_COMPILED = true
747740
else
748741
ifeq ($(ARCH),x86)
749742
OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
750-
-funroll-loops -falign-loops=2 -falign-jumps=2 \
751-
-falign-functions=2 -fstrength-reduce
743+
-funroll-loops
752744
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
753745
HAVE_VM_COMPILED=true
754746
else
@@ -885,9 +877,7 @@ ifeq ($(PLATFORM),sunos)
885877
HAVE_VM_COMPILED=true
886878
else
887879
ifeq ($(ARCH),x86)
888-
OPTIMIZEVM += -march=i586 -fomit-frame-pointer \
889-
-falign-loops=2 -falign-jumps=2 \
890-
-falign-functions=2 -fstrength-reduce
880+
OPTIMIZEVM += -march=i586 -fomit-frame-pointer
891881
HAVE_VM_COMPILED=true
892882
BASE_CFLAGS += -m32
893883
CLIENT_CFLAGS += -I/usr/X11/include/NVIDIA

code/renderer_oa/tr_bloom.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,13 @@ static void R_Bloom_InitTextures( void )
331331

332332
data = ri.Hunk_AllocateTempMemory( bloom.screen.width * bloom.screen.height * 4 );
333333
Com_Memset( data, 0, bloom.screen.width * bloom.screen.height * 4 );
334-
bloom.screen.texture = R_CreateImage( "***bloom screen texture***", data, bloom.screen.width, bloom.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
334+
bloom.screen.texture = R_CreateImage( "***bloom screen texture***", data, bloom.screen.width, bloom.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
335335
ri.Hunk_FreeTempMemory( data );
336336

337337
data = ri.Hunk_AllocateTempMemory( bloom.effect.width * bloom.effect.height * 4 );
338338
Com_Memset( data, 0, bloom.effect.width * bloom.effect.height * 4 );
339-
bloom.effect.texture = R_CreateImage( "***bloom effect texture***", data, bloom.effect.width, bloom.effect.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
340-
bloom.effect2.texture = R_CreateImage( "***bloom effect texture 2***", data, bloom.effect.width, bloom.effect.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
339+
bloom.effect.texture = R_CreateImage( "***bloom effect texture***", data, bloom.effect.width, bloom.effect.height, 0, 0, GL_CLAMP_TO_EDGE );
340+
bloom.effect2.texture = R_CreateImage( "***bloom effect texture 2***", data, bloom.effect.width, bloom.effect.height, 0, 0, GL_CLAMP_TO_EDGE );
341341
ri.Hunk_FreeTempMemory( data );
342342
bloom.started = qtrue;
343343
force32upload = 0;
@@ -1170,7 +1170,7 @@ static void R_Postprocess_InitTextures( void )
11701170

11711171
data = ri.Hunk_AllocateTempMemory( postproc.screen.width * postproc.screen.height * 4 );
11721172
Com_Memset( data, 0, postproc.screen.width * postproc.screen.height * 4 );
1173-
postproc.screen.texture = R_CreateImage( "***postproc screen texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1173+
postproc.screen.texture = R_CreateImage( "***postproc screen texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
11741174
ri.Hunk_FreeTempMemory( data );
11751175

11761176
// leilei - tv output texture
@@ -1207,7 +1207,7 @@ static void R_Postprocess_InitTextures( void )
12071207

12081208
data = ri.Hunk_AllocateTempMemory( tvWidth * tvHeight * 4 );
12091209
Com_Memset( data, 0, tvWidth * tvHeight * 4 );
1210-
postproc.tv.texture = R_CreateImage( "***tv output screen texture***", data, tvWidth, tvHeight, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1210+
postproc.tv.texture = R_CreateImage( "***tv output screen texture***", data, tvWidth, tvHeight, 0, 0, GL_CLAMP_TO_EDGE );
12111211
ri.Hunk_FreeTempMemory( data );
12121212
}
12131213

@@ -1216,15 +1216,15 @@ static void R_Postprocess_InitTextures( void )
12161216
if (r_motionblur->integer > 2) {
12171217
data = ri.Hunk_AllocateTempMemory( postproc.screen.width * postproc.screen.height * 4 );
12181218
Com_Memset( data, 0, postproc.screen.width * postproc.screen.height * 4 );
1219-
postproc.motion1.texture = R_CreateImage( "***motionblur1 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1220-
postproc.motion2.texture = R_CreateImage( "***motionblur2 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1221-
postproc.motion3.texture = R_CreateImage( "***motionblur3 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1222-
postproc.motion4.texture = R_CreateImage( "***motionblur4 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1223-
postproc.motion5.texture = R_CreateImage( "***motionblur5 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1224-
postproc.mpass1.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1225-
postproc.mpass2.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1226-
postproc.mpass3.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1227-
postproc.mpass4.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1219+
postproc.motion1.texture = R_CreateImage( "***motionblur1 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1220+
postproc.motion2.texture = R_CreateImage( "***motionblur2 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1221+
postproc.motion3.texture = R_CreateImage( "***motionblur3 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1222+
postproc.motion4.texture = R_CreateImage( "***motionblur4 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1223+
postproc.motion5.texture = R_CreateImage( "***motionblur5 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1224+
postproc.mpass1.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1225+
postproc.mpass2.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1226+
postproc.mpass3.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
1227+
postproc.mpass4.texture = R_CreateImage( "***motionaccum1 texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
12281228
ri.Hunk_FreeTempMemory( data );
12291229
}
12301230

@@ -1233,7 +1233,7 @@ static void R_Postprocess_InitTextures( void )
12331233
data = ri.Hunk_AllocateTempMemory( postproc.screen.width * postproc.screen.height *4);
12341234
Com_Memset( data, 0, postproc.screen.width * postproc.screen.height * 4 );
12351235
depthimage=1;
1236-
postproc.depth.texture = R_CreateImage( "***depthbuffer texture***", data, postproc.screen.width, postproc.screen.height, qfalse, qfalse, GL_CLAMP_TO_EDGE );
1236+
postproc.depth.texture = R_CreateImage( "***depthbuffer texture***", data, postproc.screen.width, postproc.screen.height, 0, 0, GL_CLAMP_TO_EDGE );
12371237
depthimage=0;
12381238
ri.Hunk_FreeTempMemory( data );
12391239

code/renderer_oa/tr_particles.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ void R_AddParticles (void)
866866
VectorCopy(p->org, oldorg);
867867
// if we're told to die, it's most likely a quake particle.
868868
if (p->die) {
869-
int scal = 2.6f;
869+
int scal = 2;
870870
p->endtime = THEtime + (p->die);
871871
p->die = 0;
872872
p->height= scal;

code/renderer_oa/tr_shader.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5385,13 +5385,13 @@ shader_t *R_FindShaderReal( const char *name, int lightmapIndex, qboolean mipRaw
53855385
detailhack = 1;
53865386
if (material == 1) {
53875387
// metalsteps
5388-
stages[thisstage].bundle[0].image[0] = R_FindImageFile( "gfx/fx/detail/d_genericmetal.tga", IMGFLAG_MIPMAP , IMGFLAG_MIPMAP);
5388+
stages[thisstage].bundle[0].image[0] = R_FindImageFile( "gfx/fx/detail/d_genericmetal.tga", IMGTYPE_NORMAL , IMGFLAG_MIPMAP);
53895389
}
53905390
else if (hasaDetailImage && imageDetail) {
53915391
stages[thisstage].bundle[0].image[0] = imageDetail;
53925392
}
53935393
else {
5394-
stages[thisstage].bundle[0].image[0] = R_FindImageFile( "gfx/fx/detail/d_generic.tga", IMGFLAG_MIPMAP , IMGFLAG_MIPMAP);
5394+
stages[thisstage].bundle[0].image[0] = R_FindImageFile( "gfx/fx/detail/d_generic.tga", IMGTYPE_NORMAL , IMGFLAG_MIPMAP);
53955395
}
53965396
stages[thisstage].active = qtrue;
53975397
stages[thisstage].rgbGen = CGEN_IDENTITY;
@@ -5566,7 +5566,7 @@ shader_t *R_FindShaderReal( const char *name, int lightmapIndex, qboolean mipRaw
55665566

55675567
if (f+2 > MAX_SHADER_STAGES) break;// don't exceed limit!
55685568

5569-
stages[2+f].bundle[0].image[0] = R_FindImageFile( "gfx/fx/detail/d_generic.tga", IMGFLAG_MIPMAP , IMGFLAG_MIPMAP); // TODO: use metal detail for metal surfaces
5569+
stages[2+f].bundle[0].image[0] = R_FindImageFile( "gfx/fx/detail/d_generic.tga", IMGTYPE_NORMAL , IMGFLAG_MIPMAP); // TODO: use metal detail for metal surfaces
55705570

55715571
// determine detail size first, our detail textures are typically 128x128
55725572
wi = 0.25 * (f + 1) * stages[1].bundle[0].image[0]->uploadWidth / detailScale;

0 commit comments

Comments
 (0)