I am developing my engine using the OpenGL 3.3 compatibility profile. It runs as expected on my NVIDIA card and on my Intel Card however when I tried it on an AMD setup it ran 3 times worse than on the other setups. Could this be a AMD driver thing or is this probably a problem with my OGL code? Could a different code standard create such bad performance?
AMD horrible OpenGL performance
What graphics cards you're using? Some graphics cards could have implemented part of functions on software instead od hardware. It would be good to profile it with AMD CodeXL(http://gpuopen.com/compute-product/codexl/) and see where the problem exactly is(I had the same problem with AMD firepro cards and cubemaps sampling).
4 hours ago, Armagedon said:What graphics cards you're using? Some graphics cards could have implemented part of functions on software instead od hardware. It would be good to profile it with AMD CodeXL(http://gpuopen.com/compute-product/codexl/) and see where the problem exactly is(I had the same problem with AMD firepro cards and cubemaps sampling).
I haven't seen a GPU have to fall back to software emulation in a decade. Unless his GPU is very old (eg. ATI Radeon X1800 series) this shouldn't be the problem.
The reason your GL is slow on AMD could be serveral:
- Your code could be highly innefficient. Google "AZDO".
- You're abusing glMap* calls. Likely you don't discard correctly, or you're reading from a write-only buffer, or you're reading from from memory that is not optimized for reading.
- You indeed hit a driver bug (doubtful)
Check with a profiler if something obvious pops out.
Edit: I've checked out one of your posts talks about VSM shadow mapping. I implemented myself ESM (Exponential Shadow Maps) and noticed the AMD Radeon HD 7770 has no problem with it, but my older ATI Radeon HD 4650 Mobility has severe performance problems with it; most likely these older GPUs are not good at sampling with bilinear filtering from 16-bit float texture formats.
Another thing to keep in mind is do NOT expect the same level of performance for each OpenGL implementation, but it looks like you are on the right track as you did mention testing on different GPUs. Also drivers may have bugs here and there, but they are most likely tested more than your code. This leads back to what Matias mentioned above. There is the possibility that a fast path on Nvidia/Intel may not be the same on AMD. In fact from my experience I would use AMD as the base-line when developing when you can as there adhere more to the spec than Nvidia. Long story short, you should take a deep look at your code using some form of profiling tool before you can conclude/assume its a driver bug.