The Truth on OpenGL Driver Quality
richg42.blogspot.com
richg42.blogspot.com
You would assume that having proposed it, Apple would have implemented it. Nope. Windows only.
Apple advertises their support for OpenGL 4 in Mac OS 10.9, but they're only up to 4.1. That's the version of the spec from 2010. No tessellation or compute shaders, among other things that were added in 4.2, 4.3, or 4.4. In particular, 4.3 would be a big step because of parity with OpenGL ES 3.
10.10 announcements should be starting up in not too long, so maybe we'll see improvements.
Funny, they still do get a lot more game ports than Linux so far (while Linux is progressively getting there).
Looking at the graph, I can't differenciate between mac and linux on it, but the next one (humble indie bundle 9): http://support.humblebundle.com/customer/portal/attachments/...
the mac purchases are more substantial than the linux ones. This could be due to any number of factors, but like I said, it's only a guess.
Vendor C #1 = Intel on Linux
Vendor C #2 = Intel on Windows
Given the "open source wiz kids to keep driver #1 plodding forward" and "GL on this platform is totally a second class citizen" comments in each description.OTOH the ICD API should be easy enough to reverse engineer. The registry keys, where the OpenGL ICD is registered are well known and there are plenty of drivers in plenty of versions you can dissect to learn how to talk "ICD".
$ glxinfo | egrep 'OpenGL.*version'
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.0
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 10.1.0
OpenGL shading language version string: 1.30Things like having a texture ID, which you then bind to a particular target on a particular texture unit in order to use it make so little sense to someone learning it for the first time. On the CPU, I just pass the pointer to my image to a function to manipulate it. I don't have to put it into a special slot of a special structure in a special place in memory! It took me years to understand many of these things, and I see others struggling in the exact same way on Stack Overflow, for example. So sad.
IIRC in modern versions of D3D (10+? 11+?) they've expanded on this and just have the general concepts of views and buffers, so that you can treat textures and vertex buffers as if they share underlying properties, and shader code can manipulate them in similar ways. This is great for compute and GPU-accelerated processing and GPU feedback.
The challenges arise in validation and actual development. Validating that a driver works correctly is VERY difficult due to the complexity of the spec, and you can't really afford to have a huge test team with as much experience and knowledge as your driver development team. Even once you've validated and shipped your driver, you can't know how end-users are going to exercise it.
Then as a developer, not only do you have poor knowledge of the spec, but you have no knowledge of how each vendor interpreted the spec and whether or not their implementation matches their expectations.
As the surface area of OpenGL and the complexity of each entry point grow, this is only getting worse.
SDL2 in general is hardware rendered.
SDL1 is a good counter-example to "software rendering isn't quick enough anymore". You can make perfectly performant 2d games with sdl1's software rendering... 3d, not so much.
Perhaps my wording was poor. It's more of a hack than in SDL2, where all the SDL functions support hardware rendering with no need to touch OpenGL directly ever.
The general point still stands that you can write performant software rendering in SDL1.
Hilariously, using software SDL for your framebuffer (at least on X.org) will be much slower than using OpenGL PBOs. Don't talk about hardware acceleration here -- all we're doing is transferring a finished frame to the display. At this point, we already need much more than the "small" amount of code to implement KMS. Can it break? Yes it can. Does it break? Yes it does. Graphics driver issues are still among the most common problems I witness people struggle with, as far as getting their OS to run smoothly goes.
Actually no. OpenGL in no way deals with setting up the display or creating a window on the screen. That has always been the responsibility of the underlying graphics infrastructure (KMS, X11, GDI, etc.)
> Purely CPU based rendering (which was fast enough in the 90s) is no longer a choice really.
In fact on Linux you can use KMS and the fbdev without making use of OpenGL. Heck, mplayer and ffmpeg even support do operate on the fbdev without going through a windowing system – just naked writes to the graphics framebuffer.
> I find it sad that we have no modern standard akin to VESA / VBE
Actually there is such a standard, it's called EGL. However EGL by itself is graphics stack agnostic and has been designed to be usable on a wide range of plattforms and graphics infrastructures. So you still have to use some kind of operating system dependent API to open the display device, but then you can use that display device handle with EGL to create abstract surfaces that OpenGL, OpenVG and other API can use to draw on.
From a user space process programmer's perspective the graphics device is some abstract thing, represented by the operating system through a unified API.
When it comes to actually setting the framebuffer mode on the hardware, well, in theory it sounds nice to have a common hardware standard like VESA to support this. But then such a low level interface was of little use to user space applications running in memory protected environments.
For a long time the X server was required to be SUID root because it drilled a hole through memory protection using ioperm so that it could talk to the graphics chip directly; but talking VESA required some code of the Video BIOS to execute, which technically requires a real mode environment the X server also included a 8086 emulator to run the Video BIOS code in. We had to live with this mess until KMS came along.
From a programmer's perspective KMS is the far nicer, much less complex solution, even on the low level. Yes, it requires dedicated code for each kind of GPU, yes there is some code duplication. But the advantage is a huge reduction in complexity: Not interacting with a Video BIOS (or a EFI driver) means, that you don't have to provide a runtime or execution interface in your kernel for them to operate in. Writing a universal emulator/VM, verifying that it always does the correct thing is much harder, that punching down a few dozen lines per GPU class to deal with the low level mode setting stuff.
OGL support is far behind.
It's one of the big reasons I'm hoping that with efforts like the driver for GPU for the RPI being open sourced that we'll start to see some more consistent drivers for mobile chipsets.
It's pure bliss to use normal desktop gl implementations because they don't constantly crash on you. They don't have weird breaking bugs. They don't leak memory like no tomorrow. They don't play fast and loose with precision. They don't have absolutely retarded performance regressions.
Basically the drivers only work if you use Unity or some other well known engine. The driver makers don't really bother making real ES drivers, they just make something that doesn't crash Unity.
I could go on and on about this.
And yet over the decades nothing has improved. When Browser wanted to do hardware Acceleration there were many Laptop GPU being blacklisted simply because they dont have any drivers update. Situation is much better on Mac because the drivers and testing happens to be the same people.
There are people who wanted the GPU to be just another CPU. Intel Larrabee. But none of them has succeeded.
I wouldn't have thought with GPU IP taking rounds, drivers quality being in the hands of vendor would have improve the situation abit. However it seems no one wants to invest into it.
So do we have no solution for this? Rumors has it Apple are designing their own GPU. May be they are tackling the drivers problem themselves by getting rid of it?
AFAIK there's no route for an IHV to get an updated driver to a user without going through Apple, put it that way.
GPU driver: http://www.nvidia.com/download/driverResults.aspx/73628/en-u... Additional CUDA driver: http://www.nvidia.com/object/macosx-cuda-6.0.37-driver.html
Also, there are always rumors about $LOW_COST_PRODUCT being the same silicon as $HIGH_COST_PRODUCT from the same manufacturer, just with a few features turned off in the driver. This probably isn't true, but nobody can rule it out.
That's my understanding of how it works for CPUs. A four-core CPU with questionable functionality on the 4th core may be sold as a "3 core" CPU. Depending on how "questionable" the 4th was though, it might be possible to use it anyway.
Way cheaper (and more flexible!) than ramping up different production lines.
But, it's my understanding that most of what you pay for when you buy a Tesla card is support. If you call Nvidia saying Maya has a driver problem with your Tesla card, they will pay attention. If Maya has a problem running on a GeForce card, they will direct you to the forums.
I remember the management being very secretive about this since they didn't want their customers to think they were being ripped off by buying the "expensive" chip…
I don't meant to sound critical of this practice… From an cost perspective it makes a lot of sense to do it this way—the cost to layout, test, and create all the masks for a custom chip is huge. So it makes sense to want to cram as much into one chip instead of making 2 or 3 or 4. That way the one time cost of creating the masks and tooling up at the foundry are amortized over all the products that use the die.
No, this guy was soldering resistors on his $1000 card to spoof the PCI vendor:device IDs and fool the driver to enable a software features (4 displays at once). The same could have been done by patching the kernel.
IIRC Nvidia fixed the "bug" that made this work but enabled the feature on the consumer cards (it was available on Windows but not Linux for reasons unknown).
But he did not get access to the hardware features which are fused off.
And as others have said, every chip manufacturer out there does same. Intel has 20+ models of their most recent CPUs, which are probably all the same silicon or perhaps a few different designs. i5's are "crippled" i7's (perhaps ones that were not 100% successfully manufactured), but you get them at a discount.
Wether or not that's in the ROM or driver is up for debate though.
Edit: Found an example more recent than I was thinking, but it's been around a long time: http://www.eevblog.com/forum/chat/hacking-nvidia-cards-into-...
There are also game / application specific optimizations and tricks in those drivers that show up as those "30% increase of performance in game X" changelogs.
Also those drivers are huge (really, HUGE) and have incorporated pieces of code with widely differing IPs, patents previous companies and other sources for which opensourcing would probably be a major legal hassle and lawsuit risk.
Also... if you're nVidia / ATi... what's the gain in giving optimization paths and software optimization database to the competitor? Those drivers are full of application / game specific optimizations to make them look better / run faster / workaround bugs.
P.S. Broadcom open-sourced a part of their GPU for the Raspberry Pi. (Specifically the VideoCore IV VPU on the BCM21553 which RasPi is porting to the BCM2835 http://www.raspberrypi.org/a-birthday-present-from-broadcom/ )
Intel open sourced their driver not their GPUs.
Broadcom open sourced part of the software running on one of their GPUs, not their GPUs.
But Intel has most definitely documented their GPU registers and hardware – not just the intel open source driver:
https://01.org/linuxgraphics/documentation/driver-documentat...
The article is rich with the reasons behind this. Some of it is IP encumbered, some of it is benchmark hubris. All of it is the shroud of secrecy that the graphics market prided itself on coming back to bite them in the ass as their driver stacks are now massive piles of virtually unmaintainable code - code that can't even be rewritten because the companies themselves (well, at least AMD and Intel) are hiding details about how the hardware works from itself!
Maybe some day in the future the various GPUs will have code gen backends in LLVM/Microsoft compilers without needing secret & broken vendor drivers and we'll be down to one set of bugs per platform, instead of <dx-win|ogl-win|ogl-mac|ogl-linux-proprietary|ogl-linux-free> x <amd|nvidia|intel> = 15 combos.
So you drop it from the common interface that your abstraction presents because it's just not consistent enough....
There are also a TONNE of shader abstraction languages that transcribe to HLSL or GLSL on the fly for the same reason.
tldr; Engine developers stare into the abyss and somehow the abyss gives back a projection matrix.
Yes and no. The situation with OpenGL and drivers is quite different to browsers and jQuery.
OpenGL drivers are generally quite good in implementing the API as it is specified and this is tested with a huge bunch of conformance suites. It's not like ancient browsers where one vendor's understanding of the CSS box model is different from the others'.
However, OpenGL has a huge number of different versions, some require hardware support (major versions like GL 4.x vs. 3.x), while others might be software only additions (minor versions, GL 3.2 to 3.3). And then there are lots of API extensions that may or may not be available. This is a relatively simple problem to solve and we have tools like Regal and ANGLE to patch the little things.
But the real problem is functional bugs. Incorrect pixels on the screen ranging from a minor annoyance to a completely destroyed image. And more severe issues like application crashes, completely corrupted display/desktop to blue screens and kernel hangs. This is something that cannot be fixed.
http://nvidia.custhelp.com/app/answers/detail/a_id/3335/~/td...
To be fair, they are better - I haven't heard them lately crashing the kernel so hard the alt-sysrq combos don't work.
Nvidia hates OpenCL as it eats their Cuda business and Intel performs market segmentation, therefore their Linux implementation supports only CPU and Xeon Phi and Windows supports the GPU. They don't want server builders to purchase their desktop chips with GPU's. They want them to purchase the massively expensive Xeon Phi and use normal Xeon CPU's.
Typo or funny wordplay?
So, wordplay.