Results 1 to 2 of 2

Thread: what does open source driver programming look like?

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Posts
    72

    Question what does open source driver programming look like?

    I would like to know how we turn these register documents into nice linux drivers? When I look at the evergreen referece, I see what looks like the assembly code of my Patterson architecture book. Now that I think of it, How do we wrangle our datatypes into the SIMD extended instruction (or other multimedia instructions) set for processors without help from the compiler?

  2. #2
    Join Date
    Oct 2007
    Location
    Toronto-ish
    Posts
    7,544

    Default

    Quote Originally Posted by dacresbu View Post
    I would like to know how we turn these register documents into nice linux drivers? When I look at the evergreen referece, I see what looks like the assembly code of my Patterson architecture book. Now that I think of it, How do we wrangle our datatypes into the SIMD extended instruction (or other multimedia instructions) set for processors without help from the compiler?
    The Evergree shader instruction set document only covers one aspect of programming the chip. A better place to start would be the R6xx_R7xx_3D.pdf document from :

    http://www.x.org/docs/AMD/

    That gives you more of a top-to-bottom view of what is required, at least from a drawing / acceleration point of view. Look at the diagram on page 8, then read through the steps starting on page 12. That part of the doc walks you through the main steps a driver must perform when drawing.

    For simpler functions, such as those used in 2D acceleration (EXA and Xv APIs) Alex hand-coded the shader instructions with a bit of help from the shader compiler that Richard was working on at the same time. Remember that vertex and pixel (aka fragment) shader programs are what run on each individual vertex and pixel, so in some cases they can be as simple as passing the vertex information from input to output, or reading one pixel from a texture and outputting it to the next hardware block (DB/CB, or Depth Buffer / Color Buffer).

    You'll see a couple of places in the doc where "loading the shader program and telling the GPU where to find it" are mentioned -- the ISA doc (like the one we just released for Evergreen) tells you exactly what those shader programs should look like.
    Last edited by bridgman; 12-23-2009 at 01:11 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •