From a64d62be4b433fcad3804d3bb616bdf4f13504f4 Mon Sep 17 00:00:00 2001 From: iCatButler Date: Mon, 16 May 2016 16:17:19 +0100 Subject: Add PGXP configuration dialog - Allows independent toggling of PGXP, vertex caching and texture correction --- libpcsxcore/pgxp_gte.c | 10 +++++++--- libpcsxcore/psxcommon.h | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/pgxp_gte.c b/libpcsxcore/pgxp_gte.c index 4334c38d..c130d32c 100644 --- a/libpcsxcore/pgxp_gte.c +++ b/libpcsxcore/pgxp_gte.c @@ -26,6 +26,7 @@ ***************************************************************************/ #include "pgxp_gte.h" +#include "psxcommon.h" #include "psxmem.h" #include "r3000a.h" @@ -72,7 +73,7 @@ void PGXP_Init() char* PGXP_GetMem() { - return (char*)(Mem); + return Config.PGXP_GTE ? (char*)(Mem) : NULL; } /* Playstation Memory Map (from Playstation doc by Joshua Walker) @@ -266,14 +267,17 @@ void PGXP_pushSXYZ2f(float _x, float _y, float _z, unsigned int _v) SXY2.x = _x; SXY2.y = _y; - SXY2.z = _z; + SXY2.z = Config.PGXP_Texture ? _z : 1.f; SXY2.value = _v; SXY2.valid = 1; SXY2.count = uCount++; // cache value in GPU plugin temp.word = _v; - GPU_pgxpCacheVertex(temp.x, temp.y, &SXY2); + if(Config.PGXP_Cache) + GPU_pgxpCacheVertex(temp.x, temp.y, &SXY2); + else + GPU_pgxpCacheVertex(0, 0, NULL); #ifdef GTE_LOG GTE_LOG("PGPR_PUSH (%f, %f) %u %u|", SXY2.x, SXY2.y, SXY2.valid, SXY2.count); diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index 13e6c1ab..894b1a31 100755 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -167,6 +167,10 @@ typedef struct { u8 MemHack; boolean OverClock; // enable overclocking u8 PsxClock; + // PGXP variables + boolean PGXP_GTE; + boolean PGXP_Cache; + boolean PGXP_Texture; #ifdef _WIN32 char Lang[256]; #endif -- cgit v1.2.3