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


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 67 68 69 70 71 ... 117 Next »

Testers needed for refactoring of texture decode/upload code
View New Posts | View Today's Posts

Pages (7): « Previous 1 ... 3 4 5 6 7 Next »
Jump to page 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Testers needed for refactoring of texture decode/upload code
01-17-2011, 07:10 AM (This post was last modified: 01-17-2011, 07:17 AM by Metzelmaennchen.)
#41
Metzelmaennchen Offline
Junior Member
**
Posts: 23
Threads: 0
Joined: Dec 2010
(01-17-2011, 06:46 AM)JamesDunne Wrote: [I think I can tackle that one. The biggest problem is we don't know ahead of time where textures are in the ROM to preload them. Then, how do we uniquely identify textures to look up in the preloaded cache when they are presented to the renderer? Furthermore, who's to say a texture address,
SNIP....
I have based this on the thought that the content have to be streamed from disc and therefore somehow have an address which is related to this one here tex.texImage3[i&3].image_base) << 5.
Easy talk... load disc on startup, parse all contents and upload texs to gfx mem.
Afterwards if requested from disc patch adress x with y and so on...
The dynamic textures would be generated after this stage, so just flag them and give them a live timer...
But sorry for my stupid question... should have digged a little bit more into the code and find this out on my own. THX for the explanation
But at least the shader thingy should be useful Wink
Find
Reply
01-17-2011, 07:31 AM
#42
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,208
Threads: 50
Joined: Jun 2009
Textures which are loaded from disc only once don't cause that much slowdown/stuttering anyway (esp after the recent sse optimizations), it's mostly the dynamic ones I'd guess.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
01-17-2011, 10:31 AM (This post was last modified: 01-18-2011, 09:05 AM by Metzelmaennchen.)
#43
Metzelmaennchen Offline
Junior Member
**
Posts: 23
Threads: 0
Joined: Dec 2010
Done a test run Smile Epona is blue also the mountains. See attached Screeny
[Image: blueepona.png]
Also I have to admit that it runs actually a lot smoother! For example the Wind Waker intro (my favorite benchmark Wink).
Find
Reply
01-17-2011, 10:40 AM
#44
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,639
Threads: 39
Joined: Oct 2009
Gosh, even Dolphin would benefit if we finally got time travels working!
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
Reply
01-18-2011, 10:00 AM (This post was last modified: 01-18-2011, 10:41 AM by Metzelmaennchen.)
#45
Metzelmaennchen Offline
Junior Member
**
Posts: 23
Threads: 0
Joined: Dec 2010
(01-14-2011, 04:00 PM)JamesDunne Wrote:
  • decodes the GC/Wii texture onto a temporary memory buffer in RGBA format
  • locks the DX9 texture memory
  • converts RGBA to BGRA on-the-fly while writing to the DX9 texture memory
Couldn't you save some conversion steps (Wii -> RGBA -> BGRA) by using the OpenGL decoder (oh no sse stuff has to be ported Wink)? At least the returned texture formats are pointing to bgra...
Then you just upload the tex to memory without 'on the fly decoding'.
Also this members could be removed
decodeJob.rgbaOnly = g_ActiveConfig.backend_info.bUseRGBATextures;
simplifying the job because you don't have to decide between two render formats for dx <> ogl.
BTW. with glTexImage2D we scored at around 0.85GB/S with nv driver 260 (1.9gb/s with 190 ??). PBOs boosted this to 2.0GB/S
Aren't 0.8 not enough Wink If you like, I could fill in your pbo TODOs in the Ogl part.
Find
Reply
01-19-2011, 12:02 AM
#46
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,208
Threads: 50
Joined: Jun 2009
No, we ideally should use the most compact destination format possible in TextureDecode rather than decoding everything to BGRA or RGBA or whatever. That's why that rgbaOnly variable was introduced for in the first place - to have dx11 decode everything to rgba but leave the more efficient VRAM transfers to DX9/OGL.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
01-19-2011, 01:40 AM (This post was last modified: 01-19-2011, 01:55 AM by Metzelmaennchen.)
#47
Metzelmaennchen Offline
Junior Member
**
Posts: 23
Threads: 0
Joined: Dec 2010
(01-19-2011, 12:02 AM)NeoBrain Wrote: No, we ideally should use the most compact destination format possible in TextureDecode rather than decoding everything to BGRA or RGBA or whatever. That's why that rgbaOnly variable was introduced for in the first place - to have dx11 decode everything to rgba but leave the more efficient VRAM transfers to DX9/OGL.
I don't get you here Sad I'm not talking about converting everything (I have seen the comment: to save memory, don't blindly convert everything to argb8888...)!

As James stated his hybrid decoder (for DX9) should do a conversion to rgba and afterwards while copying it to gfx memory converting it to bgra.
For these steps I don't see a reason for doing the rgba conversion in between? It's just a buffer in RAM which shouldn't care about format things. And the result is always the same at the end (bgra).

According to what you say and how I understand it, the OGL and DX9 should use the same decoders and only dx11 differs because of using rgba, correct?
Because for DX9 in main.cpp clearly the RGBA path is activated....
Sorry to dig in your code but it's a very fascinating piece of software Wink
Find
Reply
01-19-2011, 02:07 AM
#48
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,208
Threads: 50
Joined: Jun 2009
idk who changed dx9 to only use rgba textures, that was just plain stupid.
All backends support different kinds of formats, so each one would have separate paths (with some shared stuff, obviously).

The rgba->bgra conversion would obviously be removed as well then, but whatever..
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
01-19-2011, 03:07 AM
#49
Metzelmaennchen Offline
Junior Member
**
Posts: 23
Threads: 0
Joined: Dec 2010
(01-19-2011, 02:07 AM)NeoBrain Wrote: idk who changed dx9 to only use rgba textures, that was just plain stupid.
Was introduced with r6450...but I won't speak out the devs name Wink

Find
Reply
01-19-2011, 04:23 AM
#50
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,208
Threads: 50
Joined: Jun 2009
If you look at the changes in TextureCacheBase.cpp, you'll see that dx9 had already been using rgba textures only before that commit.
I know who it was but.. I won't speak out the devs name ;P (nope, not me)
My blog
Me on Twitter
My wishlist on Amazon.de
Find
Reply
« Next Oldest | Next Newest »
Pages (7): « Previous 1 ... 3 4 5 6 7 Next »
Jump to page 


  • 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