Add geometry mode for forcing branch execution (#605)

This commit is contained in:
Garrett Cox
2024-05-27 11:50:00 -04:00
committed by GitHub
parent 88dc063127
commit 3e4b6c81c6
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -368,6 +368,7 @@
* G_EXTRAGEOMETRY flags: set extra custom geometry modes
*/
#define G_EX_INVERT_CULLING 0x00000001
#define G_EX_ALWAYS_EXECUTE_BRANCH 0x00000002
/* Need these defined for Sprite Microcode */
#ifdef _LANGUAGE_ASSEMBLY
+1 -1
View File
@@ -3035,7 +3035,7 @@ bool gfx_branch_z_otr_handler_f3dex2(F3DGfx** cmd0) {
(*cmd0)++;
if (g_rsp.loaded_vertices[vbidx].z <= zval) {
if (g_rsp.loaded_vertices[vbidx].z <= zval || (g_rsp.extra_geometry_mode & G_EX_ALWAYS_EXECUTE_BRANCH) != 0) {
uint64_t hash = ((uint64_t)(*cmd0)->words.w0 << 32) + (*cmd0)->words.w1;
F3DGfx* gfx = (F3DGfx*)ResourceGetDataByCrc(hash);
+1
View File
@@ -196,6 +196,7 @@ constexpr int8_t OTR_G_SETINTENSITY = OPCODE(0x40);
* G_EXTRAGEOMETRY flags: set extra custom geometry modes
*/
#define G_EX_INVERT_CULLING 0x00000001
#define G_EX_ALWAYS_EXECUTE_BRANCH 0x00000002
/*
* G_SETIMG fmt: set image formats