Mipmapping in GSDx hardware mode
#1
What's up? I'm mr_bigmouth_502, and over the last few days I've been playing around with PCSX2. For the most part it runs well on my machine and I can get games working at playable speeds in hardware mode, but one game that's been annoying me is Ratchet and Clank: Going Commando. From what I understand this game uses mipmapping on its textures, which works fine when I run it in software mode, but naturally it's dog slow on my machine. In hardware mode, the speed is somewhat better, but the textures get all scrambled due to the lack of mipmapping emulation.

My current specs are

Pentium Dual-Core E6300 Wolfdale OC'd to 3.46GHz
4GB of DDR2 RAM, currently running at 990MHz
Radeon HD 4650 with 512MB of GDDR5

These specs aren't the best, but I'm rather amazed at what I've been able to do with this old bird. Laugh

What I'm kind of wondering is, what's the hold up with mipmapping emulation in the GSDx hardware renderer? Mipmapping isn't exactly a new thing, and most video cards made since the early 2000s should be able to do it right out of the box. Of course, since this IS PS2 emulation we're talking about, I'm guessing that it uses some exotic form of mipmapping that's never been implemented on a PC GPU.

Could anyone explain this to me? I don't mind if you go into gory technical details. I'm no programmer, but I know a few things about hardware. Smile

Sponsored links

#2
Think it has something to do with texture cache coding of gsdx. Basically they'd have to rewrite the plugin from the ground up.
Intel Core i7-8700k @5ghz
G.Skill 16GB DDR4 @3600mhz
GeForce GTX 1080 8GB
Windows 10 x64
#3
It's not that mipmapping is somehow new exotic or hard to do... rather it's HOW the PS2 handled mipmapping as compared to how PCs do it. As mentioned above, part of the problem is that the plugin needs a ground up rewrite. Very few people have the technical skill to do so, and even fewer have the time AND the skill currently. This isn't a small project that can be tackled in a weekend.
[Image: 2748844.png]
#4
(09-02-2013, 12:28 AM)Koji Wrote: It's not that mipmapping is somehow new exotic or hard to do... rather it's HOW the PS2 handled mipmapping as compared to how PCs do it. As mentioned above, part of the problem is that the plugin needs a ground up rewrite. Very few people have the technical skill to do so, and even fewer have the time AND the skill currently. This isn't a small project that can be tackled in a weekend.

Should start a kickstarter, see how easy it can become Tongue
#5
(09-02-2013, 01:05 AM)Coornio Wrote: Should start a kickstarter, see how easy it can become Tongue

I don't think a lot of people understand how the PS2 handles this to make it worthwhile. Given how many standards the PS2 seems to ignore, we may just have to wait for more powerful hardware and for software mode to get faster (note: not saying it is bad by any means).
#6
Maybe someone could write a hack for the Ratchet and Clank/Jak engine games to preload distant textures, since I've noticed that the textures show up correctly when you're right next to or in front of an object.

Or, another idea, maybe there could be some sort of a software/hardware hybrid mode where the mipmapping is handled through software, and everything else is handled through hardware.
#7
(09-02-2013, 06:36 PM)mr_bigmouth_502 Wrote: Maybe someone could write a hack for the Ratchet and Clank/Jak engine games to preload distant textures, since I've noticed that the textures show up correctly when you're right next to or in front of an object.

Or, another idea, maybe there could be some sort of a software/hardware hybrid mode where the mipmapping is handled through software, and everything else is handled through hardware.

The first idea sounds long, convoluted, and bad in the long term. Hacks should be avoided whenever possible, and a problem like Ratchet and Clanks will eventually and inevitably have to be taken care of the hard way.

As for the latter, that's not how it works., at least currently. Tossing things back and forth between CPU and GPU would actually be a lot slower than pure software mode... it would require roughly 2-4 as much memory bandwidth and would, again, be a bandaid to a larger problem. Plus I can only imagine how much of a nightmare something like that would be to write and try and bug fix when it inevitably doesn't like a particular game.
[Image: 2748844.png]
#8
(09-03-2013, 08:25 AM)Koji Wrote: The first idea sounds long, convoluted, and bad in the long term. Hacks should be avoided whenever possible, and a problem like Ratchet and Clanks will eventually and inevitably have to be taken care of the hard way.

As for the latter, that's not how it works., at least currently. Tossing things back and forth between CPU and GPU would actually be a lot slower than pure software mode... it would require roughly 2-4 as much memory bandwidth and would, again, be a bandaid to a larger problem. Plus I can only imagine how much of a nightmare something like that would be to write and try and bug fix when it inevitably doesn't like a particular game.

Ok, so the second solution doesn't sound like it would work well, as for the first solution, I don't get it; is the emulator focused on accuracy, or on just getting the games to run well? From what I've seen PCSX2 implements a lot of hacks (including ones specifically tailored to other games), and we're nowhere near the stage where we have computers that would be powerful enough to do completely cycle-accurate emulation of the PS2 hardware. We didn't even have the capability of emulating SNES games in a cycle-accurate manner until a few years ago.

I'm pretty sure a lot of people would appreciate a mipmapping hack for the Ratchet and Clank games, even if it's just a short term solution. Wink Of course, since PCSX2 is open source, I guess someone else could code it and implement it into a customized build.
#9
(09-04-2013, 03:35 PM)mr_bigmouth_502 Wrote: Of course, since PCSX2 is open source, I guess someone else could code it and implement it into a customized build.

sounds like a great idea Smile
when do you think you will release such a build ?
thanks
CPU : AMD Ryzen 7 3800X
Mobo : Asus PRIME B450-PLUS
GPU : NVIDIA GeForce RTX 3070
RAM : 16 Go
#10
I would have to learn how to code first. Tongue But hey, if someone out there wants to give it a shot, I would love to see the results. Laugh




Users browsing this thread: 1 Guest(s)