tyrav2 init
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <packet2_utils.h>
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/renderer.hpp"
|
||||
#include "packet2/packet2_tyra_utils.hpp"
|
||||
#include "../mcpip_programs_repository.hpp"
|
||||
#include "../../mcpip_block.hpp"
|
||||
#include "../../data/mcpip_block_data.hpp"
|
||||
#include "./mcpip_vu1_cull_shared_defines.h"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
class McpipCull {
|
||||
public:
|
||||
McpipCull();
|
||||
~McpipCull();
|
||||
|
||||
void init(RendererCore* core, McpipBlockData* t_blockData);
|
||||
|
||||
u32 uploadVU1Program(McpipProgramsRepository* repo, const u32& addr);
|
||||
|
||||
void configureVU1AndSendStaticData();
|
||||
|
||||
u32 getMaxBlocksCountPerQBuffer() const;
|
||||
|
||||
void addData(packet2_t* packet, McpipBlock** blockPointerArray,
|
||||
u32 blockPointerArrayCount,
|
||||
RendererCoreTextureBuffers* texBuffers, bool isMulti);
|
||||
|
||||
private:
|
||||
RendererCore* rendererCore;
|
||||
u16 vu1DBufferSize;
|
||||
McpipBlockData* blockData;
|
||||
packet2_t* staticPacket;
|
||||
|
||||
void initStaticPacket();
|
||||
void sendVU1StaticData();
|
||||
void setDBufferSize();
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <packet2_utils.h>
|
||||
#include <string>
|
||||
#include "debug/debug.hpp"
|
||||
#include "renderer/3d/pipeline/minecraft/programs/mcpip_program.hpp"
|
||||
|
||||
namespace Tyra {
|
||||
|
||||
class McpipCullVU1Program : public McpipProgram {
|
||||
public:
|
||||
McpipCullVU1Program();
|
||||
~McpipCullVU1Program();
|
||||
|
||||
std::string getStringName() const;
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// ______ ____ ___
|
||||
// | \/ ____| |___|
|
||||
// | | | \ | |
|
||||
//-----------------------------------------------------------------------
|
||||
// Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
// Licenced under Apache License 2.0
|
||||
// Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
//
|
||||
|
||||
// Static data for blockizer program
|
||||
|
||||
#define VU1_MCPIP_CULL_VERTEX_COUNT 36
|
||||
#define VU1_MCPIP_CULL_QWORDS_PER_BLOCK 6
|
||||
|
||||
#define VU1_MCPIP_CULL_STATIC_LOD 0
|
||||
#define VU1_MCPIP_CULL_STATIC_PRIM 1
|
||||
#define VU1_MCPIP_CULL_STATIC_SET_TAG 2
|
||||
#define VU1_MCPIP_CULL_STATIC_VU1_OPTIONS 3
|
||||
#define VU1_MCPIP_CULL_STATIC_VERTEX_DATA 4
|
||||
#define VU1_MCPIP_CULL_STATIC_TEX_COORD_DATA 4 + 36
|
||||
#define VU1_MCPIP_CULL_STATIC_LAST_DATA_ADDR \
|
||||
VU1_MCPIP_CULL_STATIC_TEX_COORD_DATA + 36
|
||||
|
||||
// Dynamic data (unpack per VU1 call)
|
||||
#define VU1_MCPIP_CULL_DYNAMIC_SCALE_AND_BLOCKS_COUNT_ADDR 0
|
||||
#define VU1_MCPIP_CULL_DYNAMIC_CLUT_TEX 1
|
||||
#define VU1_MCPIP_CULL_DYNAMIC_VIEW_PROJ_MATRIX_ADDR 2
|
||||
#define VU1_MCPIP_CULL_DYNAMIC_BLOCKS_DATA 6
|
||||
|
||||
// Output mini double buffer inside VU1 mem
|
||||
#define VU1_MCPIP_CULL_DYNAMIC_OUTPUT_DOUBLE_BUFF1_ADDR 774
|
||||
#define VU1_MCPIP_CULL_DYNAMIC_OUTPUT_DOUBLE_BUFF2_ADDR 887
|
||||
Reference in New Issue
Block a user