Disable DC_SH4 optimizations

This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis 2025-01-09 19:03:37 +02:00
parent fa65f637ad
commit e17fa50d81
3 changed files with 9 additions and 9 deletions

View File

@ -27,7 +27,7 @@ CrossProduct(const CVector &v1, const CVector &v2)
CVector
Multiply3x3(const CMatrix &mat, const CVector &vec)
{
#ifdef DC_SH4
#if defined(DC_SH4) && 0
register float __x __asm__("fr12") = vec.x;
register float __y __asm__("fr13") = vec.y;
register float __z __asm__("fr14") = vec.z;
@ -58,7 +58,7 @@ Multiply3x3(const CVector &vec, const CMatrix &mat)
CVector
operator*(const CMatrix &mat, const CVector &vec)
{
#ifdef DC_SH4
#if defined(DC_SH4) && 0
CVector out;
mat_load(reinterpret_cast<matrix_t *>(const_cast<CMatrix *>(&mat)));
mat_trans_single3_nodiv_nomod(vec.x, vec.y, vec.z, out.x, out.y, out.z);

View File

@ -20,7 +20,7 @@ public:
// (0,1,0) means no rotation. So get right vector and its atan
__always_inline float Heading(void) const { return Atan2(-x, y); }
__always_inline float Magnitude(void) const {
#ifdef DC_SH4
#if defined(DC_SH4) && 0
float w;
vec3f_length(x, y, z, w);
return w;
@ -29,7 +29,7 @@ public:
#endif
}
__always_inline float MagnitudeSqr(void) const {
#ifdef DC_SH4
#if defined(DC_SH4) && 0
return fipr_magnitude_sqr(x, y,z, 0.0f);
#else
return x*x + y*y + z*z;
@ -118,7 +118,7 @@ inline CVector operator/(const CVector &left, float right)
__always_inline float
DotProduct(const CVector &v1, const CVector &v2)
{
#ifdef DC_SH4
#if defined(DC_SH4) && 0
return fipr(v1.x, v1.y, v1.z, 0.0f, v2.x, v2.y, v2.z, 0.0f);
#else
return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
@ -131,7 +131,7 @@ inline float
Distance(const CVector &v1, const CVector &v2)
{
float w;
#ifdef DC_SH4
#if defined(DC_SH4) && 0
vec3f_distance(v1.x, v1.y, v1.z, v2.x, v2.y, v2.z, w);
return w;
#else

View File

@ -43,7 +43,7 @@ __always_inline void TransformPoint(CVuVector &out, const CMatrix &mat, const CV
vmaddw.xyz vf06,vf05,vf00\n\
sqc2 vf06,0x0(%0)\n\
": : "r" (&out) , "r" (&mat) ,"r" (&in): "memory");
#elif defined(DC_SH4)
#elif defined(DC_SH4) && 0
mat_load(reinterpret_cast<matrix_t *>(const_cast<CMatrix *>(&mat)));
mat_trans_nodiv_nomod(in.x, in.y, in.z, out.x, out.y, out.z, out.y);
#else
@ -70,7 +70,7 @@ __always_inline void TransformPoint(CVuVector &out, const CMatrix &mat, const Rw
vmaddw.xyz vf06,vf05,vf00\n\
sqc2 vf06,0x0(%0)\n\
": : "r" (&out) , "r" (&mat) ,"r" (&in): "memory");
#elif defined(DC_SH4)
#elif defined(DC_SH4) && 0
mat_load(reinterpret_cast<matrix_t *>(const_cast<CMatrix *>(&mat)));
mat_trans_nodiv_nomod(in.x, in.y, in.z, out.x, out.y, out.z, out.y);
#else
@ -108,7 +108,7 @@ __always_inline void TransformPoints(CVuVector *out, int n, const CMatrix &mat,
sqc2 vf06,-0x10(%0)\n\
bnez %1,1b\n\
": : "r" (out) , "r" (n), "r" (&mat), "r" (in), "r" (stride): "memory");
#elif defined(DC_SH4)
#elif defined(DC_SH4) && 0
mat_load(reinterpret_cast<matrix_t *>(const_cast<CMatrix *>(&mat)));
mat_transform(reinterpret_cast<vector_t *>(const_cast<RwV3d *>(in)),
reinterpret_cast<vector_t *>(out),