-
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
softgpu: Refactor imm prim handling to support fog/color1 #16042
softgpu: Refactor imm prim handling to support fog/color1 #16042
Conversation
3800b42
to
19e5f35
Compare
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.
nitpick about a comment :)
Otherwise looks fine, tested with Thrillville with no issues.
GPU/Software/SoftGpu.cpp
Outdated
@@ -1138,6 +1145,18 @@ void SoftGPU::FinishDeferred() { | |||
drawEngine_->transformUnit.Flush("finish"); | |||
} | |||
|
|||
int SoftGPU::ListSync(int listid, int mode) { | |||
// Take this as a queue that we need to finish drawing. |
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.
cue, not queue :)
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.
D'oh, I type queue way more often than cue, this happens with several words heh.
-[Unknown]
We could in theory skip flush on FinishDeferred, and allow some CPU/GPU overlap. If we did, we'd still want to flush at these times.
The previous logic was harder to understand and easier to get wrong. Just drop them when clipping the primitive.
Only with through set, and we have to ignore position.
Was crashing because the frag and vert shaders didn't match up.
19e5f35
to
9f84cde
Compare
This accurately handles what I've reproduced for immediate-mode primitives, stuffing them a bit later in the pipeline so they bypass vertex decode. There's still some ugliness for viewport (due to screenpos calculation after clipping), but it's not that terrible.
Ah, well, I'm not sure about the vertex Q, actually. Maybe texgen isn't right still...
The hardware renderers still don't support fog/color1, but I'm hoping this makes it easier for us to tell if some other game is using them unexpectedly. Anyway, I also want the software renderer to be a more accurate way to test graphics that might be used in PSP game patches.
This also means my imm fog test can be shown to pass and added to test.py (I think I forgot to ever push it...)
Also fixes a crash hardware renderers had if anything but rectangles were used in transform mode.
-[Unknown]