dynpip rearrangment
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/bag/dynpip_bag.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/bag/dynpip_bag.hpp"
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/bag/dynpip_color_bag.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/bag/dynpip_color_bag.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/bag/dynpip_lighting_bag.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/bag/dynpip_lighting_bag.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/bag/dynpip_texture_bag.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/bag/dynpip_texture_bag.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/core/dynpip_core.hpp"
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
DynPipCore::DynPipCore() {}
|
||||
|
||||
DynPipCore::~DynPipCore() {}
|
||||
|
||||
void DynPipCore::init(RendererCore* t_core) { rendererCore = t_core; }
|
||||
|
||||
void DynPipCore::reinitStandardVU1Programs() {}
|
||||
|
||||
void DynPipCore::render(DynPipBag* bag) {}
|
||||
|
||||
} // namespace Tyra
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/dynpip_programs_repository.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/dynpip_programs_repository.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/dynpip_qbuffer.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/dynpip_qbuffer.hpp"
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/dynamic/dynpip_vu1_program.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/dynpip_vu1_program.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/core/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define RGBA_STORE_OFFSET 0
|
||||
#define XYZ2_STORE_OFFSET 1
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_c_vu1_program.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/programs/dynpip_c_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_C_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_C_CodeEnd __attribute__((section(".vudata")));
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/core/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define RGBA_STORE_OFFSET 0
|
||||
#define XYZ2_STORE_OFFSET 1
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_d_vu1_program.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/programs/dynpip_d_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_D_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_D_CodeEnd __attribute__((section(".vudata")));
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/core/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define STQ_STORE_OFFSET 0
|
||||
#define RGBA_STORE_OFFSET 1
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_tc_vu1_program.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/programs/dynpip_tc_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_TC_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_TC_CodeEnd __attribute__((section(".vudata")));
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "src/renderer/3d/pipeline/shared/vcl_sml.i"
|
||||
#include "src/renderer/3d/pipeline/shared/tyra_macros.i"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/programs/dynpip_vu1_shared_defines.h"
|
||||
#include "inc/renderer/3d/pipeline/dynamic/core/programs/dynpip_vu1_shared_defines.h"
|
||||
|
||||
#define STQ_STORE_OFFSET 0
|
||||
#define RGBA_STORE_OFFSET 1
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/programs/dynpip_td_vu1_program.hpp"
|
||||
#include "renderer/3d/pipeline/dynamic/core/programs/dynpip_td_vu1_program.hpp"
|
||||
|
||||
extern u32 DynPipVU1_TD_CodeStart __attribute__((section(".vudata")));
|
||||
extern u32 DynPipVU1_TD_CodeEnd __attribute__((section(".vudata")));
|
||||
+13
-15
@@ -8,7 +8,7 @@
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#include "renderer/3d/pipeline/static/core/static_pipeline_core.hpp"
|
||||
#include "renderer/3d/pipeline/static/core/stapip_core.hpp"
|
||||
#include "renderer/core/renderer_core.hpp"
|
||||
#include "thread/threading.hpp"
|
||||
|
||||
@@ -22,34 +22,32 @@
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
StaPipelineCore::StaPipelineCore() { maxVertCount = 0; }
|
||||
StaPipCore::StaPipCore() { maxVertCount = 0; }
|
||||
|
||||
StaPipelineCore::~StaPipelineCore() {}
|
||||
StaPipCore::~StaPipCore() {}
|
||||
|
||||
void StaPipelineCore::init(RendererCore* t_core) {
|
||||
void StaPipCore::init(RendererCore* t_core) {
|
||||
rendererCore = t_core;
|
||||
qbufferRenderer.init(t_core);
|
||||
packager.init(&rendererCore->renderer3D.frustumPlanes);
|
||||
}
|
||||
|
||||
void StaPipelineCore::reinitStandardVU1Programs() {
|
||||
qbufferRenderer.reinitVU1();
|
||||
}
|
||||
void StaPipCore::reinitStandardVU1Programs() { qbufferRenderer.reinitVU1(); }
|
||||
|
||||
u32 StaPipelineCore::getMaxVertCountByBag(const StaPipBag* bag) {
|
||||
u32 StaPipCore::getMaxVertCountByBag(const StaPipBag* bag) {
|
||||
return qbufferRenderer.getCullProgramByBag(bag)->getMaxVertCount(
|
||||
bag->color->many == nullptr, qbufferRenderer.getBufferSize());
|
||||
}
|
||||
|
||||
u32 StaPipelineCore::getMaxVertCountByParams(const bool& isSingleColor,
|
||||
const bool& isLightingEnabled,
|
||||
const bool& isTextureEnabled) {
|
||||
u32 StaPipCore::getMaxVertCountByParams(const bool& isSingleColor,
|
||||
const bool& isLightingEnabled,
|
||||
const bool& isTextureEnabled) {
|
||||
return qbufferRenderer
|
||||
.getCullProgramByParams(isLightingEnabled, isTextureEnabled)
|
||||
->getMaxVertCount(isSingleColor, qbufferRenderer.getBufferSize());
|
||||
}
|
||||
|
||||
void StaPipelineCore::render(StaPipBag* bag, StaPipBagPackagesBBox* bbox) {
|
||||
void StaPipCore::render(StaPipBag* bag, StaPipBagPackagesBBox* bbox) {
|
||||
if (bag->count <= 0) return;
|
||||
|
||||
TYRA_ASSERT(bag->vertices != nullptr,
|
||||
@@ -143,7 +141,7 @@ void StaPipelineCore::render(StaPipBag* bag, StaPipBagPackagesBBox* bbox) {
|
||||
Verbose("Render finished");
|
||||
}
|
||||
|
||||
void StaPipelineCore::renderPkgs(StaPipBagPackage* packages, u16 count) {
|
||||
void StaPipCore::renderPkgs(StaPipBagPackage* packages, u16 count) {
|
||||
for (u16 i = 0; i < count; i++) {
|
||||
if (packages[i].isInFrustum == IN_FRUSTUM) {
|
||||
Verbose(i, " - package in frustum -> cull");
|
||||
@@ -163,7 +161,7 @@ void StaPipelineCore::renderPkgs(StaPipBagPackage* packages, u16 count) {
|
||||
}
|
||||
}
|
||||
|
||||
void StaPipelineCore::renderSubpkgs(StaPipBagPackage* subpkgs, u16 count) {
|
||||
void StaPipCore::renderSubpkgs(StaPipBagPackage* subpkgs, u16 count) {
|
||||
std::vector<u16> doneIndexes;
|
||||
std::vector<u16> loadedIndexes;
|
||||
|
||||
@@ -220,7 +218,7 @@ void StaPipelineCore::renderSubpkgs(StaPipBagPackage* subpkgs, u16 count) {
|
||||
}
|
||||
}
|
||||
|
||||
void StaPipelineCore::setMaxVertCount(const u32& count) {
|
||||
void StaPipCore::setMaxVertCount(const u32& count) {
|
||||
maxVertCount = count;
|
||||
packager.setMaxVertCount(count);
|
||||
qbufferRenderer.setMaxVertCount(count);
|
||||
Reference in New Issue
Block a user