Skip to content
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

Better Bezier Patch fix #3541

Merged
merged 1 commit into from Sep 1, 2013
Merged

Better Bezier Patch fix #3541

merged 1 commit into from Sep 1, 2013

Conversation

raven02
Copy link
Contributor

@raven02 raven02 commented Sep 1, 2013

Although it is still bit hackery and incorrect , at least show more correct in Jeanne d'Arc and show more stuff in God Eater Burst .

Meanwhile , Issue #3519, Issue #3490

screen00052
screen00054
screen00053
screen00055

@hrydgard
Copy link
Owner

hrydgard commented Sep 1, 2013

if you're gonna use a static sized array like that but still respect ucount and vcount, you should make sure that ucount and vcount are not bigger than what can fit in the array.

@raven02
Copy link
Contributor Author

raven02 commented Sep 1, 2013

I indeed want to size the array dynamically with respect to ucount and vcount however i don't know how to do it .It would be appreciated if few lines sample can be given to me for reference.

@hrydgard
Copy link
Owner

hrydgard commented Sep 1, 2013

Easiest way would be this:

u16 *indices = new u16[ucount * vcount * 6];

And at the end of the function:

delete [] indices;

@raven02
Copy link
Contributor Author

raven02 commented Sep 1, 2013

Thanks .Will rebase it with this change.

@raven02
Copy link
Contributor Author

raven02 commented Sep 1, 2013

Rebase done and tested okay.

@@ -20,7 +20,10 @@

// Just to get something on the screen, we'll just not subdivide correctly.
void TransformDrawEngine::DrawBezier(int ucount, int vcount) {
u16 indices[3 * 3 * 6];
if ((ucount - 1) % 3 != 0 || (vcount - 1) % 3 != 0)
ERROR_LOG(HLE,"Unsupported bezier parameters ucount=%i, vcount=%i", ucount, vcount);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this an ERROR_LOG_REPORT? Sorry for nitpicking, it'd be useful to know if it happens.

Or, I can after this is merged.

-[Unknown]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure . Done.

@daniel229
Copy link
Collaborator

Great,Super Robot War OE almost perfect with this commit.
Just a remain bug here.

ppsspp
01

jpcsp
02

@raven02
Copy link
Contributor Author

raven02 commented Sep 1, 2013

Yep, i just ran it and battle scene seems to be excellent now .If you want to get rid of that artifact , run in FB to memory mode and should be fine .

Buffered mode seems not to be not cleared that artifact somehow

@daniel229
Copy link
Collaborator

But with FB to memory mode it does not show video.

@raven02
Copy link
Contributor Author

raven02 commented Sep 1, 2013

Ooo seems to be :)

@ufdada
Copy link
Contributor

ufdada commented Sep 1, 2013

Tested with Pursuit Force and its sequel. It looks better but has a huge impact on framerate (now it´s nearly unplayable and a lot of stuttering)

@unknownbrackets
Copy link
Collaborator

We could probably use a static buffer. If you're using a compiler, a profile while it's slow would really help:
http://www.codersnotes.com/sleepy

-[Unknown]

@ufdada
Copy link
Contributor

ufdada commented Sep 1, 2013

Thanks for the advice, where should i upload the capture?

@unknownbrackets
Copy link
Collaborator

Something like http://temp-share.com/ is lightweight.

-[Unknown]

@raven02
Copy link
Contributor Author

raven02 commented Sep 1, 2013

May be i can try to create new buffer only when the ucount * vcount > existing one .

@unknownbrackets
Copy link
Collaborator

Could just use a static SimpleBuf<u16> or something, from #include "Common/MemoryUtil.h". It's what the texture cache uses for its growing aligned buffers.

-[Unknown]

@ufdada
Copy link
Contributor

ufdada commented Sep 1, 2013

Thanks, here you are: http://temp-share.com/show/Pf3mg6tW2

@unknownbrackets
Copy link
Collaborator

So, of that profile, 36.8s were spent drawing beziers, out of 40.72s processing GE instructions. 90% is pretty significant.

However, allocation is less than 0.5s of that. Still good to optimize, but most of that time is spent flushing. Most of that time seems to be in your video driver and the vertex cache I think.

-[Unknown]

@Nezarn
Copy link
Contributor

Nezarn commented Sep 1, 2013

btw Orphis said in the forum that he will port\fix his spline\bezier code from jpcsp http://forums.ppsspp.org/showthread.php?tid=1705&pid=42508#pid42508

@raven02
Copy link
Contributor Author

raven02 commented Sep 1, 2013

Yep, no worry .Ultimately those current beizer/spline code will be replaced by a more complete one .

hrydgard added a commit that referenced this pull request Sep 1, 2013
@hrydgard hrydgard merged commit 2a04c36 into hrydgard:master Sep 1, 2013
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.

None yet

6 participants