Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Not sure if this is the right place for this question, but on StackOverflow I had close votes that says I should look here.

Where can I find information for how the PCI interface for 3D graphics programming works?

I know that for VESA, you create access to the frame buffer at 0xf8000000 and just write to that memory range (among many other details). I was wondering where I can find how the low level PCI interface works for graphics programming?

Specifically, I have the following questions:

  • Is there a standard PCI protocol or does this differ per graphics card vendor/model?; Does OpenGL go over the PCI bus or is this something the graphics driver translates to a custom protocol?;
  • Is generic documentation available on all of this and where can I find this?
share|improve this question
add comment

closed as off-topic by MichaelT, Martijn Pieters, Kilian Foth, GlenH7, gnat Feb 26 at 7:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – MichaelT, Martijn Pieters, Kilian Foth, GlenH7, gnat
If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers

up vote 5 down vote accepted

The PCI bus specification and the OpenGL standard are completely unrelated.

Knowing how the PCI Express bus works is also completely irrelevant to you as a programmer. If you're curious, the PCI Express wikipedia page links to technical documentation on how it works.

I think what you're really asking for is the programming manual for a graphics processor or two. Here are the ones for Intel's:

http://intellinuxgraphics.org/documentation.html

share|improve this answer
add comment

PCI is a hardware protocol, you can wiki the specifications but that won't help you. All the protocol specifies is how hardware presents control registers and memory to the host bus. This is a long ways away from VESA, which actually did describe the hardware interface that the cards present to the outside world, including what the registers do and memory formats.

As you guessed, each manufacturer's individual cards is different and very proprietary (ie. you cannot get interface specs from them because that's part of their competitive advantage).

You are pretty much restricted to going through the OS driver that the card manufacturer provides.

share|improve this answer
add comment

The VESA BIOS EXTENSION (VBE) describes the core functions of the VESA BIOS. (Usefull for a basic 2D graphic). The public document "vbe3.pdf" can be download from vesa.org (behind registration wall).

With my Colorfull GTX 295(PCIe) I can use the VBE 3 BIOS with the native resolution of 1920 x 1200 x 32 (16:10 widescreen) of my 28" LCD.

Beginning with VBE 2 it is possible to use the linear framebuffer and we have to use the vesa mode table that come with the bios.

Beginning with VBE 3 it is possible to use vesamodes with own refreshrates (usefull for analog displays <60hz), maybe in combination with hardware triple buffering or stereoskopic modes for shutterglasses.

Most of the VESA functions can only be used with the real mode, V86 mode, or 16 Bit-Big Real mode/Unrealmode and can't be used within the protected mode(PM). Only a few functions can be used in the PM.

share|improve this answer
add comment

Generally speaking, you are much better off relying on an intermediate API such as OpenGL or the graphics part of DirectX, to make abstraction of the underlying hardware such as the PCI, PCI-express or AGP bus as well as the actual graphics card's various registers.

If you really are interested in the very low-level programming of graphics cards there are some books around from the "old days" - I used to have a rather large tome describing the programming models of all the then-current graphics cards. Back then things were mostly interrupt-based - you programmed directly in assembly and had to know the card's exact behaviour. You also had to manage memory-windows into your graphics card because at that time you could access only 64kb at a time while the total amount of memory needed for just the frame buffer in the higher-resolution modes was larger than the 64kb.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.