mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 13:35:35 -04:00
Add Tracy stuff
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
void J3DDrawBuffer::calcZRatio() {
|
||||
mZRatio = (mZFar - mZNear) / (f32)mEntryTableSize;
|
||||
@@ -224,6 +225,7 @@ void J3DDrawBuffer::draw() const {
|
||||
}
|
||||
|
||||
void J3DDrawBuffer::drawHead() const {
|
||||
ZoneScoped;
|
||||
u32 size = mEntryTableSize;
|
||||
J3DPacket** buf = mpBuffer;
|
||||
|
||||
@@ -235,6 +237,7 @@ void J3DDrawBuffer::drawHead() const {
|
||||
}
|
||||
|
||||
void J3DDrawBuffer::drawTail() const {
|
||||
ZoneScoped;
|
||||
for (int i = mEntryTableSize - 1; i >= 0; i--) {
|
||||
for (J3DPacket* packet = mpBuffer[i]; packet != NULL; packet = packet->getNextPacket()) {
|
||||
packet->draw();
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include <cstring>
|
||||
#include <os.h>
|
||||
#include "JSystem/J3DGraphAnimator/J3DModel.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DShapeMtx.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <os.h>
|
||||
#include <cstring>
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
J3DError J3DDisplayListObj::newDisplayList(u32 maxSize) {
|
||||
mMaxSize = ALIGN_NEXT(maxSize, 0x20);
|
||||
@@ -207,12 +208,13 @@ bool J3DMatPacket::isSame(J3DMatPacket* pOther) const {
|
||||
}
|
||||
|
||||
void J3DMatPacket::draw() {
|
||||
ZoneScoped;
|
||||
#if TARGET_PC
|
||||
j3dSys.setTexture(mpTexture);
|
||||
#endif
|
||||
mpMaterial->load();
|
||||
|
||||
#if TARGET_PC
|
||||
#if DEBUG && TARGET_PC
|
||||
if (mpMaterial->mMaterialName != nullptr) {
|
||||
char buf[64];
|
||||
snprintf(buf, sizeof(buf), "Mat: %s", mpMaterial->mMaterialName);
|
||||
@@ -239,7 +241,7 @@ void J3DMatPacket::draw() {
|
||||
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
#if TARGET_PC
|
||||
#if DEBUG && TARGET_PC
|
||||
if (mpMaterial->mMaterialName != nullptr) {
|
||||
GXPopDebugGroup();
|
||||
}
|
||||
@@ -388,6 +390,7 @@ void J3DShapePacket::draw() {
|
||||
}
|
||||
|
||||
void J3DShapePacket::drawFast() {
|
||||
ZoneScoped;
|
||||
if (!checkFlag(J3DShpFlag_Hidden) && mpShape != NULL) {
|
||||
prepareDraw();
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
|
||||
#include <dolphin/gd.h>
|
||||
#include <gd.h>
|
||||
#include <gx.h>
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DVertex.h"
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include <gx.h>
|
||||
#include <gd.h>
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
void J3DGDSetVtxAttrFmtv(GXVtxFmt, GXVtxAttrFmtList const*, bool);
|
||||
void J3DFifoLoadPosMtxImm(Mtx, u32);
|
||||
@@ -318,6 +318,7 @@ void J3DShape::setArrayAndBindPipeline() const {
|
||||
}
|
||||
|
||||
void J3DShape::drawFast() const {
|
||||
ZoneScoped;
|
||||
if (sOldVcdVatCmd != mVcdVatCmd) {
|
||||
GXCallDisplayList(mVcdVatCmd, kVcdVatDLSize);
|
||||
sOldVcdVatCmd = mVcdVatCmd;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DTexture.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
J3DSys j3dSys;
|
||||
|
||||
@@ -121,6 +122,8 @@ void J3DSys::setTexCacheRegion(GXTexCacheSize size) {
|
||||
}
|
||||
|
||||
void J3DSys::drawInit() {
|
||||
ZoneScoped;
|
||||
|
||||
GXInvalidateVtxCache();
|
||||
GXSetCurrentMtx(GX_PNMTX0);
|
||||
GXSetCullMode(GX_CULL_BACK);
|
||||
@@ -226,6 +229,7 @@ void J3DSys::drawInit() {
|
||||
}
|
||||
|
||||
void J3DSys::reinitGX() {
|
||||
ZoneScoped;
|
||||
reinitGenMode();
|
||||
reinitLighting();
|
||||
reinitTransform();
|
||||
|
||||
Reference in New Issue
Block a user