Anonymous user
Accelerated Graphic Cards: Difference between revisions
m
no edit summary
[unchecked revision] | [unchecked revision] |
m (→NVIDIA) |
mNo edit summary |
||
(20 intermediate revisions by 2 users not shown) | |||
Line 1:
While it is nice to have some graphics on the screen, it would be even nicer to have the video card do the dirty work. Beware though, things are not always as easy as they seem.
<!-- Alternative [[VESA BIOS Extension/Accelerator Functions]] (this doesn't seem to be updated for a decade, probably best to delete this instead) -->
== Cards with documentation ==
=== 3Dfx ===
These are a sort of good news for 3dfx cards (those with a Voodoo chipset). These cards could be the only ones with relatively fast 3D support (Glide/OpenGL) and [http://darwin-3dfx.sourceforge.net/ open specifications]. Voodoo cards are still available from sources such as eBay.
Line 15 ⟶ 14:
The intel-gpu-tools package mentioned on the 01.org page is recommended as it can be used to dump current register values for examination.
=== ATI
The ones regarding a R630 or M56 chip can be downloaded from [https://www.x.org/docs/AMD/old/ X.org].
Since early 2014 AMD maintains up to date open programming guides for all their GPUs, including an specific e-mail address for support.▼
▲Since early 2014, AMD maintains up to date open programming guides for all their GPUs, including
=== NVIDIA ===
<!-- NVIDIA now provides official documents for their GPUs and open sources their GPU drivers for Linux
NVidia doesn't provide official specifications, but a lot of community effort is spent in the [http://nouveau.freedesktop.org/wiki/ nouveau] project, which can be sourced for examples and documentation even though such reverse engineered specifications aren't complete nor guaranteed to be accurate. Marcin Kościelnicki has been writing down unofficial specs in his [http://0x04.net/cgit/cgit.cgi/envytools/tree/ envytools] repository (the link is dead, however envytools is [https://github.com/envytools/envytools available on GitHub]). ▼
▲
Although having missing bits here and there, they are certainly an interesting resource for learning about the internals of these graphic cards. These docs cover the entire range of NVIDIA hardware, from the first to the latest card, and might prove sufficient to write a native driver.
-->
NVIDIA now provides official documentations for most of their GPUs [https://nvidia.github.io/open-gpu-doc/ on GitHub] and open sourced their Linux kernel module for their GPUs [https://github.com/NVIDIA/open-gpu-kernel-modules also on GitHub]. Before NVIDIA officially open sourced their GPU stuff, there are many NVIDIA GPU reverse engineering projects like [http://nouveau.freedesktop.org Nouveau] and [https://github.com/envytools/envytools EnvyTools] and a group of hackers even leaked most of NVIDIA's GPU stuff like documentation and even full-on reference FPGA codes, which led to NVIDIA officially open sourcing of their GPU documentation and Linux kernel module. Most of these reverse engineering project aren't complete unlike NVIDIA's official documentation but you can still use it as an another source of NVIDIA GPU documentation in addition with NVIDIA's official open source documentation.
=== VMware SVGA-II ===
Not exactly
== Where can I find low-level information about
Good question. Unless you find something else, there is virtually no information publicly available (for free or otherwise) about the internal workings of current
Now, if you have a VIA
▲Good question. Unless you find something else, there is virtually no information publicly available (for free or otherwise) about the internal workings of current 3D graphics cards. There are only small bits that are relevant to game programmers but nothing an OS developer could use.
▲Now, if you have a VIA graphics chip, things may be better since they recently released an [http://linux.via.com.tw/ open source driver] for both 2D and 3D operations.
There are virtually no tutorials or datasheets for the 2D acceleration features either, but at least we have open-source code for them. Among other sources, the Xfree drivers, [https://github.com/haiku/haiku/tree/master/src/add-ons/accelerants Haiku (was Open BeOS) accelerants] and [http://www.shawnhargreaves.com/freebe/ FreeBE/AF]. They may provide enough information to reverse-engineer and figure out a model that could be used to program/port for your environment. Some older cards with only 2D acceleration might be documented by the [https://pdos.csail.mit.edu/6.828/2018/readings/hardware/vgadoc/ VGADoc] ([https://pdos.csail.mit.edu/6.828/2018/readings/hardware/vgadoc4b.zip vgadoc4b.zip], also on [https://github.com/achernya/iap-6.828-website/tree/master/readings/hardware/vgadoc Github]).▼
▲There are virtually no tutorials or datasheets for the 2D acceleration features either, but at least we have open-source code for them. Among other sources, the
Anyone who wishes to put time into that kind of research is welcome to post their results here.
== What can 2D acceleration do for me? ==
* Hardware mouse cursor, drawn and managed (e.g. you provide coordinates, the card does the rest)
* Bitblt (for "'''BIT'''
* Tiles. You enter a small NxN dataset (usually a bitmap of between 8x8 and 32x32), a foreground color and a mixing style plus some coordinates and the card "paints" the area with the given pattern. That can be handy to render Win95-like backgrounds (tiled ones) or even to draw fonts quickly.
== How do 3D-accelerated programs talk to 3D-accelerating hardware? ==
▲I'll be assuming that you have a strong knowledge of OpenGL etc and that you don't need it covered here. If you take the example of nVidia's 3D driver for linux (if you have a correctly configured nVidia card, you can see almost all this by a simple "strace" on a 3D program in linux), things are organized this way:
* Two libraries libGL.so and libGLcore.so will be loaded by any program that wishes to do accelerated 3D operations. Upon startup, those libraries open "/dev/nvidiactl" and "/dev/nvidia0".
<!-- Since the kernel module is now open sourced, should this section removed completely? -->
* The kernel module is made of an "obscure" file nv-kernel.o which contains only "anonymized" symbols and
* The actual "conversation" between the library and the driver cannot be traced by conventional means: /dev/nvidia* only allows "ioctl" operations and mmap. The values you can observe in "/proc/XXXXX/maps" while the 3D program is running, which let
l /proc/pci
Line 92 ⟶ 79:
== External links ==
* [[topic:23548|A topic on duplicating/reverse engineering existing driver code]]
[[Category:Video]]
|