OpenTechEngine / OpenTechBFG

Engine based on (RB) Doom 3 BFG aiming to allow the creation of standalone games
Other
84 stars 11 forks source link

Optimization for APU based systems. #67

Closed ghost closed 8 years ago

ghost commented 8 years ago

I know this is kind of out of scope for OTE, more an experimental feature in the future. I've been looking at getting a new rig and was aiming for higher end systems like the AMD FX-9590 which uses 220w and the 8-cores would be unused by most applications, then I looked at the i7-4790K which looks like the best solution for serious 3D work.

However there is the AMD FM2+ APU which seems to get little development focus, so I was thinking of getting one instead as a testing platform OTE, if you guys are interested. The onboard GPU already gives some impressive results for its cost, however I feel that more could be done with the technology. For example, maybe have some of the computational load on the APU GPU and the more extreme computations on an added AMD GPU.

Another reason for this is that FM2+ systems are a lot cheaper than say a i5/nVidia solution and the APU can already crossfire with AMD GPU's. Another possibly feature is to make use of the streaming cores to add realtime raytracing, similar to 3D renderers like Blender Cycles or Octane. Even if it's a hybrid solution for some effects like caustics. Another use for the streaming cores to use it for physics calculation in realtime like liquids or smoke.

I'm not sure how viable this is with OTE and how difficult it would be to implement into the code, but would be interesting to see and could also bring the engine onto console platforms suchs as the PS4 and Xbox One as both use hardware based on FM2+. I'm interested in hearing your thoughts.

DanielGibson commented 8 years ago

Well, buy whatever you want, but a problems is that it would be hard for any of us to debug problems you might be having, because debugging on a remote PC kinda sucks. Another problem is that it would be hard for us to help because I think no one of us is an experienced graphics developer. I'm not even sure how well AMD APUs (and their drivers...) work with OTE - I seem to remember reports of bad performance with shadowmapping on AMD GPUs in RBDoom3BFG

raytracing, phyics on the GPU etc don't sound feasible for me (especially given the limited experience we have with that and the limited amount of time we have)

So: I don't see much optimizations happen, if anything, then optimizations to make the game work on weak GPUs in general (but I couldn't do those as I lack OpenGL skills).

BielBdeLuna commented 8 years ago

I see GPGPU computing more useful on exporters and importers, imagine dmaping a big map (which can last for a long time ) and having GPGPU working it ultra-fast. specially now that some OS drivers start to have credible support for OpenCL.

ghost commented 8 years ago

Blender Cycles has gotten OpenCL support for rendering in Cycles with AMD cards in the latest version, however still lacking features over Nvidia Cuda rendering.

As far as I know, Nvidia uses CUDA in games for PhysX and AMD uses its streaming cores for some physics calculations in games, but mostly for texture streaming.

I've seen some footage around of labs using OpenCL on both Nvidia and AMD for real-time physics and particle calculations, some hitting 4 billion+ particles at smooth framerates, however that was just points in space.

I may be incorrect but I read somewhere that Vulkan will have or has code that supports APU and GPGPU management across tasks. That however was from very early news about Vulkan and I'm not sure if I read it from a credible source.

All I know for certain is that some amazing things have been done with OpenCL and GPGPU computing which CPU's just can't match.

Well if I go for the FM2+ rig, then we can at least see how OTE will perform on such a system. I may possibly import the parts from the US as it's a lot cheaper, even after import taxes, for the price of a AMD R9 390 8GB 512-bit graphics card in my country, I could get two from the states.

BielBdeLuna commented 8 years ago

apparently Vulkan will come out not only with GLSL but also with OpenCL

ghost commented 8 years ago

Yes, I think it is part of the HSA initiative. If I'm correct they tested some of these features with AMD Mantle before it turned into Vulkan. The only drawback I can see with this is the use of AMD AMP which is only on AMD memory modules to increase performance, not sure if other memory manufacturers will adapt this technology. It would be interesting to see what can be done with HSA with say AMD's Fury-X cards 4096-bit memory bus.

http://developer.amd.com/resources/heterogeneous-computing/what-is-heterogeneous-system-architecture-hsa/

BielBdeLuna commented 8 years ago

whatever they tried with Mantle it shouldn't matter after the release of Vulkan, because both Intel as well as Nvidia are in the consortium alongside AMD, so Vulkan shouldn't incorporate any AMD specific code, in fact AMD said that once Vulkan comes out Mantle will be dedicated to another thing, (I bet they will disband Mantle and use that legal name to another thing )

ghost commented 8 years ago

Possibly, AMD said earlier this year that they are going to focus more on mobile technology than desktop environments, could be possible tht they would use Mantle to boost mobile devices.

DanielGibson commented 8 years ago

I'd like this issue tracker to only contain actual issues and tasks, but not so much discussions.

That's why I created https://github.com/OpenTechEngine/Discussions/issues to discuss ideas, offtopic things etc. If an idea discussed there gets to a point where we decide that it could/should be implemented, we'll add an issue here with the relevant information.