
148 GPGPU Programming for Games and Science
vs 5 0
dcl
globalFlags refactoringAllowed
dcl
constantbuffer cb0[4] , immediateIndexed
dcl
input v0.xyz
dcl
input v1.xyzw
dcl
output o0.xyzw
dcl
output s i v o 1 . xyzw , posi t i on
dcl
temps 1
mov o0 . xyzw , v 1 . xyzw
mov r 0 . xyz , v0 . xyzx
mov r0 .w, l (1.000000)
dp4 o 1 . x , cb 0 [ 0 ] . xyzw , r 0 . xyzw
dp4 o 1 . y , cb 0 [ 1 ] . xyzw , r 0 . xyzw
dp4 o 1 . z , c b0 [ 2 ] . xyzw , r 0 . xyzw
dp4 o 1 .w, cb 0 [ 3 ] . xyzw , r 0 . xyzw
ret
// Approximately 8 instruction slots used
LISTING 4.5: The output assembly listing for the vertex shader of
VertexColoring.hlsl for row-major matrix storage.
The constant buffer