Skip to contentSkip to conversation

nv50 microcode/shader format

DISCUSSION Wladimir van der Laan 1 participant 2 messages Nov 11, 2007 – Nov 12, 2007 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello there,

With the use of CUDA and ptx I managed to make a disassembler for at least one of the nv50 microcode/shader formats. This might come in handy for some people, hence I'm posting it here:

http://www.cs.rug.nl/~wladimir/decuda/

I'm not yet sure if pixel/vertex shaders use the same instruction format as the compute shaders used by CUDA, but you'd think so, as nv50 is supposed to have unified shader units. If anyone can help me a bit in finding the shader instructions in valgrind-mmt-extend of mmiotrace dumps that'd be a great help. I haven't had much luck yet with that. Is there a way to "pretty print" the output of those programs, I mean, fill in the registers already known?

Greetings,
Wladimir J. van der Laan

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 3a7f9e660711111304j840c257vb5f12d495ddecca3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#2 lore raw

I can answer myself here, as I finally managed to dump the shader as sent to the card: yes, the shader binary format used for vertex, fragment and geometry shaders on the G80 is the same as the cubin for CUDA. There appear to be some special instructions that are used to read input and write output registers absent from CUDA. Apart from those, decuda will be a good start if someones decides to tackle NV50 shaders in Nouveau.

Wladimir

Quoted 16 lines · Wladimir van der Laan

Hello there,

With the use of CUDA and ptx I managed to make a disassembler for at least one of the nv50 microcode/shader formats. This might come in handy for some people, hence I'm posting it here:

http://www.cs.rug.nl/~wladimir/decuda/<http://www.cs.rug.nl/%7Ewladimir/decuda/>

I'm not yet sure if pixel/vertex shaders use the same instruction format as the compute shaders used by CUDA, but you'd think so, as nv50 is supposed to have unified shader units. If anyone can help me a bit in finding the shader instructions in valgrind-mmt-extend of mmiotrace dumps that'd be a great help. I haven't had much luck yet with that. Is there a way to "pretty print" the output of those programs, I mean, fill in the registers already known?

Quoted 4 lines

Greetings,
Wladimir J. van der Laan

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau