ATTILA Shader ISA Public

From AttilaWiki

Jump to:navigation, search

Contents

Encoding

ATTILA Shader Instruction Encoding
qword bits size name description
0 0 - 7 8 opcode Defines the instruction opcode (operation)
8 1 endflag Defines if the instruction finishes the current thread/program
9 1 waitpoint Defines if the instruction is a explicit wait point for data pending from units outside the shader processor (texture unit)
10 1 predicated Defines if the instruction is predicated
11 1 invertpred Defines if the register predicating the instruction must be negated
16 - 12 5 predreg Defines the predicate register used by the instruction
19 - 17 3 op1bank Defines the first source operand register bank
20 1 op1negate For integer and float point operands this flag defines if the first operand value is negated

For predicate register operands this flag defines if the first operand value is inverted (NOT)

21 1 op1absolute For integer and float point operands this flag defines if the instruction uses the first operand absolute value

For predicate operands this flag specifies that an immediate TRUE or FALSE value (based on the value of the op1negate flag) is used as the first operand.

24 - 22 3 op2bank Defines the second source operand register bank
25 1 op2negate For integer and float point operands this flag defines if the second operand value is negated

For predicate register operands this flag defines if the second operand value is inverted (NOT)

26 1 op2absolute For integer and float point operands this flag defines if the instruction uses the second operand absolute value

For predicate operands this flag specifies that an immediate TRUE or FALSE value (based on the value of the op1negate flag) is used as the second operand.

29 - 27 3 op3bank Defines the third source operand register bank
30 1 op3negate Defines if the third operand must be negated
31 1 op3absolute Defines if the third operand uses the absolute value
34 - 32 3 resbank Defines the result operand register bank
35 1 saturatedres For integer and float point instructions this flag defines if the instruction result is saturated (clamped to the [0, 1] range)

For predicate instructions this flag defines if the instruction result is inverted (NOT)

39 - 36 4 mask Defines the write mask for the result register
40 1 relmode Defines if relative mode addressing is used for the constant operand
42 - 41 2 reladdr Defines the address register used for relative addressing mode into the constant bank
44 - 43 2 reladcomp Defines the component of the address register used as a index for relative addressing mode into the constant bank
53 - 45 9 reloffset Defines the offset into the constant bank for relative addressing mode.
54 - 63 10 reserved Reserved for future use, should be 0.
For instructions with register only operands
1 0 - 7 8 op1reg Defines the register for the instruction first source operand
15 - 9 8 op1swizzle Defines the swizzling to be applied to the instruction first source operand
23 - 16 8 resreg Defines the register for the instruction result operand
31 - 24 8 op2reg Defines the register for the instruction second source operand
39 - 37 8 op2swizzle Defines the swizzling to be applied to the instruction second source operand
47 - 40 8 op3reg Defines the register for the instruction third source operand
55 - 48 8 op3swizzle Defines the swizzling to be applied to the instruction third source operand
63 - 56 8 reserved Reserved for future use (should be zero)
For with immediate second input operand
1 0 - 7 8 op1reg Defines the register for the instruction first source operand
15 - 9 8 op1swizzle Defines the swizzling to be applied to the instruction first source operand
23 - 16 8 resreg Defines the register for the instruction result operand
31 - 24 8 reserved Reserved for future use (should be zero)
63 - 32 32 immediate Defines the immediate value used as the instruction second source operand (broadcast to all components for SIMD instructions)

Opcodes

ATTILA shader instructions
opcode format type scalar SIMD4 SOA description
00 NOP No operation
01 ADD dest, source1, source2 arithmetic, float point x x Float point 32-bit addition
02 ADDI dest, source1, source2 arithmetic, integer x x Signed 32-bit integer addition
03 ARL dest, source1 conversion, movement x x Address register load (and conversion from 32-bit float point to integer)
04 ANDP dest, source1, source2 logical, predicate x x Logical AND for predicate registers
05 Reserved Reserved for future use
06 Reserved Reserved for future use
07 COS result, source1 arithmetic, float point x x Computes the cosinus of the instruction source
08 DP3 result, source1, source2 arithmetic, float point x Dot product between the three first components of the two source registers
09 DP4 result, source1, source2 arithmetic, float point x Dot product between the four components of the two source registers
0A DPH result, source1, source2 arithmetic, float point x Dot product between the first three components of the two source registers and addition of the second operand fourth operand
0B DST result, source1, source2 arithmetic, float point x Distance between two vectors (ARB)
0C EX2 dest, source arithmetic, float point x x Exponential of two
0D EXP dest, source arithmetic, float point x x Exponential of two
0E FLR result, source arithmetic, float point x x Floor
0F FRC result, source1, source2 arithmetic, float point x x Fraction
10 LG2 result, source arithmetic, float point x x Logarithm of two
11 LIT result, source1, source2 arithmetic, float point x LIT
12 LOG result, source arithmetic, float point x x Logarithm of two
13 MAD result, source1, source2, source3 arithmetic, float point x x Multiply first operand with second operand and add third operand
14 MAX result, source1, source2 arithmetic, float point x x Maximum between first operand and second operand
15 Min result, source1, source2 arithmetic, float point x x Minimum between first and second operand
16 MOV result, source movement x x Move first operand to result
17 MUL result, source1, source2 arithmetic, float point x x Multiplication for 32-bit float point
18 MULI result, source1, source2 arithmetic, integer x x Multiplication for 32-bit signed integer
19 RCP result, source arithmetic, float point x x Reciprocate
1A reserved Reserved for future use
1B RSQ result, source arithmetic, float point x x Square root reciprocate
1C SETPPEQ result, source1, source2 comparison, float point, predicate x x Set predicate based on an equal-than 32-bit float point comparison
22 SETPGT result, source1, source2 comparison, float point, predicate x x Set predicate based on a greater-than 32-bit float point comparison
1E SGE result, source1, source2 comparison, float point x x Set to 0.0 (false) or 1.0 (true) based on a greater-or-equal-than comparison
1F SETPLT result, source1, source2 comparison, float point, predicate x x Set predicate based on little-than 32-bit float point comparison
20 SIN result, source arithmetic, float point x x Sinus
21 SETPEQI result, source1, source2 comparison, integer, predicate x x Set predicate based on an equal-than 32-bit signed integer comparison
22 SLT result, source1, source2 comparison, float point x x Set to 0.0f (false) or 1.0 (true) based on a little-than comparison
23 SETPGTI result, source1, source2 comparison, float point, predicate x x Set predicate based on greater-than 32-bit signed integer comparison
24 SETPLTI result, source1, source2 comparison, float point, predicate x x Set predicate based on little-than 32-bit signed integer comparison
25 TXL result, source, texture-unit texture x Texture access with LOD defined in fourth component of the texture coordinates
26 TEX result, source, texture-unit texture x Texture access
27 TXB result, source, texture-unit texture x Texture access with LOD bias defined in fourth component of the texture coordinate
28 TXP result, source, texture-unit texture x Texture access with projection (pre-division by the third component of the texture coordinates)
29 KIL source control x Kills the fragment
2A KLS source, sample control x Kills a fragment sample
2B ZXP source output x Export Z for the fragment
2C ZXS source, sample output x Export Z for a fragment sample
2D CMP result, source1, source2, source3 arithmetic, float point x x Selects between source2 and source2 based on the value of source1 (<0?)
2E CMPKIL source1, source2 texture x Kills the fragment based on the comparison between the two source operands
2F CHS control x Change fragment sample for Z export
30 LDA result, source, attribute memory x Loads a vertex attribute from memory
31 FXMUL result, source1, source2 arithmetic, fixed point x Fixed point multiplication
32 FXMAD result, source1, source2, source3 arithmetic, fixed point x Fixed point multiplication and addition
33 FXMAD2 result, source1, source2 arithmetic, fixed point x Fixed point multiplication and addition from fixed point accumulator
34 DDX result, source1 arithmetic, float point x Derivative in the X (horizontal) screen direction
35 DDY result, source1 arithmetic, float point x Derivative in the Y (vertical) screen direction
36 JMP predicate, offset control, predicate x Jump to an instruction at the defined offset if the predicate value is true
37 END control Marks the end of the thread/program
38 - FF Reserved Reserved for future use

Banks

Register Banks and operand types
Code Name Type Description
0 IN R Input register, store values predefined at the start of the thread
1 OUT W Output register, store the thread results that will be used by the next stages
2 PARAM R Constant register, stores constant values shared for all threads
3 TEMP R/W Temporary register, holds the temporary values for the thread
4 ADDR R/W Address register, temporary integer addresses used to index on the constant register bank
5 PARAM2 R Constant register, stores constant values shared for all threads (extends the constant bank by an additional 256 registers)
6 IMM R Immediate value, 32-bit immediate value encoded in the instruction
7 Reserved Reserved for future use



Instruction Set Specification

Reference

-op Negate operand (float point, integer)
|op| Absolute value of the operand (float point, integer)
!op Invert (NOT) operand (predicate)
(pred) Instruction predication
_sat Sature instruction result (clamp to [0, 1] range)
imm32 32-bit immediate value (type depends on the instruction)
mask Write mask: .x .y .z .w .xy .xz .xw .yz .yw .zw .xyz .xyw .xzw .xyzw
predreg Predicate register
regopn Register source operand
constregopn Constant register source operand
predregopn Predicate register source operand
resreg Register result operand
addrregres Address register source operand
predresreg Predicate register result operand
select 4-component select: .x .y .z .w
swizzle 4-component swizzle and broadcast: .{[x|y|z|w][x|y|z|w][x|y|z|w][x|y|z|w]}



The swizzle function defines the 4-component swizzle and broadcast for the instruction.

vec4 swizzle(vec4 in)
{
  vec4 out;
  for(e = 0; e < 4; e++)
  {
    switch(swizzleMode[e])
    {
      case X: res[e] = in[0];
      case Y: res[e] = in[1];
      case Z: res[e] = in[2];
      case W: res[e] = in[3];
   }
  }
  return out;
}


The select function defines the selection of a component in the 4-component register.

 value select(vec4 in)
 {
   value out;
   switch(swizzleMode)
   {
     case X : out = in[0];
     case Y : out = in[1];
     case Z : out = in[2];
     case W : out = in[3];
   }
   return out;
 }

The readFloatPointVec function reads a 4-component vector source operand.

vec4 readFloatPointVec(vec4 in)
{
  vec4 out = swizzle(in);
  if (absoluteValue)
  {
     out[0] = abs(out[0]);
     out[1] = abs(out[1]);
     out[2] = abs(out[2]);
     out[3] = abs(out[3]);
  }
  if (negatevalue)
  {
     out[0] = -out[0];
     out[1] = -out[1];
     out[2] = -out[2];
     out[3] = -out[3];
  }
  return out;
}


The readFloatPointScalar function reads a scalar source operand from a 4-component vector.

value readFloatPointScalar(vec4 in)
{
  value out = select(in);
  if (absoluteValue)
     out = abs(out);
  if (negatevalue)
     out = -out;
  return out;
}


The readIntegerVec function reads a 4-component vector source operand.

vec4 readIntegerVec(vec4 in)
{
  vec4 out = swizzle(in);
  if (absoluteValue)
  {
     out[0] = abs(out[0]);
     out[1] = abs(out[1]);
     out[2] = abs(out[2]);
     out[3] = abs(out[3]);
  }
  if (negatevalue)
  {
     out[0] = -out[0];
     out[1] = -out[1];
     out[2] = -out[2];
     out[3] = -out[3];
  }
  return out;
}


The readIntegerScalar function reads a scalar source operand from a 4-component vector.

value readIntegerScalar(vec4 in)
{
  value out = select(in);
  if (absoluteValue)
     out = abs(out);
  if (negatevalue)
     out = -out;
  return out;
}


The readBoolean function reads a boolean value from the source operand.

bool readBoolean(vec4 constant)
{
  bool out = select(constant);
  if (invertValue)
    out = !out;
  return out;
}

bool readBoolean(bool predicate)
{
   bool out = predicate;
   if (invertValue)
     out = !out;
   return out;
}
bool readBoolean()
{
  bool out = immediateBoolean;
  return out;
} 

The writeFloatPointResult defines how the result of the instruction operation is written into the result register.

 writeFloatPointResult(vec4 in)
 {
   vec4 temp;
   temp = in;
   if (saturateResult)
   {
      temp[0] = max(min(in[0], 1.0f), 0.0f);
      temp[1] = max(min(in[1], 1.0f), 0.0f);
      temp[2] = max(min(in[2], 1.0f), 0.0f);
      temp[3] = max(min(in[3], 1.0f), 0.0f);
   }

   if (maskMode & WRITE_X)
     resReg[0] = temp[0]
   if (maskMode & WRITE_Y)
     resReg[1] = temp[1]
   if (maskMode & WRITE_Z)
     resReg[2] = temp[2]
   if (maskMode & WRITE_W)
     resReg[3] = temp[3]
 }

The writeIntegerResult defines how the result of the instruction operation is written into the result register.

 writeIntegerResult(vec4 in)
 {
   if (maskMode & WRITE_X)
     resReg[0] = in[0]
   if (maskMode & WRITE_Y)
     resReg[1] = in[1]
   if (maskMode & WRITE_Z)
     resReg[2] = in[2]
   if (maskMode & WRITE_W)
     resReg[3] = in[3]
 }

The writeBooleanResult defines how the result of the instruction operation is written into the result register.

 writeBooleanResult(bool in)
 {
   if (invertResult)
     resReg = !in;
   else
     resReg = in;
 }

ADD

Name ADD
Description 32-bit float point addition.
Syntax (SOA)
[(predreg)] add[_sat] regres[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] add[_sat] regres[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (AOS)
[(predreg)] add[_sat] regres[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
[(predreg)] add[_sat] regres[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (SOA)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = src1[0] + src2[0]
res[1] = src1[1] + src2[1]
res[2] = src1[2] + src2[2]
res[3] = src1[3] + src2[3]
writeFloatPointResult(res)
Pseudocode (AOS)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = src1 + src2
writeFloatPointResult(res)
Restrictions

ADDI

Name ADDI
Description 32-bit signed integer addition
Syntax (SOA)
[(predreg)] addi regres[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] addi regres[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (AOS)
[(predreg)] addi regres[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
[(predreg)] addi regres[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (SOA)
src1 = readIntegerVector(source1)
src2 = readIntegerVector(source2)
res[0] = src1[0] + src2[0]
res[1] = src1[1] + src2[1]
res[2] = src1[2] + src2[2]
res[3] = src1[3] + src2[3]
writeIntegerResult(res)
Pseudocode (AOS)
src1 = readIntegerScalar(source1)
src2 = readIntegerScalar(source2)
res = src1 + src2
writeIntegerResult(res)
Restrictions

ANDP

Name ANDP
Description Operate predicates (boolean AND)
Syntax
[(predreg)] andp [!]predregres, [!]predregop1, [!]predregop2
[(predreg)] andp [!]predregres, [!]constregop1.select, [!]predregop2
[(predreg)] andp [!]predregres, [!]predregop1, [!]constregop2.select
[(predreg)] andp [!]predregres, [!]predregop1, [true|false]
[(predreg)] andp [!]predregres, [true|false], [!]predregop2
[(predreg)] andp [!]predregres, [!]constregop1.select, [true|false]
[(predreg)] andp [!]predregres, [true|false], [!]constregop2.select
Pseudocode
src1 = readBoolean(source1)
src2 = readBoolean(source2)
res = src1 & src2
writeBooleanResult(res)
Restrictions

ARL

Name ARL
Description Load address register
Syntax
[(predreg)] arl addrregres[.mask], [-][|]regop1[.swizzle][|]
[(predreg)] arl addrregres, [-][|]imm32[|]
Pseudocode
src = readFloatPointVector(source)
res[0] = <int32> floor(src1[0])
res[1] = <int32> floor(src1[1])
res[2] = <int32> floor(src1[2])
res[3] = <int32> floor(src1[3])
writeIntegerResult(res)
Restrictions

CHS

Name CHS
Description Change To Next Fragment Sample
Syntax
chs
Pseudocode
nextFragmentSample()

CMP

Name CMP
Description Compare
Syntax (AOS)
[(predreg)] cmp[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|], [-][|]regop3[.swizzle][|]
Syntax (SOA)
[(predreg)] cmp[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|], [-][|]regop3[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
src3 = readFloatPointVector(source3)
res[0] = (src1[0] < 0.0f) ? src2[0] : src3[0];
res[1] = (src1[1] < 0.0f) ? src2[1] : src3[1];
res[2] = (src1[2] < 0.0f) ? src2[2] : src3[2];
res[3] = (src1[3] < 0.0f) ? src2[3] : src3[3];
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
src3 = readFloatPointScalar(source3)
res = (src1 < 0.0f) ? src2 : src3;
writeFloatPointResult(res)
Restrictions

CMPKIL

Name CMPKIL
Description Compare and Kill
Syntax (AOS)
[(predreg)] cmpkil[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|], [-][|]regop3[.swizzle][|]
Syntax (SOA)
[(predreg)] cmpkil[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|], [-][|]regop3[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
src3 = readFloatPointVector(source3)
res[0] = (src1[0] < 0.0f) ? src2[0] : src3[0];
res[1] = (src1[1] < 0.0f) ? src2[1] : src3[1];
res[2] = (src1[2] < 0.0f) ? src2[2] : src3[2];
res[3] = (src1[3] < 0.0f) ? src2[3] : src3[3];
writeFloatPointResult(res)
//  Takes into account write mask, ignores saturation flag
if ((res[0] < 0.0f) || (res[1] < 0.0f) || (res[2] < 0.0f) || (res[3] < 0.0f))
    killFragment()
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
src3 = readFloatPointScalar(source3)
res = (src1 < 0.0f) ? src2 : src3;
writeFloatPointResult(res)
if (res < 0.0f) //  Takes into account write mask, ignores saturation flag
    killFragment()
Restrictions

COS

Name COS
Description Cosinus
Syntax (AOS)
[(predreg)] cos[_sat] resreg[.mask], [-][|]regop1[.select][|]
Syntax (SOA)
[(predreg)] cos[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode
src1 = readFloatPointScalar(source1)
res = cosinus(src1)
writeFloatPointResult(res)
Restrictions

DDX

Name DDX
Description Derivative in X
Syntax (AOS)
[(predreg)] ddx[_sat] resreg[.mask], [-][|]regop1[.swizzle][|]
Syntax (SOA)
[(predreg)] ddx[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
//  For a 2x2 pixel block.
//   0 1 
//   2 3

//  For pixel 0 and 1
src1 = readFloatPointVectorPixel0(source1) 
src2 = readFloatPointVectorPixel1(source1) 

// For pixel 2 and 3
src1 = readFloatPointVectorPixel2(source1) 
src2 = readFloatPointVectorPixel3(source1) 

res[0] = src2[0] - src1[0]
res[1] = src2[1] - src1[1]
res[2] = src2[2] - src1[2]
res[3] = src2[3] - src1[3]
writeFloatPointResult(res)
Pseudocode (SOA)
//  For a 2x2 pixel block.
//   0 1 
//   2 3

//  For pixel 0 and 1
src1 = readFloatPointScalarPixel0(source1) 
src2 = readFloatPointScalarPixel1(source1) 

// For pixel 2 and 3
src1 = readFloatPointScalarPixel2(source1) 
src2 = readFloatPointScalarPixel3(source1) 

res = src2 - src1
writeFloatPointResult(res)
Restrictions

DDY

Name DDY
Description Derivative in Y
Syntax (AOS)
[(predreg)] ddy[_sat] resreg[.mask], [-][|]regop1[.swizzle][|]
Syntax (SOA)
[(predreg)] ddy[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
//  For a 2x2 pixel block.
//   0 1 
//   2 3

//  For pixel 0 and 1
src1 = readFloatPointVectorPixel0(source1) 
src2 = readFloatPointVectorPixel2(source1) 

// For pixel 2 and 3
src1 = readFloatPointVectorPixel1(source1) 
src2 = readFloatPointVectorPixel3(source1) 

res[0] = src2[0] - src1[0]
res[1] = src2[1] - src1[1]
res[2] = src2[2] - src1[2]
res[3] = src2[3] - src1[3]
writeFloatPointResult(res)
Pseudocode (SOA)
//  For a 2x2 pixel block.
//   0 1 
//   2 3

//  For pixel 0 and 1
src1 = readFloatPointScalarPixel0(source1) 
src2 = readFloatPointScalarPixel2(source1) 

// For pixel 2 and 3
src1 = readFloatPointScalarPixel1(source1) 
src2 = readFloatPointScalarPixel3(source1) 

res = src2 - src1
writeFloatPointResult(res)
Restrictions

DP3

Name DP3
Description Dot Product 3D
Syntax (AOS)
[(predreg)] dp3[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] dp3[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Pseudocode
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = 
res[1] = 
res[2] =
res[3] = src1[0] * src2[0] + src1[1] * src2[1] * src1[2] * src2[2]
writeFloatPointResult(res)
Restrictions

DP4

Name DP4
Description Dot Product 4D
Syntax (AOS)
[(predreg)] dp4[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] dp4[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Pseudocode
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = 
res[1] = 
res[2] =
res[3] = src1[0] * src2[0] + src1[1] * src2[1] * src1[2] * src2[2] + src1[3] * src2[3]
writeFloatPointResult(res)
Restrictions

DPH

Name DPH
Description Dot Product Homogeneous
Syntax (AOS)
[(predreg)] dph[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] dph[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Pseudocode
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = 
res[1] = 
res[2] =
res[3] = src1[0] * src2[0] + src1[1] * src2[1] * src1[2] * src2[2] + src2[3]
writeFloatPointResult(res)
Restrictions

DST

Name DST
Description Distance Vector
Syntax (AOS)
[(predreg)] dst[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] dst[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Pseudocode
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = 1.0f
res[1] = src1[1] * src2[1];
res[2] = src1[2]
res[3] = src1[3]
writeFloatPointResult(res)
Restrictions

END

Name END
Description End Element/Thread
Syntax
end
Pseudocode
endElement()
Restrictions

EX2

Name EX2
Description Exponential (2 to the power X)
Syntax (AOS)
[(predreg)] ex2[_sat] resreg[.mask], [-][|]regop1[.select][|]
Syntax (SOA)
[(predreg)] ex2[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointScalar(source1)
res[0] = 
res[1] = 
res[2] = 
res[3] = powerOfTwo(src1)
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
res = powerOfTwo(src1)
writeFloatPointResult(res)
Restrictions

EXP

Name EXP
Description Exponential (2 to the power X)
Syntax (AOS)
[(predreg)] exp[_sat] resreg[.mask], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointScalar(source1)
res[0] = powerOfTwo(floor(src1))
res[1] = src - floor(src1)
res[2] = powerOfTwo(src1)
res[3] = 1
writeFloatPointResult(res)
Restrictions

FLR

Name FLR
Description Floor
Syntax
Pseudocode
Restrictions NOT IMPLEMENTED!!!

FRC

Name FRC
Description Fraction
Syntax (AOS)
[(predreg)] frc[_sat] resreg[.mask], [-][|]regop1[.swizzle][|]
Syntax (SOA)
[(predreg)] frc[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
res[0] = src1[0] - floor(src1[0])
res[1] = src1[1] - floor(src1[1])
res[2] = src1[2] - floor(src1[2])
res[3] = src1[3] - floor(src1[3])
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
res = src1 - floor(src1)
writeFloatPointResult(res)
Restrictions

FXMAD

Name FXMAD
Description Fixed Point Multiply and Add From Accumulator
Syntax (AOS)
[(predreg)] fxmad[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] fxmad[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
[(predreg)] fxmad[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
[(predreg)] fxmad[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)

 //  Convert to 16.x precision (parametrizable)
fxpsrc1 = FP32ToFXP(src1)
fxpscr2 = FP32ToFXP(src2)

// Fixed point multiplication and addition with 16*2.x*2 precision
fxpres[0] = fxpsrc1[0] * fxpsrc2[0] * fxpaccum[0]
fxpres[1] = fxpsrc1[1] * fxpsrc2[1] * fxpaccum[1]
fxpres[2] = fxpsrc1[2] * fxpsrc2[2] * fxpaccum[2]
fxpres[3] = fxpsrc1[3] * fxpsrc2[3] * fxpaccum[3]

res = FXPToFP32(fxpres)
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)

//  Convert to 16.x precision (parametrizable)
fxpsrc1 = FP32ToFXP(src1)
fxpscr2 = FP32ToFXP(src2)

// Fixed point multiplication and addition with 16*2.x*2 precision
fxpres = fxpsrc1 * fxpsrc2 * fxpaccum

res = FXPToFP32(fxpres)
writeFloatPointResult(res)
Restrictions

FXMAD2

Name FXMAD2
Description Fixed Point Multiply and Add To Accumulator
Syntax (AOS)
[(predreg)] fxmad2 resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|], [-][|]regop3[.swizzle][|]
Syntax (SOA)
[(predreg)] fxmad2 resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|], [-][|]regop3[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
src3 = readFloatPointVector(source3)

 //  Convert to 16.x precision (parametrizable)
fxpsrc1 = FP32ToFXP(src1)
fxpscr2 = FP32ToFXP(src2)
fxpscr3 = FP32ToFXP(src2)

// Fixed point multiplication and addition with 16*2.x*2 precision
fxpres[0] = fxpsrc1[0] * fxpsrc2[0] * fxpsrc3[0]
fxpres[1] = fxpsrc1[1] * fxpsrc2[1] * fxpsrc3[1]
fxpres[2] = fxpsrc1[2] * fxpsrc2[2] * fxpsrc3[2]
fxpres[3] = fxpsrc1[3] * fxpsrc2[3] * fxpsrc3[3]

// Write the result into the fixed point accumulator
writeFixedPointResult(fxpres)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
src2 = readFloatPointScalar(source3)

//  Convert to 16.x precision (parametrizable)
fxpsrc1 = FP32ToFXP(src1)
fxpscr2 = FP32ToFXP(src2)
fxpscr3 = FP32ToFXP(src2)

// Fixed point multiplication and addition with 16*2.x*2 precision
fxpres = fxpsrc1 * fxpsrc2 * fxpsrc3

// Write the result into the fixed point accumulator
writeFixedPointResult(fxpres)
Restrictions
The fixed point accumulator is the implicit result register. Only the write mask is used from the result operand.

FXMUL

Name FXMUL
Description Fixed Point Multiplication To Accumulator
Syntax (AOS)
[(predreg)] fxmul resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
[(predreg)] fxmul resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
[(predreg)] fxmul resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
[(predreg)] fxmul resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)

//  Convert to 16.x precision (parametrizable)
fxpsrc1 = FP32ToFXP(src1)
fxpscr2 = FP32ToFXP(src2)

// Fixed point multiplication with 16*2.x*2 precision
fxpres[0] = fxpsrc1[0] * fxpsrc2[0]
fxpres[1] = fxpsrc1[1] * fxpsrc2[1]
fxpres[2] = fxpsrc1[2] * fxpsrc2[2]
fxpres[3] = fxpsrc1[3] * fxpsrc2[3]

// Write the result into the fixed point accumulator
writeFixedPointResult(fxpres)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)

//  Convert to 16.x precision (parametrizable)
fxpsrc1 = FP32ToFXP(src1)
fxpscr2 = FP32ToFXP(src2)
fxpscr3 = FP32ToFXP(src2)

// Fixed point multiplication with 16*2.x*2 precision
fxpres = fxpsrc1 * fxpsrc2

// Write the result into the fixed point accumulator
writeFixedPointResult(fxpres)
Restrictions
The fixed point accumulator is the implicit result register. Only the write mask is used from the result operand.

JMP

Name JMP
Description Jump
Syntax
jump [!]predregop1, imm32
jump [!]constregop1, imm32
jump [true][false], imm32
Pseudocode
src1 = readBoolean(source1)
src2 = readIntegerScalar(source2)
if (src)
    jumpToTarget(PC + src2)
Restrictions

KLS

Name KLS
Description Kill Fragment Sample
Syntax
kls [-][|]regop1[.swizzle][|], sample
Pseudocode
src1 = readFloatPointVector(source1)
if ((src1[0] < 0.0) || (src1[1] < 0.0) || (src1[2] < 0.0) || (src1[3] < 0.0))
  killFragmentSample(sample)
Restrictions

KIL

Name KIL
Description Kill Fragment
Syntax
kil [-][|]regop1[.swizzle][|]
Pseudocode
src1 = readFloatPointVector(source1)
if ((src1[0] < 0.0) || (src1[1] < 0.0) || (src1[2] < 0.0) || (src1[3] < 0.0))
  killFragment()
Restrictions

LDA

Name LDA
Description Load Attribute
Syntax
lda[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], attribute
Pseudocode
src1 = readFloatPointVector(source1)
res = loadAttribute(src1, attribute)
writeFloatPointResult(res)
Restrictions

LG2

Name LG2
Description Logarithm of two
Syntax (AOS)
lg2[_sat] resreg[.mask], [-][|]regop1[.select][|]
Syntax (SOA)
lg2[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointScalar(source1)
res[0] = 
res[1] = 
res[2] = 
res[3] = logarithmOfTwo(src1)
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
res = logarithmOfTwo(src1)
writeFloatPointResult(res)
Restrictions

LIT

Name LIT
Description Light Coefficients
Syntax (AOS)
lit[_sat] resreg[.mask], [-][|]regop1[.swizzle][|]
Pseudocode (AOS)
src = readFloatPointVector(source1)

x = (src[0] < 0.0f) ? 0.0f: src[0]
y = (src[1] < 0.0f) ? 0.0f: src[1]
w = clamp(src[3], -128.0f, 128.0f)

res[0] = 1.0f
res[1] = x
res[2] = (x > 0.0f) ? power(y, w)) : 0.0f
res[3] = 1.0f

writeFloatPointResult(res)
Restrictions

LOG

Name LOG
Description Logarithm of two
Syntax (AOS)
log[_sat] resreg[.mask], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointScalar(source1)
res[0] = logarithmOfTwo(floor(abs(src1)))
res[1] = src1 / logarithmOfTwo(floor(src1))
res[2] = logarithmOfTwo(src1[2])
res[3] = 1
writeFloatPointResult(res)
Restrictions

MAD

Name MAD
Description Multiply and Add
Syntax (AOS)
mad[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|], [-][|]regop3[.swizzle][|]
Syntax (SOA)
mad[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|], [-][|]regop3[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
src3 = readFloatPointVector(source3)
res[0] = src1[0] * src2[0] + src3[0]
res[1] = src1[1] * src2[1] + src3[1]
res[2] = src1[2] * src2[2] + src3[2]
res[3] = src1[3] * src2[3] + src3[3]
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
src3 = readFloatPointScalar(source3)
res = src1 * src2 + src3
writeFloatPointResult(res)
Restrictions

MAX

Name MAX
Description Maximum
Syntax (AOS)
max[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
max[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
max[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
max[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = (src1[0] > src2[0]) ? src1[0] : src2[0]
res[1] = (src1[1] > src2[1]) ? src1[1] : src2[1]
res[2] = (src1[2] > src2[2]) ? src1[2] : src2[2]
res[3] = (src1[3] > src2[3]) ? src1[3] : src2[3]
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = (src1 > src2) ? src1 : src2
writeFloatPointResult(res)
Restrictions

MIN

Name MIN
Description Minimum
Syntax (AOS)
min[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
min[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
min[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
min[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = (src1[0] < src2[0]) ? src1[0] : src2[0]
res[1] = (src1[1] < src2[1]) ? src1[1] : src2[1]
res[2] = (src1[2] < src2[2]) ? src1[2] : src2[2]
res[3] = (src1[3] < src2[3]) ? src1[3] : src2[3]
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = (src1 < src2) ? src1 : src2
writeFloatPointResult(res)
Restrictions

MOV

Name MOV
Description Move
Syntax (AOS)
mov[_sat] resreg[.mask], [-][|]regop1[.swizzle][|]
Syntax (SOA)
mov[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
res[0] = src1[0]
res[1] = src1[1]
res[2] = src1[2]
res[3] = src1[3]
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
res = src1
writeFloatPointResult(res)
Restrictions

MUL

Name MUL
Description Float Point Multiplication
Syntax (AOS)
mul[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
mul[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
mul[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
mul[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source1)
res[0] = src1[0] * src2[0]
res[1] = src1[1] * src2[1]
res[2] = src1[2] * src2[2]
res[3] = src1[3] * src2[3]
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source1)
res = src1 * src2
writeFloatPointResult(res)
Restrictions

MULI

Name MULI
Description Integer Multiplication
Syntax (AOS)
muli resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
muli resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
muli resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
muli resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readIntegerVector(source1)
src2 = readIntegerVector(source1)
res[0] = src1[0] * src2[0]
res[1] = src1[1] * src2[1]
res[2] = src1[2] * src2[2]
res[3] = src1[3] * src2[3]
writeIntegerResult(res)
Pseudocode (SOA)
src1 = readIntegerScalar(source1)
src2 = readIntegerScalar(source1)
res = src1 * src2
writeIntegerResult(res)
Restrictions

NOP

Name NOP
Description No Operation
Syntax
nop
Pseudocode
Restrictions

RCP

Name RCP
Description Reciprocate
Syntax (AOS)
rcp[_sat] resreg[.mask], [-][|]regop1[.select][|]
Syntax (SOA)
rcp[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
res[0] = 
res[1] = 
res[2] = 
res[3] = 1.0f / src1
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
res = 1.0f / src1
writeFloatPointResult(res)
Restrictions

RSQ

Name RSQ
Description Reciprocate Square Root
Syntax (AOS)
rsq[_sat] resreg[.mask], [-][|]regop1[.select][|]
Syntax (SOA)
rsq[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
res[0] = 
res[1] = 
res[2] = 
res[3] = squareRoot(1.0f / abs(src1))
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
res = squareRoot(1.0f / abs(src1))
writeFloatPointResult(res)
Restrictions

SETPEQ

Name SETPEQ
Description Set Predicate If Equal Than Float Point
Syntax
setpeq [!]predresreg, [-][|]regop1[.select][|], [-][|]regop2[.select][|]
setpeq [!]predresreg, [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = (src1 == src2)
writeBooleanResult(res)
Restrictions

SETPGT

Name SETPGT
Description Set Predicate If Greater Than Float Point
Syntax
setpgt [!]predresreg, [-][|]regop1[.select][|], [-][|]regop2[.select][|]
setpgt [!]predresreg, [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = (src1 > src2)
writeBooleanResult(res)
Restrictions

SETPLT

Name SETPLT
Description Set Predicate If Less Than Float Point
Syntax
setplt [!]predresreg, [-][|]regop1[.select][|], [-][|]regop2[.select][|]
setplt [!]predresreg, [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = (src1 < src2)
writeBooleanResult(res)
Restrictions

SGE

Name SGE
Description Set To 1 If Greater or Equal Than
Syntax (AOS)
sge[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
sge[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
sge[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
sge[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = (src1[0] < src2[0]) ? 0.0f : 1.0f
res[1] = (src1[1] < src2[1]) ? 0.0f : 1.0f
res[2] = (src1[2] < src2[2]) ? 0.0f : 1.0f
res[3] = (src1[3] < src2[3]) ? 0.0f : 1.0f
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = (src1 < src2) ? 0.0f : 1.0f
writeFloatPointResult(res)
Restrictions

SIN

Name SIN
Description Sinus
Syntax (AOS)
sin[_sat] resreg[.mask], [-][|]regop1[.select][|]
Syntax (SOA)
sin[_sat] resreg[.select], [-][|]regop1[.select][|]
Pseudocode (AOS)
src1 = readFloatPointScalar(source1)
res[0] = 
res[1] = 
res[2] = 
res[3] = sinus(src1)
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
res = sinus(src1)
writeFloatPointResult(res)
Restrictions


SLT

Name SGE
Description Set To 1 If Little Than
Syntax (AOS)
slt[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]regop2[.swizzle][|]
slt[_sat] resreg[.mask], [-][|]regop1[.swizzle][|], [-][|]imm32[|]
Syntax (SOA)
slt[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]regop2[.select][|]
slt[_sat] resreg[.select], [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode (AOS)
src1 = readFloatPointVector(source1)
src2 = readFloatPointVector(source2)
res[0] = (src1[0] < src2[0]) ? 1.0f : 0.0f
res[1] = (src1[1] < src2[1]) ? 1.0f : 0.0f
res[2] = (src1[2] < src2[2]) ? 1.0f : 0.0f
res[3] = (src1[3] < src2[3]) ? 1.0f : 0.0f
writeFloatPointResult(res)
Pseudocode (SOA)
src1 = readFloatPointScalar(source1)
src2 = readFloatPointScalar(source2)
res = (src1 < src2) ? 1.0f : 0.0f
writeFloatPointResult(res)
Restrictions


STPEQI

Name STPEQI
Description Set Predicate If Equal Than Integer
Syntax
setpeqi [!]predresreg, [-][|]regop1[.select][|], [-][|]regop2[.select][|]
setpeqi [!]predresreg, [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode
src1 = readIntegerScalar(source1)
src2 = readIntegerScalar(source2)
res = (src1 == src2)
writeBooleanResult(res)
Restrictions

STPGTI

Name SETPGTI
Description Set Predicate If Greater Than Integer
Syntax
setpgti [!]predresreg, [-][|]regop1[.select][|], [-][|]regop2[.select][|]
setpgti [!]predresreg, [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode
src1 = readIntegerScalar(source1)
src2 = readIntegerScalar(source2)
res = (src1 > src2)
writeBooleanResult(res)
Restrictions

STPLTI

Name SETPEQI
Description Set Predicate If Little Than Integer
Syntax
setplti [!]predresreg, [-][|]regop1[.select][|], [-][|]regop2[.select][|]
setplti [!]predresreg, [-][|]regop1[.select][|], [-][|]imm32[|]
Pseudocode
src1 = readIntegerScalar(source1)
src2 = readIntegerScalar(source2)
res = (src1 < src2)
writeBooleanResult(res)
Restrictions

TEX

Name TEX
Description Sample Texture
Syntax
tex[_sat] resreg[.mask], [-][|]regop1[.select][|], texture
Pseudocode
src1 = readFloatPointVector(source1)
res = sampleTexture(src1, texture)
writeBooleanResult(res)
Restrictions

TXB

Name TXB
Description Sample Texture With LOD Bias
Syntax
txb[_sat] resreg[.mask], [-][|]regop1[.select][|], texture
Pseudocode
src1 = readFloatPointVector(source1)
res = sampleTextureWithLODBias(src1, texture)
writeBooleanResult(res)
Restrictions

TXL

Name TXL
Description Sample Texture With LOD
Syntax
txl[_sat] resreg[.mask], [-][|]regop1[.select][|], texture
Pseudocode
src1 = readFloatPointVector(source1)
res = sampleTextureWithLOD(src1, texture)
writeBooleanResult(res)
Restrictions

ZXP

Name ZXP
Description Export Fragment Z
Syntax
zxp [-][|]regop1[.swizzle][|]
Pseudocode
src1 = readFloatPointVector(source1)
exportFragmentZ(src1[0])
Restrictions

ZXS

Name ZXS
Description Export Z For 4 Fragment Samples
Syntax
zxs [-][|]regop1[.swizzle][|]
Pseudocode
src1 = readFloatPointVector(source1)
exportFragmentZ(currentSample + 0, src1[0])
exportFragmentZ(currentSample + 1, src1[1])
exportFragmentZ(currentSample + 2, src1[2])
exportFragmentZ(currentSample + 3, src1[2])
Restrictions
ATTILA
Toolbox