Compare commits
4 Commits
Pgta/Duck-
...
skmp/disab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2db1ddf5b7 | ||
|
|
22c26d9eb1 | ||
|
|
7ab6a52732 | ||
|
|
e17fa50d81 |
Binary file not shown.
@@ -83,24 +83,25 @@ OBJS_TEXCONV += \
|
||||
# Add compilation units to this list to explicity compile them with
|
||||
# -O3 optimizations, while the rest get the default (-Os) treatment
|
||||
# to conserve RAM.
|
||||
OBJS_O3 = \
|
||||
../vendor/librw/src/dc/rwdc.o \
|
||||
../src/core/World.o \
|
||||
../src/collision/Collision.o \
|
||||
../src/math/math.o \
|
||||
../src/math/Matrix.o \
|
||||
../src/math/Quaternion.o \
|
||||
../src/math/Rect.o \
|
||||
../src/math/Vector.o \
|
||||
../vendor/librw/src/base.o \
|
||||
../src/renderer/Shadows.o
|
||||
OBJS_O3 =
|
||||
# \
|
||||
# ../vendor/librw/src/dc/rwdc.o \
|
||||
# ../src/core/World.o \
|
||||
# ../src/collision/Collision.o \
|
||||
# ../src/math/math.o \
|
||||
# ../src/math/Matrix.o \
|
||||
# ../src/math/Quaternion.o \
|
||||
# ../src/math/Rect.o \
|
||||
# ../src/math/Vector.o \
|
||||
# ../vendor/librw/src/base.o \
|
||||
# ../src/renderer/Shadows.o
|
||||
|
||||
OBJS_NO_FAST_MATH = \
|
||||
../src/core/Cam.o \
|
||||
../src/core/Camera.o
|
||||
|
||||
KOS_CPPFLAGS += -fbuiltin -ffast-math -ffp-contract=fast \
|
||||
-mfsrra -mfsca
|
||||
KOS_CPPFLAGS += -mfsrra -mfsca -fbuiltin #-ffast-math -ffp-contract=fast \
|
||||
|
||||
|
||||
ifdef KOS_BASE
|
||||
include $(KOS_BASE)/Makefile.rules
|
||||
@@ -113,9 +114,9 @@ DEPS = $(OBJS:.o=.d) $(OBJS_TEXCONV:.o:.d)
|
||||
CXXFLAGS += $(if $(WITH_32MB),-O3,-Os) \
|
||||
$(if $(WITH_IDE),-DWITH_IDE) \
|
||||
$(if $(WITH_PROF),-DWITH_PROF=\"$(WITH_PROF)\") \
|
||||
-MMD -MP -ffunction-sections -fdata-sections -ffast-math \
|
||||
-MMD -MP -ffunction-sections -fdata-sections \
|
||||
-fmerge-all-constants -fomit-frame-pointer -ml -std=gnu++20 \
|
||||
-fno-exceptions -fno-rtti -flto=auto -fipa-pta -Wno-write-strings \
|
||||
-fno-exceptions -fno-rtti -fipa-pta -Wno-write-strings \
|
||||
-Wno-deprecated-enum-enum-conversion -Wno-deprecated-enum-float-conversion \
|
||||
-Wno-multichar -Wno-unused-value -Wno-char-subscripts -Wno-reorder \
|
||||
-Wno-unused-function -Wno-class-memaccess -fno-permissive \
|
||||
@@ -155,7 +156,7 @@ $(OBJS_NO_FAST_MATH): %.o: %.cpp
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
kos-c++ -o $(TARGET) $(OBJS) -Wl,--gc-sections -Wl,--as-needed -Wl,-Map,output.map \
|
||||
-flto=auto $(if $(WITH_IDE),-lkosfat) $(if $(WITH_SD),-lkosfat) -Wl,--build-id=sha1
|
||||
$(if $(WITH_IDE),-lkosfat) $(if $(WITH_SD),-lkosfat) -Wl,--build-id=sha1
|
||||
@echo && echo && echo "*** Build Completed Successfully ***" && echo && echo
|
||||
|
||||
run: $(TARGET)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
3
vendor/librw/src/dc/rwdc.cpp
vendored
3
vendor/librw/src/dc/rwdc.cpp
vendored
@@ -2462,8 +2462,7 @@ void* interpolateAndSubmit(void* dst, const void* src1, const void* src2, uint32
|
||||
float16 v_u = v1_u + t * (v2_u - v1_u);
|
||||
float16 v_v = v1_v + t * (v2_v - v1_v);
|
||||
|
||||
v->u = v_u.raw;
|
||||
v->v = v_v.raw;
|
||||
v->uv = v_v.raw | (v_u.raw << 16);
|
||||
|
||||
pvr_dr_commit(v);
|
||||
v ++;
|
||||
|
||||
Reference in New Issue
Block a user