Skip to contentSkip to conversation

Questions about libdrm programming

DISCUSSION Zachary Catlin 2 participants 3 messages Jun 11, 2011

lore
Share & tools
lore
#0 lore raw

I'm interested in (1) using my graphics card for computations and
(2) low-level shader code, and I'm looking for guidance on how I would go about doing the following operations with libdrm (sans Mesa):

* client-side initialization
* loading textures into the GPU
* loading a bytecode shader into the GPU
* creating a texture on the GPU without uploading data
* running the shader using the uploaded textures as inputs and the non-uploaded texture as the output
* transferring the output texture into main memory
* tear-down, finalization

The GPU in question is a Radeon RV730, if any hardware-dependent discussion is needed. I've tried to understand the workflow by looking at the Mesa and Plymouth sources and the documentation I've found for the DRI/DRM, but I could still use some guidance.

#1 lore raw
Quoted 3 lines · Zachary Catlin

I'm interested in (1) using my graphics card for computations and
(2) low-level shader code, and I'm looking for guidance on how I would
go about doing the following operations with libdrm (sans Mesa):http://cgit.freedesktop.org/~airlied/radeondemo

Its not something libdrm really does, its only a simple abstraction around ioctls.

http://cgit.freedesktop.org/~airlied/radeondemo

is a simple layer on top that just does some blits using the shaders from the DDX.

Dave.

#2 lore raw
Quoted 2 lines · On Sat, 11 Jun 2011 11:39:39 +1000 Dave Airlie <[email protected]> wrote:

Its not something libdrm really does, its only a simple abstraction around ioctls.

I'd managed to figure that out--I just figured the abstraction was there to save a little typing and act as a type-level sanity check.

Quoted 4 lines

http://cgit.freedesktop.org/~airlied/radeondemo

is a simple layer on top that just does some blits using the shaders from the DDX.

This is the sort of thing I tried to find. Thanks!

Signature · 4 lines
Zachary Catlin    [email protected]
The only way of discovering the limits of the possible is to
venture a little way past them into the impossible.
  --Clarke's Second Law