[raspi-internals] Re: QPU Tutorials/Samples

  • From: Herman Hermitage <hermanhermitage@xxxxxxxxxxx>
  • To: "raspi-internals@xxxxxxxxxxxxx" <raspi-internals@xxxxxxxxxxxxx>
  • Date: Wed, 19 Feb 2014 22:09:48 +1200

I've pushed an update to qpuasm.js with some experimental packing support.

I've tried round tripping some shader fragments sniffed from opengl, 
disassembled with qpudis.c and then assembled with qpuasm.js.  Mostly working, 
some issues with arbitrary way instructions may sometimes be packed:

eg.
 - X=0, or X=1 when a name (eg, r0..r3) is available in both bank a and bank b 
as a destination.  eg.  mov r0, r1; mov r2, r3 can be packed with X=0 or X=1.

 - raX.pack as a mulop destination can be packed with either packmode=0 or 
packmode=1 (if not constrained by other parts of the instruction).

I was thinking that the OpenGL ES shader fragments are computer generated and 
not passing through an assembler, where as the Blob itself contains qpu code 
that was probably hand written in assembler.  As such I'll probably try to get 
a bit match for a round trip (disassemble then reassemble) of Blob routines, 
and let the dynamic shaders slide.

(Of course the assembler could be extended to have a instruction equivalence 
test in addition to a simple bit test...).

I've been thinking of doing a reference vpuasm.js for the VPU, mainly because I 
like to have a simple too to experiment with, and it might be a useful syntax 
reference for those working on more serious tools.

Cheers
/HH                                       

Other related posts: