Backend Instructions#

Name

Format

Backend Phase

Description

UVSW

UVSW dest, source

UVSW.writeOp (W0|W1), (S0|S1|S2|S3|S4|S5|_|0…255)

UVS data write.

See below this table for code examples.

TESSW

TESSW dest, source

TESSW.tessOp (W0|W1), immediateAddress

Tessellator data write.

ATST

ATST dest, sourceRef, sourceData, sourceStateWord

ATST{.IFB} (P0|_), S0, S1, S2

Alpha Test

DEPTHF

DEPTHF dest

DEPTHF W0

Depth Feedback

FITR

FITR dest, sourceDRC, sourceCoeffPtr, sourceCount

FITR.mode{.SAT} S3, (DRC0|DRC1), S0, (1…maxItrCount)

Iterate value(s).

See below this table for code examples.

FITRP

FITRP dest, sourceDRC, sourceCoeffPtr, sourceWCoeffPtr, sourceCount

FITRP.mode{.SAT} S3, (DRC0|DRC1), S0, S2, (1…maxItrCount)

All values should be multiplied by 1/W

IDF

IDF sourceDRC, sourceSelect

IDF{.DIRECT} (DRC0|DRC1), (S0|S1|S2|S3|S4|S5)

Issue data fence through memory subsystem.

The fence is issued for the first valid instance in a task, in the following order: {16, …, 31, 0, …, 15}.

LD

LD dest, sourceDRC, sourceBurstLen, sourceAddress

LD{.DIRECT} S3, (DRC0|DRC1), (S0|S1|S2|S3|S4|S5|1…16), (S0|S1|S2|S3|S4|S5)

Loads data from memory into supplied destination

ST

ST sourceData, sourceDataSize, sourceDRC, sourceBurstLen, sourceAddress, sourceCoverageMask

ST{.TILED} {.DIRECT} (S0|S1|S2|S3|S4|S5), (0…2), (DRC0|DRC1), (S0|S1|S2|S3|S4|S5|1…16), (S0|S1|S2|S3|S4|S5), (S0|S1|S2|S3|S4|S5|_)

Stores data from supplied source to memory.

ST.TEXELMODE

ST.TEXELMODE sourceData, source, sourceDRC

ST.TEXELMODE S2, W1, (DRC0|DRC1)

Stores data to memory, texel mode

SMP (SMP1D SMP2D SMP3D)

SMP1D sourceDRC, sourceTextureState, sourceData, sourceSamplerState, sourceSharedLOD, sourceDestPtr, chan

SMP1D{.PROJ}{.FCNORM}{.NNCOORDS}{.LODM}{.PPLOD}{.TAO}{.SOO}{.SNO}{.WRT}{.SBMode}{.ARRAY}{.INTEGER}{.COMPARISON}{.SCHEDSWAP}{.DIRECT} (DRC0|DRC1), S0, S1, S2, (S3|_), S4, chan

Sample Texture.

One, two or three dimensions.

See below this table for code examples.

ATOM

ATOM.opCode sourceDestSelect, sourceDRC, sourceSelect

ATOM.opCode {.DIRECT} (S0|S1|S2|S3|S4|S5), (DRC0|DRC1), (S0|S1|S2|S3|S4|S5)

Loads data from memory which is operated on with supplied data and operation type is written back to memory and supplied destination

UVSW code example:

void main()
{
  gl_Position = inVertex;
}
0 : mov ft0, vi3
    mov ft0.e0.e1.e2.e3,
    ft0
    uvsw.write ft0, 3;

FITR code example:

in vec2 textureCoordinate;
out vec4 fragColor;

void main()
{
  fragColor = vec4(textureCoordinate,  0.0, 1.0);
}
0 : fitr.pixel r0,
    drc0, cf4,
    cf0, 2;

SMP code example:

in vec2 textureCoordinate;
out vec4 fragColor;

void main()
{
    fragColor =  texelFetch(sampler,ivec2(gl_FragCoord.xy), 0);
}
3    : smp2d.fcnorm.replace.integer drc0, sh4, r1, sh0, sh11, r0, 4;