• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › Dolphin Patches (Archive) v
« Previous 1 ... 3 4 5 6 7 Next »

[PATCH] Optimization work on EFB > RAM
View New Posts | View Today's Posts

Pages (4): « Previous 1 2 3 4 Next »
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[PATCH] Optimization work on EFB > RAM
11-26-2010, 12:42 AM (This post was last modified: 11-26-2010, 12:44 AM by kirbypuff.)
#11
kirbypuff Offline
The Original White Marshmallow
*****
Posts: 825
Threads: 37
Joined: Aug 2010
This is just what we needed. EFB -> RAM is extremely slow, even on 'monster' PCs Smile

How about implementing postprocessing (HLSL) shader support for the Direct3D9 and Direct3D11 plugins to get them on par (feature-wise) with the OpenGL plugin?
Find
11-26-2010, 12:51 AM (This post was last modified: 11-26-2010, 01:21 AM by neobrain.)
#12
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,209
Threads: 50
Joined: Jun 2009
If you feel like implementing HLSL PP shaders, go ahead. I certainly regard this "feature" (it really is just a toy IMO) as to useless one and thus won't implement it. Some other devs agree with me here and most of the other gfx devs don't even have the time to implement it.
Hm, that patch actualy breaks EFB->RAM for me. If I apply it, coins in nsmbw aren't spinning anymore...
Fwiw, I don't even understand how the patch should work anyway..
"glReadPixels(x, y, width, height, GL_RED+n, type, componentdata);" <-- this will fill the array componentdata with exactly "width" __bytes__ containing the red channels. on the next calls, this data will just get overwritten with the green and blue channels and finally with the alpha channel o_o
My blog
Me on Twitter
My wishlist on Amazon.de
Find
11-26-2010, 05:06 PM
#13
mudlord Offline
Member
***
Posts: 61
Threads: 3
Joined: Apr 2009
My test cases work. So I don't know about your issue.

As for how it works, if you bothered to read, each component is read iteratively, one after the other, to build up the image buffer. And then its copied to the normal GL memory pointer, and the other is free'd.

I'm quite willing to improve the implementation, and I am all ears if you are willing to give advice on it too.

Find
11-26-2010, 11:25 PM
#14
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,209
Threads: 50
Joined: Jun 2009
Well, skid also told you that nsmbw doesn't work with EFB to RAM with your patch anymore (coins aren't spinning).

Anyway, let me point out what I think is wrong about your optimization:
"glReadPixels(x, y, width, height, GL_BLUE-n, type, componentdata);
memcpy(pixels, componentdata, componentdatasize);"
We want the pixels buffer to contain data this way: ABGRABGRABGRABGR... (width*height*4 bytes) (ignoring the component order)
HOWEVER, the first (n=0) glReadPixels call will store the data in this format: BBBBBBBBBBBBBBBB... (width*height bytes), which is certainly NOT what we want.
..
Also, I really don't understand how you're expecting the memcpys to work, you're memcpy'ing four times to the same pointer position (pixels) with the same data size (componentsize), so you'll overwrite the data of the first three memcpys anyway..
Sorry, but that patch is totally useless :/ What are your "test cases" anyway?

btw a little off-topic:
http://www.opengl.org/registry/specs/ARB/texture_multisample.txt <-- I think this could help us speed up multisampling in ogl a bit, since with this ext we don't need to resolve the EFB buffer to a non-multisampled buffer each time it is accessed in any way.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
11-27-2010, 08:23 AM
#15
mudlord Offline
Member
***
Posts: 61
Threads: 3
Joined: Apr 2009
Quote:What are your "test cases" anyway?

Excuse me, but I have tested the patch on Luigi's Mansion (which uses EFB) and Super Mario Sunshine. Both games, I noticed no breaks. Funnily enough.

Quote:We want the pixels buffer to contain data this way: ABGRABGRABGRABGR... (width*height*4 bytes) (ignoring the component order)
HOWEVER, the first (n=0) glReadPixels call will store the data in this format: BBBBBBBBBBBBBBBB... (width*height bytes), which is certainly NOT what we want.

Thank you for talking to me like a 3 year old. I do appreciate it. Dodgy I'll also keep it in mind.

Quote:I think this could help us speed up multisampling in ogl a bit, since with this ext we don't need to resolve the EFB buffer to a non-multisampled buffer each time it is accessed in any way.

And why would I want to associate with you after you directly insulted me?

Find
11-27-2010, 09:06 AM
#16
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,009
Threads: 24
Joined: Oct 2009
Both of you:
[Image: chill-pill-demotivational-poster-1221956724.jpg]
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
11-27-2010, 09:30 AM
#17
mudlord Offline
Member
***
Posts: 61
Threads: 3
Joined: Apr 2009
You butt out of this. This is between Neo and I.
Find
11-27-2010, 11:38 AM
#18
Trevor_Z Offline
Junior Member
**
Posts: 9
Threads: 3
Joined: Oct 2009
Holy crap, what an ass. It's almost like every single message he posts here has to fill an insult quota.

You know what? That chill pill?

Take two.
Find
11-27-2010, 12:20 PM
#19
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,617
Threads: 37
Joined: Oct 2009
dude, that's 500,000 mg...you wanna kill him? :o
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
11-27-2010, 03:33 PM
#20
mudlord Offline
Member
***
Posts: 61
Threads: 3
Joined: Apr 2009
Clearly, since the person said and I quote
"what a ass. It's almost like every single message he posts here has to fill an insult quota.".

So you know what, you can shove that chill pill up your Dolphin raping ass.
Find
« Next Oldest | Next Newest »
Pages (4): « Previous 1 2 3 4 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode