m4x4 dest, src0, src1
| Name | Registers |
|---|---|
| dest |
An output register or temporary register. Cannot use anything other than the default mask { .xyzw }. |
| src0 |
A temporary register, an input register, or a floating-point constant register. |
| src1 |
A temporary register, an input register, or a floating-point constant register. Specifies the starting register of a 4x4 matrix. (In other words, if src1 is r0, then the 4x4 matrix is stored in r0, r1, r2 and r3.) |
You cannot specify a floating-point constant register for both src0 and src1.
You cannot specify an input register for both src0 and src1 at the same time.
You cannot specify the same register for dest and src0.
If you set dest to the registers that immediately follow src1 (this is src2, src3, src4 in Macro Expansion below), there is no way to anticipate the result because the contents of those registers will be updated during the execution of the expanded instructions.
Stores the result of multiplying a 4x4 matrix and a 4-component vector in dest.
src2 = Next_Index_Of ( src1 ) src3 = Next_Index_Of ( src2 ) src4 = Next_Index_Of ( src3 ) dest.x = ( src0.x * src1.x ) + ( src0.y * src1.y ) + ( src0.z * src1.z ) + ( src0.w * src1.w ) dest.y = ( src0.x * src2.x ) + ( src0.y * src2.y ) + ( src0.z * src2.z ) + ( src0.w * src2.w ) dest.z = ( src0.x * src3.x ) + ( src0.y * src3.y ) + ( src0.z * src3.z ) + ( src0.w * src3.w ) dest.w = ( src0.x * src4.x ) + ( src0.y * src4.y ) + ( src0.z * src4.z ) + ( src0.w * src4.w )
dp4 dest.x, src0, src1 dp4 dest.y, src0, src2 // src2 = next index of src1 dp4 dest.z, src0, src3 // src3 = next index of src2 dp4 dest.w, src0, src4 // src4 = next index of src3
m4x4 r0, r1, c0 // This is expanded as follows // dp4 r0.x, r1, c0 // dp4 r0.y, r1, c1 // dp4 r0.z, r1, c2 // dp4 r0.w, r1, c3
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ||
|---|---|---|---|---|---|---|---|---|---|---|
| dp4 | read | MUL | ADD | ADD | post | write | ||||
| dp4 | read | MUL | ADD | ADD | post | write | ||||
| dp4 | read | MUL | ADD | ADD | post | write | ||||
| dp4 | read | MUL | ADD | ADD | post | write | ||||
CONFIDENTIAL