dynpip programs
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
; ______ ____ ___
|
||||
; | \/ ____| |___|
|
||||
; | | | \ | |
|
||||
;---------------------------------------------------------------
|
||||
; Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
; Licenced under Apache License 2.0
|
||||
; Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
;
|
||||
;---------------------------------------------------------------
|
||||
; Triangle list
|
||||
; Cull = Standard PS2 way. clipw polys are culled.
|
||||
; Animation
|
||||
; Colors
|
||||
;---------------------------------------------------------------
|
||||
|
||||
.syntax new
|
||||
.name DynPipVU1_C
|
||||
.vu
|
||||
.init_vf_all
|
||||
.init_vi_all
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared_macros/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared_macros/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define RGBA_STORE_OFFSET 0
|
||||
#define XYZ2_STORE_OFFSET 1
|
||||
|
||||
--enter
|
||||
--endenter
|
||||
|
||||
#vuprog DynPipVU1C
|
||||
|
||||
--cont
|
||||
|
||||
#endvuprog
|
||||
|
||||
--exit
|
||||
--endexit
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_c_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_C_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_C_CodeEnd __attribute__((section(".vudata")));
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
DynPipCVU1Program::DynPipCVU1Program()
|
||||
: DynPipVU1Program(
|
||||
DynPipColor, &DynPipVU1_C_CodeStart, &DynPipVU1_C_CodeEnd,
|
||||
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2, 2) {}
|
||||
|
||||
DynPipCVU1Program::~DynPipCVU1Program() {}
|
||||
|
||||
std::string DynPipCVU1Program::getStringName() const {
|
||||
return std::string("DynPip - C");
|
||||
}
|
||||
|
||||
void DynPipCVU1Program::addProgramQBufferDataToPacket(
|
||||
packet2_t* packet, DynPipQBuffer* qbuffer) const {
|
||||
// u32 addr = VU1_VERT_DATA_ADDR;
|
||||
|
||||
// // Add vertices
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->vertices,
|
||||
// qbuffer->size, true);
|
||||
|
||||
// // Add colors
|
||||
// if (qbuffer->bag->color->single == nullptr) {
|
||||
// addr += qbuffer->size;
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->colors,
|
||||
// qbuffer->size, true);
|
||||
// }
|
||||
}
|
||||
|
||||
} // namespace Tyra
|
||||
@@ -0,0 +1,39 @@
|
||||
; ______ ____ ___
|
||||
; | \/ ____| |___|
|
||||
; | | | \ | |
|
||||
;---------------------------------------------------------------
|
||||
; Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
; Licenced under Apache License 2.0
|
||||
; Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
;
|
||||
;---------------------------------------------------------------
|
||||
; Triangle list
|
||||
; Cull = Standard PS2 way. clipw polys are culled.
|
||||
; Animation
|
||||
; Directional lights
|
||||
;---------------------------------------------------------------
|
||||
|
||||
.syntax new
|
||||
.name DynPipVU1_D
|
||||
.vu
|
||||
.init_vf_all
|
||||
.init_vi_all
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared_macros/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared_macros/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define RGBA_STORE_OFFSET 0
|
||||
#define XYZ2_STORE_OFFSET 1
|
||||
|
||||
--enter
|
||||
--endenter
|
||||
|
||||
#vuprog DynPipVU1D
|
||||
|
||||
--cont
|
||||
|
||||
#endvuprog
|
||||
|
||||
--exit
|
||||
--endexit
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_d_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_D_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_D_CodeEnd __attribute__((section(".vudata")));
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
DynPipDVU1Program::DynPipDVU1Program()
|
||||
: DynPipVU1Program(
|
||||
DynPipDirLights, &DynPipVU1_D_CodeStart, &DynPipVU1_D_CodeEnd,
|
||||
((u64)GIF_REG_RGBAQ) << 0 | ((u64)GIF_REG_XYZ2) << 4, 2, 3) {}
|
||||
|
||||
DynPipDVU1Program::~DynPipDVU1Program() {}
|
||||
|
||||
std::string DynPipDVU1Program::getStringName() const {
|
||||
return std::string("DynPip - D");
|
||||
}
|
||||
|
||||
void DynPipDVU1Program::addProgramQBufferDataToPacket(
|
||||
packet2_t* packet, DynPipQBuffer* qbuffer) const {
|
||||
// u32 addr = VU1_VERT_DATA_ADDR;
|
||||
|
||||
// // Add vertices
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->vertices,
|
||||
// qbuffer->size, true);
|
||||
// addr += qbuffer->size;
|
||||
|
||||
// // Add normal
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->normals,
|
||||
// qbuffer->size, true);
|
||||
|
||||
// // Add colors
|
||||
// if (qbuffer->bag->color->single == nullptr) {
|
||||
// addr += qbuffer->size;
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->colors,
|
||||
// qbuffer->size, true);
|
||||
// }
|
||||
}
|
||||
|
||||
} // namespace Tyra
|
||||
@@ -0,0 +1,40 @@
|
||||
; ______ ____ ___
|
||||
; | \/ ____| |___|
|
||||
; | | | \ | |
|
||||
;---------------------------------------------------------------
|
||||
; Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
; Licenced under Apache License 2.0
|
||||
; Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
;
|
||||
;---------------------------------------------------------------
|
||||
; Triangle list
|
||||
; Cull = Standard PS2 way. clipw polys are culled.
|
||||
; Animation
|
||||
; Lighting, texture, colors
|
||||
;---------------------------------------------------------------
|
||||
|
||||
.syntax new
|
||||
.name DynPipVU1_TC
|
||||
.vu
|
||||
.init_vf_all
|
||||
.init_vi_all
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared_macros/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared_macros/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define STQ_STORE_OFFSET 0
|
||||
#define RGBA_STORE_OFFSET 1
|
||||
#define XYZ2_STORE_OFFSET 2
|
||||
|
||||
--enter
|
||||
--endenter
|
||||
|
||||
#vuprog DynPipVU1TC
|
||||
|
||||
--cont
|
||||
|
||||
#endvuprog
|
||||
|
||||
--exit
|
||||
--endexit
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_tc_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_TC_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_TC_CodeEnd __attribute__((section(".vudata")));
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
DynPipTCVU1Program::DynPipTCVU1Program()
|
||||
: DynPipVU1Program(DynPipTextureColor, &DynPipVU1_TC_CodeStart,
|
||||
&DynPipVU1_TC_CodeEnd,
|
||||
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
||||
((u64)GIF_REG_XYZ2) << 8,
|
||||
3, 3) {}
|
||||
|
||||
DynPipTCVU1Program::~DynPipTCVU1Program() {}
|
||||
|
||||
std::string DynPipTCVU1Program::getStringName() const {
|
||||
return std::string("DynPip - TC");
|
||||
}
|
||||
|
||||
void DynPipTCVU1Program::addProgramQBufferDataToPacket(
|
||||
packet2_t* packet, DynPipQBuffer* qbuffer) const {
|
||||
// u32 addr = VU1_VERT_DATA_ADDR;
|
||||
|
||||
// // Add vertices
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->vertices,
|
||||
// qbuffer->size, true);
|
||||
// addr += qbuffer->size;
|
||||
|
||||
// // Add sts
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->sts, qbuffer->size,
|
||||
// true);
|
||||
|
||||
// // Add colors
|
||||
// if (qbuffer->bag->color->single == nullptr) {
|
||||
// addr += qbuffer->size;
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->colors,
|
||||
// qbuffer->size, true);
|
||||
// }
|
||||
}
|
||||
|
||||
} // namespace Tyra
|
||||
@@ -0,0 +1,40 @@
|
||||
; ______ ____ ___
|
||||
; | \/ ____| |___|
|
||||
; | | | \ | |
|
||||
;---------------------------------------------------------------
|
||||
; Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
; Licenced under Apache License 2.0
|
||||
; Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
;
|
||||
;---------------------------------------------------------------
|
||||
; Triangle list
|
||||
; Cull = Standard PS2 way. clipw polys are culled.
|
||||
; Animation
|
||||
; Texture, directional lights
|
||||
;---------------------------------------------------------------
|
||||
|
||||
.syntax new
|
||||
.name DynPipVU1_TD
|
||||
.vu
|
||||
.init_vf_all
|
||||
.init_vi_all
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared_macros/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared_macros/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define STQ_STORE_OFFSET 0
|
||||
#define RGBA_STORE_OFFSET 1
|
||||
#define XYZ2_STORE_OFFSET 2
|
||||
|
||||
--enter
|
||||
--endenter
|
||||
|
||||
#vuprog DynPipVU1TD
|
||||
|
||||
--cont
|
||||
|
||||
#endvuprog
|
||||
|
||||
--exit
|
||||
--endexit
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_td_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_TD_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_TD_CodeEnd __attribute__((section(".vudata")));
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
DynPipTDVU1Program::DynPipTDVU1Program()
|
||||
: DynPipVU1Program(DynPipTextureDirLights, &DynPipVU1_TD_CodeStart,
|
||||
&DynPipVU1_TD_CodeEnd,
|
||||
((u64)GIF_REG_ST) << 0 | ((u64)GIF_REG_RGBAQ) << 4 |
|
||||
((u64)GIF_REG_XYZ2) << 8,
|
||||
3, 4) {}
|
||||
|
||||
DynPipTDVU1Program::~DynPipTDVU1Program() {}
|
||||
|
||||
std::string DynPipTDVU1Program::getStringName() const {
|
||||
return std::string("DynPip - TD");
|
||||
}
|
||||
|
||||
void DynPipTDVU1Program::addProgramQBufferDataToPacket(
|
||||
packet2_t* packet, DynPipQBuffer* qbuffer) const {
|
||||
// u32 addr = VU1_VERT_DATA_ADDR;
|
||||
|
||||
// // Add vertices
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->vertices,
|
||||
// qbuffer->size, true);
|
||||
// addr += qbuffer->size;
|
||||
|
||||
// // Add sts
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->sts, qbuffer->size,
|
||||
// true);
|
||||
// addr += qbuffer->size;
|
||||
|
||||
// // Add normal
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->normals,
|
||||
// qbuffer->size, true);
|
||||
|
||||
// // Add colors
|
||||
// if (qbuffer->bag->color->single == nullptr) {
|
||||
// addr += qbuffer->size;
|
||||
// packet2_utils_vu_add_unpack_data(packet, addr, qbuffer->colors,
|
||||
// qbuffer->size, true);
|
||||
// }
|
||||
}
|
||||
|
||||
} // namespace Tyra
|
||||
+1
-1
@@ -22,7 +22,7 @@ McpipAsIsVU1Program::McpipAsIsVU1Program()
|
||||
McpipAsIsVU1Program::~McpipAsIsVU1Program() {}
|
||||
|
||||
std::string McpipAsIsVU1Program::getStringName() const {
|
||||
return std::string("As is");
|
||||
return std::string("McPip - As is");
|
||||
}
|
||||
|
||||
} // namespace Tyra
|
||||
|
||||
@@ -22,7 +22,7 @@ McpipCullVU1Program::McpipCullVU1Program()
|
||||
McpipCullVU1Program::~McpipCullVU1Program() {}
|
||||
|
||||
std::string McpipCullVU1Program::getStringName() const {
|
||||
return std::string("Cull");
|
||||
return std::string("McPip - Cull");
|
||||
}
|
||||
|
||||
} // namespace Tyra
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ StaPipAsIsCVU1Program::StaPipAsIsCVU1Program()
|
||||
StaPipAsIsCVU1Program::~StaPipAsIsCVU1Program() {}
|
||||
|
||||
std::string StaPipAsIsCVU1Program::getStringName() const {
|
||||
return std::string("As is - C");
|
||||
return std::string("StaPip - As is - C");
|
||||
}
|
||||
|
||||
void StaPipAsIsCVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ StaPipAsIsDVU1Program::StaPipAsIsDVU1Program()
|
||||
StaPipAsIsDVU1Program::~StaPipAsIsDVU1Program() {}
|
||||
|
||||
std::string StaPipAsIsDVU1Program::getStringName() const {
|
||||
return std::string("As is - LC");
|
||||
return std::string("StaPip - As is - D");
|
||||
}
|
||||
|
||||
void StaPipAsIsDVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ StaPipAsIsTCVU1Program::StaPipAsIsTCVU1Program()
|
||||
StaPipAsIsTCVU1Program::~StaPipAsIsTCVU1Program() {}
|
||||
|
||||
std::string StaPipAsIsTCVU1Program::getStringName() const {
|
||||
return std::string("As is - TC");
|
||||
return std::string("StaPip - As is - TC");
|
||||
}
|
||||
|
||||
void StaPipAsIsTCVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ StaPipAsIsTDVU1Program::StaPipAsIsTDVU1Program()
|
||||
StaPipAsIsTDVU1Program::~StaPipAsIsTDVU1Program() {}
|
||||
|
||||
std::string StaPipAsIsTDVU1Program::getStringName() const {
|
||||
return std::string("As is - LTC");
|
||||
return std::string("StaPip - As is - TD");
|
||||
}
|
||||
|
||||
void StaPipAsIsTDVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
;---------------------------------------------------------------
|
||||
; Triangle list
|
||||
; Cull = Standard PS2 way. clipw polys are culled.
|
||||
; Volors
|
||||
; Colors
|
||||
;---------------------------------------------------------------
|
||||
|
||||
.syntax new
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ StaPipCullCVU1Program::StaPipCullCVU1Program()
|
||||
StaPipCullCVU1Program::~StaPipCullCVU1Program() {}
|
||||
|
||||
std::string StaPipCullCVU1Program::getStringName() const {
|
||||
return std::string("Cull - C");
|
||||
return std::string("StaPip - Cull - C");
|
||||
}
|
||||
|
||||
void StaPipCullCVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ StaPipCullDVU1Program::StaPipCullDVU1Program()
|
||||
StaPipCullDVU1Program::~StaPipCullDVU1Program() {}
|
||||
|
||||
std::string StaPipCullDVU1Program::getStringName() const {
|
||||
return std::string("Cull - LC");
|
||||
return std::string("StaPip - Cull - D");
|
||||
}
|
||||
|
||||
void StaPipCullDVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ StaPipCullTCVU1Program::StaPipCullTCVU1Program()
|
||||
StaPipCullTCVU1Program::~StaPipCullTCVU1Program() {}
|
||||
|
||||
std::string StaPipCullTCVU1Program::getStringName() const {
|
||||
return std::string("Cull - TC");
|
||||
return std::string("StaPip - Cull - TC");
|
||||
}
|
||||
|
||||
void StaPipCullTCVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ StaPipCullTDVU1Program::StaPipCullTDVU1Program()
|
||||
StaPipCullTDVU1Program::~StaPipCullTDVU1Program() {}
|
||||
|
||||
std::string StaPipCullTDVU1Program::getStringName() const {
|
||||
return std::string("Cull - LTC");
|
||||
return std::string("StaPip - Cull - TD");
|
||||
}
|
||||
|
||||
void StaPipCullTDVU1Program::addProgramQBufferDataToPacket(
|
||||
|
||||
Reference in New Issue
Block a user