Skip to content

Commit 3239c6e

Browse files
committed
padding
1 parent 274d91f commit 3239c6e

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

src/engine/qcommon/q_math.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,8 @@ void ZeroBounds( bounds_t &b )
836836
void ClearBounds( bounds_t &b )
837837
{
838838
bounds_t cleared = {
839-
{ 99999, 99999, 99999 },
840-
{ -99999, -99999, -99999 },
839+
{ 99999, 99999, 99999 }, 0,
840+
{ -99999, -99999, -99999 }, 0,
841841
};
842842

843843
BoundsCopy( cleared, b );

src/engine/qcommon/q_shared.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ void Com_Free_Aligned( void *ptr );
299299
struct bounds_t
300300
{
301301
alignas(16) vec3_t mins;
302+
vec_t pad_mins;
302303
alignas(16) vec3_t maxs;
304+
vec_t pad_maxs;
303305

304306
vec3_t& at( bool index )
305307
{
@@ -1718,7 +1720,7 @@ void MatrixTransformBounds( const matrix_t m, const bounds_t &b, bounds_t &o );
17181720
vec_t dist;
17191721
byte type; // for fast side tests: 0,1,2 = axial, 3 = nonaxial
17201722
byte signbits; // signx + (signy<<1) + (signz<<2), used as lookup during collision
1721-
byte pad[ 2 ];
1723+
byte pad[ 12 ];
17221724
};
17231725

17241726
enum class traceType_t

src/engine/renderer/tr_backend.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,8 +3374,8 @@ static void RB_RenderDebugUtils()
33743374
vec3_t forward, left, up;
33753375

33763376
static const bounds_t size = {
3377-
{ -2, -2, -2 },
3378-
{ 2, 2, 2 },
3377+
{ -2, -2, -2 }, 0,
3378+
{ 2, 2, 2 }, 0,
33793379
};
33803380

33813381
gl_genericShader->SetVertexSkinning( false );
@@ -3517,8 +3517,8 @@ static void RB_RenderDebugUtils()
35173517
Color::Color lightColor;
35183518

35193519
static const bounds_t size = {
3520-
{ -1, -1, -1 },
3521-
{ 1, 1, 1 },
3520+
{ -1, -1, -1 }, 0,
3521+
{ 1, 1, 1 }, 0,
35223522
};
35233523

35243524
gl_genericShader->SetVertexSkinning( false );
@@ -3635,8 +3635,8 @@ static void RB_RenderDebugUtils()
36353635
int i;
36363636

36373637
static const bounds_t size = {
3638-
{ -1, -1, -1 },
3639-
{ 1, 1, 1 },
3638+
{ -1, -1, -1 }, 0,
3639+
{ 1, 1, 1 }, 0,
36403640
};
36413641

36423642
gl_genericShader->SetVertexSkinning( false );
@@ -3983,13 +3983,13 @@ static void RB_RenderDebugUtils()
39833983
!( backEnd.refdef.rdflags & ( RDF_NOWORLDMODEL | RDF_NOCUBEMAP ) ) )
39843984
{
39853985
static const bounds_t size = {
3986-
{ -8, -8, -8 },
3987-
{ 8, 8, 8 },
3986+
{ -8, -8, -8 }, 0,
3987+
{ 8, 8, 8 }, 0,
39883988
};
39893989

39903990
static const bounds_t outline = {
3991-
{ -9, -9, -9 },
3992-
{ 9, 9, 9 },
3991+
{ -9, -9, -9 }, 0,
3992+
{ 9, 9, 9 }, 0,
39933993
};
39943994

39953995
// choose right shader program ----------------------------------

src/engine/renderer/tr_main.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,12 +1112,7 @@ void R_CalcFrustumFarCornersUnsafe( const plane_t frustum[ FRUSTUM_FAR + 1 ], ve
11121112

11131113
static void CopyPlane( const cplane_t *in, cplane_t *out )
11141114
{
1115-
VectorCopy( in->normal, out->normal );
1116-
out->dist = in->dist;
1117-
out->type = in->type;
1118-
out->signbits = in->signbits;
1119-
out->pad[ 0 ] = in->pad[ 0 ];
1120-
out->pad[ 1 ] = in->pad[ 1 ];
1115+
memcpy( out, in, sizeof(cplane_t) );
11211116
}
11221117

11231118
static void R_SetupSplitFrustums()

0 commit comments

Comments
 (0)