-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle cull mode by indices, refer to issue #10172 #10973
Conversation
Nice, this is exactly the kind of thing I had imagined when I wrote that comment :) Looks like it deserves some testing and, if I'm understanding this right, it should be done for the other triangle primitive types as well (triangle list, fan, plus all the non-indexed types). Could also fall back to flushing the cull mode if those are encountered... |
I haven't find a game to test other primitive types, so all those fallback to flush. |
GTA use triangle fan, need handle it. |
if (numInds <= 0) return; | ||
indexOffset = index_ - indexOffset; | ||
int numTris = numInds - 2; | ||
u16 *outInds = inds_; | ||
const int v1 = clockwise ? 1 : 2; | ||
const int v2 = clockwise ? 2 : 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't use these below?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fx it now.:flushed:
@@ -1618,6 +1632,14 @@ void GPUCommon::Execute_Prim(u32 op, u32 diff) { | |||
gstate.cmdmem[GE_CMD_TEXSCALEV] = data; | |||
gstate_c.uv.vScale = getFloat24(data); | |||
break; | |||
case GE_CMD_TEXOFFSETU: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tomb Raider use GE_CMD_TEXOFFSETU and GE_CMD_TEXOFFSETV frequently, but not quite useful.:grimacing:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's some engine, there's other games that do that too (basically the whole point of the gstate_c.uv
optimization.) Makes sense to add them here.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - I think we should merge.
dc.cullMode != -1 && gstate.isCullEnabled() && gstate.getCullMode() != dc.cullMode
could possibly be factored into a method, but I think it's a good change either way.
-[Unknown]
Yeah, agreed. |
WOW 😃 Naruto Ultimate Ninja Impact 1 now running smooth in 30/30 FPS unlike in previous version this game is running very slow but now it's fast maybe because of this "handle cull mode of indices"? |
I will try Digimon Adventure if this PR help its #10842 |
improve performance for GVGNP.
See #10172