mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Rename GPUgstate to GEState
This commit is contained in:
@@ -313,7 +313,7 @@ void FramebufferManagerCommon::EstimateDrawingSize(u32 fb_address, int fb_stride
|
|||||||
DEBUG_LOG(Log::G3D, "Est: %08x V: %ix%i, R: %ix%i, S: %ix%i, STR: %i, THR:%i, Z:%08x = %ix%i %s", fb_address, viewport_width,viewport_height, region_width, region_height, scissor_width, scissor_height, fb_stride, gstate.isModeThrough(), gstate.isDepthWriteEnabled() ? gstate.getDepthBufAddress() : 0, drawing_width, drawing_height, margin ? " (margin!)" : "");
|
DEBUG_LOG(Log::G3D, "Est: %08x V: %ix%i, R: %ix%i, S: %ix%i, STR: %i, THR:%i, Z:%08x = %ix%i %s", fb_address, viewport_width,viewport_height, region_width, region_height, scissor_width, scissor_height, fb_stride, gstate.isModeThrough(), gstate.isDepthWriteEnabled() ? gstate.getDepthBufAddress() : 0, drawing_width, drawing_height, margin ? " (margin!)" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFramebufferHeuristicInputs(FramebufferHeuristicParams *params, const GPUgstate &gstate) {
|
void GetFramebufferHeuristicInputs(FramebufferHeuristicParams *params, const GEState &gstate) {
|
||||||
// GetFramebufferHeuristicInputs is only called from rendering, and thus, it's VRAM.
|
// GetFramebufferHeuristicInputs is only called from rendering, and thus, it's VRAM.
|
||||||
params->fb_address = gstate.getFrameBufRawAddress() | 0x04000000;
|
params->fb_address = gstate.getFrameBufRawAddress() | 0x04000000;
|
||||||
params->fb_stride = gstate.FrameBufStride();
|
params->fb_stride = gstate.FrameBufStride();
|
||||||
|
|||||||
@@ -195,10 +195,10 @@ struct FramebufferHeuristicParams {
|
|||||||
int16_t scissorBottom;
|
int16_t scissorBottom;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GPUgstate;
|
struct GEState;
|
||||||
extern GPUgstate gstate;
|
extern GEState gstate;
|
||||||
|
|
||||||
void GetFramebufferHeuristicInputs(FramebufferHeuristicParams *params, const GPUgstate &gstate);
|
void GetFramebufferHeuristicInputs(FramebufferHeuristicParams *params, const GEState &gstate);
|
||||||
|
|
||||||
enum BindFramebufferColorFlags {
|
enum BindFramebufferColorFlags {
|
||||||
BINDFBCOLOR_SKIP_COPY = 0,
|
BINDFBCOLOR_SKIP_COPY = 0,
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ bool GEExpressionFunctions::parseSymbol(char *str, uint32_t &symbolValue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t GEExpressionFunctions::getReferenceValue(uint32_t referenceIndex) {
|
uint32_t GEExpressionFunctions::getReferenceValue(uint32_t referenceIndex) {
|
||||||
GPUgstate state = gpu_->GetGState();
|
GEState state = gpu_->GetGState();
|
||||||
if (referenceIndex < 0x100) {
|
if (referenceIndex < 0x100) {
|
||||||
GECmdFormat fmt = GECmdInfoByCmd(GECommand(referenceIndex)).cmdFmt;
|
GECmdFormat fmt = GECmdInfoByCmd(GECommand(referenceIndex)).cmdFmt;
|
||||||
uint32_t value = state.cmdmem[referenceIndex];
|
uint32_t value = state.cmdmem[referenceIndex];
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ bool NeedsTestDiscard();
|
|||||||
bool IsDepthTestEffectivelyDisabled();
|
bool IsDepthTestEffectivelyDisabled();
|
||||||
bool IsStencilTestOutputDisabled();
|
bool IsStencilTestOutputDisabled();
|
||||||
|
|
||||||
inline bool CanForceBilinear(const GPUgstate &gstate) {
|
inline bool CanForceBilinear(const GEState &gstate) {
|
||||||
return ((!gstate.isColorTestEnabled() || IsColorTestTriviallyTrue()) && (!gstate.isAlphaTestEnabled() || IsAlphaTestTriviallyTrue()));
|
return ((!gstate.isColorTestEnabled() || IsColorTestTriviallyTrue()) && (!gstate.isAlphaTestEnabled() || IsAlphaTestTriviallyTrue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ void BoneUpdateUniforms(UB_VS_Bones *ub, uint64_t dirtyUniforms) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateFogCoef(const GPUgstate &state, float fogCoef[2]) {
|
void UpdateFogCoef(const GEState &state, float fogCoef[2]) {
|
||||||
fogCoef[0] = getFloat24(gstate.fog1);
|
fogCoef[0] = getFloat24(gstate.fog1);
|
||||||
fogCoef[1] = getFloat24(gstate.fog2);
|
fogCoef[1] = getFloat24(gstate.fog2);
|
||||||
// The PSP just ignores infnan here (ignoring IEEE), so take it down to a valid float.
|
// The PSP just ignores infnan here (ignoring IEEE), so take it down to a valid float.
|
||||||
|
|||||||
@@ -123,10 +123,10 @@ void BoneUpdateUniforms(UB_VS_Bones *ub, uint64_t dirtyUniforms);
|
|||||||
uint32_t PackLightControlBits();
|
uint32_t PackLightControlBits();
|
||||||
uint32_t PackDepalBits();
|
uint32_t PackDepalBits();
|
||||||
|
|
||||||
void UpdateFogCoef(const GPUgstate &state, float fogCoef[2]);
|
void UpdateFogCoef(const GEState &state, float fogCoef[2]);
|
||||||
|
|
||||||
// This happens so much that I want it inline.
|
// This happens so much that I want it inline.
|
||||||
inline void UpdateUVScaleOff(const GPUgstate &state, float uvScaleOff[4]) {
|
inline void UpdateUVScaleOff(const GEState &state, float uvScaleOff[4]) {
|
||||||
float widthFactor;
|
float widthFactor;
|
||||||
float heightFactor;
|
float heightFactor;
|
||||||
if (gstate_c.textureIsFramebuffer) {
|
if (gstate_c.textureIsFramebuffer) {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ static void RotateUV(TransformedVertex v[4]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ShouldApplySpriteBorderFix(const GPUgstate &gstate) {
|
static bool ShouldApplySpriteBorderFix(const GEState &gstate) {
|
||||||
return gstate.isMagnifyFilteringEnabled() && gstate.isAlphaBlendEnabled() && gstate.getBlendFuncA() != GE_SRCBLEND_FIXA && gstate.isTextureAlphaUsed();
|
return gstate.isMagnifyFilteringEnabled() && gstate.isAlphaBlendEnabled() && gstate.getBlendFuncA() != GE_SRCBLEND_FIXA && gstate.isTextureAlphaUsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ SoftwareTransformAction RunSoftwareTransform(SoftwareTransformParams ¶ms, in
|
|||||||
|
|
||||||
// Modifies the vertices in-place. Applies viewport and projection.
|
// Modifies the vertices in-place. Applies viewport and projection.
|
||||||
// TODO: SIMD.
|
// TODO: SIMD.
|
||||||
static void ProjectVertices(const GPUgstate &gstate, TransformedVertex *transformed, int vertexCount) {
|
static void ProjectVertices(const GEState &gstate, TransformedVertex *transformed, int vertexCount) {
|
||||||
#if 0
|
#if 0
|
||||||
Lin::Vec3 vpOffset(gstate.getViewportXCenter(), gstate.getViewportYCenter(), gstate.getViewportZCenter());
|
Lin::Vec3 vpOffset(gstate.getViewportXCenter(), gstate.getViewportYCenter(), gstate.getViewportZCenter());
|
||||||
Lin::Vec3 vpScale(gstate.getViewportXScale(), gstate.getViewportYScale(), gstate.getViewportZScale());
|
Lin::Vec3 vpScale(gstate.getViewportXScale(), gstate.getViewportYScale(), gstate.getViewportZScale());
|
||||||
|
|||||||
@@ -2301,7 +2301,7 @@ static bool CanDepalettizeBufferAs(GETextureFormat texFormat, GEBufferFormat buf
|
|||||||
// But we only do it if the mask/shift exactly matches a color channel, else something different might be going
|
// But we only do it if the mask/shift exactly matches a color channel, else something different might be going
|
||||||
// on and we definitely don't want to interpolate.
|
// on and we definitely don't want to interpolate.
|
||||||
// Great enhancement for Test Drive and Manhunt 2.
|
// Great enhancement for Test Drive and Manhunt 2.
|
||||||
static bool CanUseSmoothDepal(const GPUgstate &gstate, GEBufferFormat framebufferFormat, const ClutTexture &clutTexture) {
|
static bool CanUseSmoothDepal(const GEState &gstate, GEBufferFormat framebufferFormat, const ClutTexture &clutTexture) {
|
||||||
for (int i = 0; i < ClutTexture::MAX_RAMPS; i++) {
|
for (int i = 0; i < ClutTexture::MAX_RAMPS; i++) {
|
||||||
if (gstate.getClutIndexStartPos() == clutTexture.rampStarts[i] &&
|
if (gstate.getClutIndexStartPos() == clutTexture.rampStarts[i] &&
|
||||||
gstate.getClutIndexMask() < clutTexture.rampLengths[i]) {
|
gstate.getClutIndexMask() < clutTexture.rampLengths[i]) {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ static bool lastWasFramebuffer;
|
|||||||
static u32 pauseSetCmdValue;
|
static u32 pauseSetCmdValue;
|
||||||
|
|
||||||
// This is used only to highlight differences. Should really be owned by the debugger.
|
// This is used only to highlight differences. Should really be owned by the debugger.
|
||||||
static GPUgstate lastGState;
|
static GEState lastGState;
|
||||||
|
|
||||||
const char *PauseActionToString(PauseAction action) {
|
const char *PauseActionToString(PauseAction action) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
@@ -291,7 +291,7 @@ bool GPU_FlushDrawing() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GPUgstate &LastState() {
|
const GEState &LastState() {
|
||||||
return lastGState;
|
return lastGState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,5 +47,5 @@ namespace GPUStepping {
|
|||||||
bool GPU_FlushDrawing();
|
bool GPU_FlushDrawing();
|
||||||
|
|
||||||
// Can be used to highlight differences in a debugger.
|
// Can be used to highlight differences in a debugger.
|
||||||
const GPUgstate &LastState();
|
const GEState &LastState();
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1707,7 +1707,7 @@ u32 GPUCommon::GetIndexAddress() {
|
|||||||
return gstate_c.indexAddr;
|
return gstate_c.indexAddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GPUgstate &GPUCommon::GetGState() {
|
const GEState &GPUCommon::GetGState() {
|
||||||
return gstate;
|
return gstate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -30,7 +30,7 @@ class TextureCacheCommon;
|
|||||||
class DrawEngineCommon;
|
class DrawEngineCommon;
|
||||||
class GraphicsContext;
|
class GraphicsContext;
|
||||||
struct PspGeListArgs;
|
struct PspGeListArgs;
|
||||||
struct GPUgstate;
|
struct GEState;
|
||||||
class PointerWrap;
|
class PointerWrap;
|
||||||
struct VirtualFramebuffer;
|
struct VirtualFramebuffer;
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ public:
|
|||||||
u32 GetRelativeAddress(u32 data);
|
u32 GetRelativeAddress(u32 data);
|
||||||
u32 GetVertexAddress();
|
u32 GetVertexAddress();
|
||||||
u32 GetIndexAddress();
|
u32 GetIndexAddress();
|
||||||
const GPUgstate &GetGState();
|
const GEState &GetGState();
|
||||||
void SetCmdValue(u32 op);
|
void SetCmdValue(u32 op);
|
||||||
|
|
||||||
DisplayList* getList(int listid) {
|
DisplayList* getList(int listid) {
|
||||||
|
|||||||
+5
-5
@@ -27,7 +27,7 @@
|
|||||||
#include "GPU/GPUState.h"
|
#include "GPU/GPUState.h"
|
||||||
|
|
||||||
// This must be aligned so that the matrices within are aligned.
|
// This must be aligned so that the matrices within are aligned.
|
||||||
alignas(16) GPUgstate gstate;
|
alignas(16) GEState gstate;
|
||||||
// Let's align this one too for good measure.
|
// Let's align this one too for good measure.
|
||||||
alignas(16) GPUStateCache gstate_c;
|
alignas(16) GPUStateCache gstate_c;
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ static const u32_le *LoadMatrix(const u32_le *cmds, float *mtx, int sz) {
|
|||||||
return cmds;
|
return cmds;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUgstate::Reset() {
|
void GEState::Reset() {
|
||||||
memset(gstate.cmdmem, 0, sizeof(gstate.cmdmem));
|
memset(gstate.cmdmem, 0, sizeof(gstate.cmdmem));
|
||||||
for (int i = 0; i < 256; i++) {
|
for (int i = 0; i < 256; i++) {
|
||||||
gstate.cmdmem[i] = i << 24;
|
gstate.cmdmem[i] = i << 24;
|
||||||
@@ -120,7 +120,7 @@ void GPUgstate::Reset() {
|
|||||||
gstate_c.Dirty(DIRTY_WORLD_VIEW_PROJ_MATRIX | DIRTY_VIEW_PROJ_MATRIX | DIRTY_CULL_MATRIX);
|
gstate_c.Dirty(DIRTY_WORLD_VIEW_PROJ_MATRIX | DIRTY_VIEW_PROJ_MATRIX | DIRTY_CULL_MATRIX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUgstate::Save(u32_le *ptr) {
|
void GEState::Save(u32_le *ptr) {
|
||||||
// Not sure what the first 10 values are, exactly, but these seem right.
|
// Not sure what the first 10 values are, exactly, but these seem right.
|
||||||
ptr[5] = gstate_c.vertexAddr;
|
ptr[5] = gstate_c.vertexAddr;
|
||||||
ptr[6] = gstate_c.indexAddr;
|
ptr[6] = gstate_c.indexAddr;
|
||||||
@@ -168,7 +168,7 @@ void GPUgstate::Save(u32_le *ptr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUgstate::FastLoadBoneMatrix(u32 addr) {
|
void GEState::FastLoadBoneMatrix(u32 addr) {
|
||||||
const u32 *src = (const u32 *)Memory::GetPointerUnchecked(addr);
|
const u32 *src = (const u32 *)Memory::GetPointerUnchecked(addr);
|
||||||
u32 num = boneMatrixNumber;
|
u32 num = boneMatrixNumber;
|
||||||
u32 *dst = (u32 *)(boneMatrix + (num & 0x7F));
|
u32 *dst = (u32 *)(boneMatrix + (num & 0x7F));
|
||||||
@@ -204,7 +204,7 @@ void GPUgstate::FastLoadBoneMatrix(u32 addr) {
|
|||||||
gstate.boneMatrixNumber = (GE_CMD_BONEMATRIXNUMBER << 24) | (num & 0x00FFFFFF);
|
gstate.boneMatrixNumber = (GE_CMD_BONEMATRIXNUMBER << 24) | (num & 0x00FFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPUgstate::Restore(const u32_le *ptr) {
|
void GEState::Restore(const u32_le *ptr) {
|
||||||
// Not sure what the first 10 values are, exactly, but these seem right.
|
// Not sure what the first 10 values are, exactly, but these seem right.
|
||||||
gstate_c.vertexAddr = ptr[5];
|
gstate_c.vertexAddr = ptr[5];
|
||||||
gstate_c.indexAddr = ptr[6];
|
gstate_c.indexAddr = ptr[6];
|
||||||
|
|||||||
+2
-2
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
class PointerWrap;
|
class PointerWrap;
|
||||||
|
|
||||||
struct GPUgstate {
|
struct GEState {
|
||||||
// Getting rid of this ugly union in favor of the accessor functions
|
// Getting rid of this ugly union in favor of the accessor functions
|
||||||
// might be a good idea....
|
// might be a good idea....
|
||||||
union {
|
union {
|
||||||
@@ -514,7 +514,7 @@ enum class SubmitType {
|
|||||||
SPLINE,
|
SPLINE,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern GPUgstate gstate;
|
extern GEState gstate;
|
||||||
|
|
||||||
struct GPUStateCache {
|
struct GPUStateCache {
|
||||||
bool Use(u32 flags) const { return (useFlags_ & flags) != 0; } // Return true if ANY of flags are true.
|
bool Use(u32 flags) const { return (useFlags_ & flags) != 0; } // Return true if ANY of flags are true.
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
#include "Common/Math/CrossSIMD.h"
|
#include "Common/Math/CrossSIMD.h"
|
||||||
#include "GPU/GPUState.h"
|
#include "GPU/GPUState.h"
|
||||||
|
|
||||||
inline Vec4F32 LoadViewportOffsetVec(const GPUgstate &gstate) {
|
inline Vec4F32 LoadViewportOffsetVec(const GEState &gstate) {
|
||||||
// We ignore the last member.
|
// We ignore the last member.
|
||||||
return Vec4F32::LoadF24x4(&gstate.viewportxcenter);
|
return Vec4F32::LoadF24x4(&gstate.viewportxcenter);
|
||||||
}
|
}
|
||||||
inline Vec4F32 LoadViewportScaleVec(const GPUgstate &gstate) {
|
inline Vec4F32 LoadViewportScaleVec(const GEState &gstate) {
|
||||||
// We ignore the last member.
|
// We ignore the last member.
|
||||||
return Vec4F32::LoadF24x4(&gstate.viewportxscale);
|
return Vec4F32::LoadF24x4(&gstate.viewportxscale);
|
||||||
}
|
}
|
||||||
inline Vec4F32 LoadUVScaleOffsetVec(const GPUgstate &gstate) {
|
inline Vec4F32 LoadUVScaleOffsetVec(const GEState &gstate) {
|
||||||
return Vec4F32::LoadF24x4(&gstate.texscaleu);
|
return Vec4F32::LoadF24x4(&gstate.texscaleu);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1643,7 +1643,7 @@ void ImGeStateWindow::Draw(ImConfig &cfg, ImControl &control, GPUCommon *gpuDebu
|
|||||||
bool sectionOpen = false;
|
bool sectionOpen = false;
|
||||||
for (size_t i = 0; i < numRows; i++) {
|
for (size_t i = 0; i < numRows; i++) {
|
||||||
const GECmdInfo &info = GECmdInfoByCmd(rows[i].cmd);
|
const GECmdInfo &info = GECmdInfoByCmd(rows[i].cmd);
|
||||||
const GPUgstate &lastState = GPUStepping::LastState();
|
const GEState &lastState = GPUStepping::LastState();
|
||||||
bool diff = lastState.cmdmem[rows[i].cmd] != gstate.cmdmem[rows[i].cmd];
|
bool diff = lastState.cmdmem[rows[i].cmd] != gstate.cmdmem[rows[i].cmd];
|
||||||
|
|
||||||
if (rows[i].header) {
|
if (rows[i].header) {
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ void CGEDebugger::SetupPreviews() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGEDebugger::DescribePrimaryPreview(const GPUgstate &state, char desc[256]) {
|
void CGEDebugger::DescribePrimaryPreview(const GEState &state, char desc[256]) {
|
||||||
if (primaryTrackX_ < primaryBuffer_->GetStride() && primaryTrackY_ < primaryBuffer_->GetHeight()) {
|
if (primaryTrackX_ < primaryBuffer_->GetStride() && primaryTrackY_ < primaryBuffer_->GetHeight()) {
|
||||||
u32 pix = primaryBuffer_->GetRawPixel(primaryTrackX_, primaryTrackY_);
|
u32 pix = primaryBuffer_->GetRawPixel(primaryTrackX_, primaryTrackY_);
|
||||||
DescribePixel(pix, primaryBuffer_->GetFormat(), primaryTrackX_, primaryTrackY_, desc);
|
DescribePixel(pix, primaryBuffer_->GetFormat(), primaryTrackX_, primaryTrackY_, desc);
|
||||||
@@ -410,7 +410,7 @@ void CGEDebugger::DescribePrimaryPreview(const GPUgstate &state, char desc[256])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGEDebugger::DescribeSecondPreview(const GPUgstate &state, char desc[256]) {
|
void CGEDebugger::DescribeSecondPreview(const GEState &state, char desc[256]) {
|
||||||
if (secondTrackX_ != 0xFFFFFFFF) {
|
if (secondTrackX_ != 0xFFFFFFFF) {
|
||||||
uint32_t x = secondTrackX_;
|
uint32_t x = secondTrackX_;
|
||||||
uint32_t y = secondTrackY_;
|
uint32_t y = secondTrackY_;
|
||||||
@@ -557,7 +557,7 @@ void CGEDebugger::UpdatePreviews() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPUgstate state{};
|
GEState state{};
|
||||||
|
|
||||||
if (gpu != nullptr) {
|
if (gpu != nullptr) {
|
||||||
state = gpu->GetGState();
|
state = gpu->GetGState();
|
||||||
@@ -663,7 +663,7 @@ int CGEDebugger::HasTabIndex(GEDebuggerTab *tab, GETabPosition pos) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 CGEDebugger::TexturePreviewFlags(const GPUgstate &state) {
|
u32 CGEDebugger::TexturePreviewFlags(const GEState &state) {
|
||||||
if (state.isTextureAlphaUsed() && !forceOpaque_) {
|
if (state.isTextureAlphaUsed() && !forceOpaque_) {
|
||||||
return SimpleGLWindow::ALPHA_BLEND | SimpleGLWindow::RESIZE_BEST_CENTER;
|
return SimpleGLWindow::ALPHA_BLEND | SimpleGLWindow::RESIZE_BEST_CENTER;
|
||||||
} else {
|
} else {
|
||||||
@@ -671,7 +671,7 @@ u32 CGEDebugger::TexturePreviewFlags(const GPUgstate &state) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGEDebugger::UpdatePrimaryPreview(const GPUgstate &state) {
|
void CGEDebugger::UpdatePrimaryPreview(const GEState &state) {
|
||||||
bool bufferResult = false;
|
bool bufferResult = false;
|
||||||
u32 flags = SimpleGLWindow::ALPHA_IGNORE | SimpleGLWindow::RESIZE_SHRINK_CENTER;
|
u32 flags = SimpleGLWindow::ALPHA_IGNORE | SimpleGLWindow::RESIZE_SHRINK_CENTER;
|
||||||
|
|
||||||
@@ -724,7 +724,7 @@ void CGEDebugger::UpdatePrimaryPreview(const GPUgstate &state) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGEDebugger::UpdateSecondPreview(const GPUgstate &state) {
|
void CGEDebugger::UpdateSecondPreview(const GEState &state) {
|
||||||
bool bufferResult = false;
|
bool bufferResult = false;
|
||||||
|
|
||||||
SetupPreviews();
|
SetupPreviews();
|
||||||
@@ -784,7 +784,7 @@ void CGEDebugger::PrimaryPreviewHover(int x, int y) {
|
|||||||
desc[0] = 0;
|
desc[0] = 0;
|
||||||
} else if (x < 0 || y < 0) {
|
} else if (x < 0 || y < 0) {
|
||||||
// This means they left the area.
|
// This means they left the area.
|
||||||
GPUgstate state{};
|
GEState state{};
|
||||||
if (gpu != nullptr) {
|
if (gpu != nullptr) {
|
||||||
state = gpu->GetGState();
|
state = gpu->GetGState();
|
||||||
}
|
}
|
||||||
@@ -812,7 +812,7 @@ void CGEDebugger::SecondPreviewHover(int x, int y) {
|
|||||||
desc[0] = 0;
|
desc[0] = 0;
|
||||||
} else if (x < 0 || y < 0) {
|
} else if (x < 0 || y < 0) {
|
||||||
// This means they left the area.
|
// This means they left the area.
|
||||||
GPUgstate state{};
|
GEState state{};
|
||||||
if (gpu != nullptr) {
|
if (gpu != nullptr) {
|
||||||
state = gpu->GetGState();
|
state = gpu->GetGState();
|
||||||
}
|
}
|
||||||
@@ -834,7 +834,7 @@ void CGEDebugger::SecondPreviewHover(int x, int y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CGEDebugger::UpdateTextureLevel(int level) {
|
void CGEDebugger::UpdateTextureLevel(int level) {
|
||||||
GPUgstate state{};
|
GEState state{};
|
||||||
if (gpu != nullptr) {
|
if (gpu != nullptr) {
|
||||||
state = gpu->GetGState();
|
state = gpu->GetGState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class TabStateSettings;
|
|||||||
class TabVertices;
|
class TabVertices;
|
||||||
class TabMatrices;
|
class TabMatrices;
|
||||||
class TabStateWatch;
|
class TabStateWatch;
|
||||||
struct GPUgstate;
|
struct GEState;
|
||||||
|
|
||||||
enum class GETabPosition {
|
enum class GETabPosition {
|
||||||
LEFT = 1,
|
LEFT = 1,
|
||||||
@@ -100,8 +100,8 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void SetupPreviews();
|
void SetupPreviews();
|
||||||
void UpdatePreviews();
|
void UpdatePreviews();
|
||||||
void UpdatePrimaryPreview(const GPUgstate &state);
|
void UpdatePrimaryPreview(const GEState &state);
|
||||||
void UpdateSecondPreview(const GPUgstate &state);
|
void UpdateSecondPreview(const GEState &state);
|
||||||
static u32 PrimPreviewOp();
|
static u32 PrimPreviewOp();
|
||||||
void UpdatePrimPreview(u32 op, int which);
|
void UpdatePrimPreview(u32 op, int which);
|
||||||
void CleanupPrimPreview();
|
void CleanupPrimPreview();
|
||||||
@@ -109,8 +109,8 @@ private:
|
|||||||
void UpdateSize(WORD width, WORD height);
|
void UpdateSize(WORD width, WORD height);
|
||||||
void SavePosition();
|
void SavePosition();
|
||||||
void UpdateTextureLevel(int level);
|
void UpdateTextureLevel(int level);
|
||||||
void DescribePrimaryPreview(const GPUgstate &state, char desc[256]);
|
void DescribePrimaryPreview(const GEState &state, char desc[256]);
|
||||||
void DescribeSecondPreview(const GPUgstate &state, char desc[256]);
|
void DescribeSecondPreview(const GEState &state, char desc[256]);
|
||||||
void PrimaryPreviewHover(int x, int y);
|
void PrimaryPreviewHover(int x, int y);
|
||||||
void SecondPreviewHover(int x, int y);
|
void SecondPreviewHover(int x, int y);
|
||||||
void PreviewExport(const GPUDebugBuffer *buffer);
|
void PreviewExport(const GPUDebugBuffer *buffer);
|
||||||
@@ -122,7 +122,7 @@ private:
|
|||||||
int HasTabIndex(GEDebuggerTab *tab, GETabPosition pos);
|
int HasTabIndex(GEDebuggerTab *tab, GETabPosition pos);
|
||||||
void CheckTabMessage(TabControl *t, GETabPosition pos, LPARAM lParam);
|
void CheckTabMessage(TabControl *t, GETabPosition pos, LPARAM lParam);
|
||||||
|
|
||||||
u32 TexturePreviewFlags(const GPUgstate &state);
|
u32 TexturePreviewFlags(const GEState &state);
|
||||||
|
|
||||||
SimpleGLWindow *primaryWindow = nullptr;
|
SimpleGLWindow *primaryWindow = nullptr;
|
||||||
SimpleGLWindow *secondWindow = nullptr;
|
SimpleGLWindow *secondWindow = nullptr;
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ bool CtrlMatrixList::OnColPrePaint(int row, int col, LPNMLVCUSTOMDRAW msg) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CtrlMatrixList::ColChanged(const GPUgstate &lastState, const GPUgstate &state, int row, int col) {
|
bool CtrlMatrixList::ColChanged(const GEState &lastState, const GEState &state, int row, int col) {
|
||||||
union {
|
union {
|
||||||
float f;
|
float f;
|
||||||
uint32_t u;
|
uint32_t u;
|
||||||
@@ -340,7 +340,7 @@ bool CtrlMatrixList::ColChanged(const GPUgstate &lastState, const GPUgstate &sta
|
|||||||
return newVal.u != oldVal.u;
|
return newVal.u != oldVal.u;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CtrlMatrixList::GetValue(const GPUgstate &state, int row, int col, float &val) {
|
bool CtrlMatrixList::GetValue(const GEState &state, int row, int col, float &val) {
|
||||||
if (!gpu || row < 0 || row >= MATRIXLIST_ROW_COUNT || col < 0 || col >= MATRIXLIST_COL_COUNT)
|
if (!gpu || row < 0 || row >= MATRIXLIST_ROW_COUNT || col < 0 || col >= MATRIXLIST_COL_COUNT)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ protected:
|
|||||||
bool OnColPrePaint(int row, int col, LPNMLVCUSTOMDRAW msg) override;
|
bool OnColPrePaint(int row, int col, LPNMLVCUSTOMDRAW msg) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool GetValue(const GPUgstate &state, int row, int col, float &val);
|
bool GetValue(const GEState &state, int row, int col, float &val);
|
||||||
bool ColChanged(const GPUgstate &lastState, const GPUgstate &state, int row, int col);
|
bool ColChanged(const GEState &lastState, const GEState &state, int row, int col);
|
||||||
void ToggleBreakpoint(int row);
|
void ToggleBreakpoint(int row);
|
||||||
void PromptBreakpointCond(int row);
|
void PromptBreakpointCond(int row);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user