Is there a lower level API beyond DirectX/OpenGL?
Asked Answered
S

4

15

I hear that OpenGL and DirectX calls are actually converted by the video driver into card specific calls. I also know that sometimes a new video driver can improve performance 50% on a video game without the developer doing anything. If I want fine grain control over the video card, is this possible at a level below DX/OpenGL? Does Nvidia/AMD release vendor specific APIs?

Shill answered 14/6, 2011 at 14:54 Comment(2)
Also, this is for research. Ill only be supporting one video card (mine)Shill
Since there is no standard (yet...), the answers here come down to how open source the drivers are: askubuntu.com/questions/164782/…Misunderstood
B
18

NVidia keeps their GPUs programming model a secret. No chance getting lower than DirectX, OpenGL, CUDA or OpenCL.

AMD/ATI opened up their documentation, but that's probably too low level for the everyday job programmer: http://developer.amd.com/documentation/guides/pages/default.aspx#open_gpu

Intel open sources their Linux drivers and there's some kind of documentation.

The Linux open source drivers for both AMD and Intel go through an low level API called DRI2/DRM; in combination with KMS also called Gallium. MesaGL sits on top of DRI, so in Linux there is actually such a lower than OpenGL level API to the graphics card. MesaGL is a so called DRI state tracker, and from what I hear the WINE developers have a Direct3D-10 (and 11?) state tracker almost finished, so there's native Direct3D to be supported by WINE in the foreseeable future. Will work with DRI only of course, so no support for NVidia GPUs.

Balmy answered 14/6, 2011 at 15:46 Comment(0)
E
4

Forget it, you'll spend MUCH more time on reading some kind of SDKs and supporting all possible video cards. Let me give you an advice: just read articles that explain how to make a D3D or OpenGL apps effective (caching, context switching, etc.).

Earlearla answered 14/6, 2011 at 14:58 Comment(1)
@armadia you probably won't gain anything from coding your own drivers. If you just want high perf, just profile your app. But, if your goal is to find out how the driver works internally, well, this is an awesome project.Archangel
A
1

On AMD/ATI:

OpenCL --compiles to-> IL --compiles to-> ISA --links to-> ELF executable

On NVIDIA:

OpenCL --compiles to-> PTX --compiles to-> ISA --links to-> executable format of some kind

For AMD, there used to be CAL which gives lower level access than OpenGL/OpenCL, but it is being deprecated. There are some hints that access IL and ISA will be available through OpenCL though. See this forum thread: http://forums.amd.com/forum/messageview.cfm?catid=390&threadid=150149&forumid=9

Affluent answered 14/6, 2011 at 17:43 Comment(0)
L
0

I agree with some of the other posts. I would add, though, that you might want to look into shaders as well. They allow you to do some pretty awesome stuff while still achieving high performance.

Lely answered 14/6, 2011 at 15:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.