Skip to content

Fix gsKit_prim_triangle_3d#99

Merged
rickgaiser merged 3 commits intops2dev:masterfrom
Fancy2209:patch-1
Apr 3, 2026
Merged

Fix gsKit_prim_triangle_3d#99
rickgaiser merged 3 commits intops2dev:masterfrom
Fancy2209:patch-1

Conversation

@Fancy2209
Copy link
Copy Markdown
Contributor

@Fancy2209 Fancy2209 commented Mar 27, 2026

gsKit_prim_triangle_gouraud used the right bsize and qsize, but not gsKit_prim_triangle. I am surprised it took 20 years for someone to notice.
It also needs GIF_AD to work for some reason
Fixes #98

gsKit_prim_triangle_gouraud used the right bsize and qsize, but not gsKit_prim_triangle. I am surprised it took 20 years for someone to notice.
@Fancy2209
Copy link
Copy Markdown
Contributor Author

I know it's wrong but I am not sure if my fix is right

@rickgaiser
Copy link
Copy Markdown
Member

Looks plausible. You did test before/after?

Before: you have the issue #98 ?
After: the issue is gone?

Fixes #98

@Fancy2209
Copy link
Copy Markdown
Contributor Author

Fancy2209 commented Mar 28, 2026

Yeah I tested it but I guess I loaded the wrong file :/ We're both working on this, this PR and that issue are directly related

This is what gets rendered with the changes, it's still not right but it's better than before, where it rendered only one tri
image

I am not sure what else to change, gsKit_prim_triangle_gouraud_3d gives the right output
image

Maybe it'd be best to just make gsKit_prim_triangle_3d to route to gsKit_prim_triangle_gouraud_3d if there isn't a way to fix it.

@Fancy2209
Copy link
Copy Markdown
Contributor Author

@rickgaiser Ok sorry for that, last push fixes it
image

I was still getting the ropes of stuff, shouldn't have been so sure that was enough to fix it

@Fancy2209 Fancy2209 changed the title Fix gsKit_prim_triangle allocating wrong amount of memory Fix gsKit_prim_triangle_3d Mar 28, 2026
@rickgaiser
Copy link
Copy Markdown
Member

Not sure why the old code didn't work. There's more primitives NOT using A+D mode and I'm assuming at some point in time they did work.

The new code using A+D mode LGTM, and since you've tested it should be good. Thanks, merging.

@rickgaiser rickgaiser merged commit b752b30 into ps2dev:master Apr 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gsKit fails to draw more than one triangle with gsKit_prim_triangle_3d

2 participants