TXA : Texture Virtual AA

Format

SPA 5.0:
        {@{!}Pg}   TXA{.NDV}{.NODEP}{.phase}   Rd, Ra, #tsPtrIdxU13 {, #wmskU04}    {&req_6}   {&rdN}   {&wrN}   {?sched}   ;   
        {@{!}Pg}   TXA{.NDV}{.NODEP}{.phase}   Rd, Ra, #tidU08, #smpU05, #wmskU04   {&req_6}   {&rdN}   {&wrN}   {?sched}   ;   

  .NDV:    Forces the TEX to be considered non-divergent even though quad may be divergent.  
                   This will not promote inactive threads, only force it to be treated as non-divergent despite the fact
           that some threads might be inactive.  To activate disabled threads in a quad SAM must be used.
	   Only the active mask and shader type are used to determine if a quad of threads is divergent.

  .NODEP:  Indicates that there is no subsequent quad derivatives to be calculated.
	   Threads that have been "killed" will be disabled to stop unnecessary texture fetches.

  .phase:  Allows control on the current warps texture hash, used for scheduling.
               < NONE >
               .T - postfix increment of the 3 bit texture component of the hash.
	       .P - postfix increment of the 5 bit phase component, and zero out the 3 bit texture component of the hash. 



Immediate Inputs:

  #tsPtrIdxU13:
     This immediate index is used to fetch the packed header+sampler pointer entry from constant
     cache.  The bank from which it is fetched is determined by bundle state.The constant bank
     entry is 32 bit structure of the form "samplerPtr[31:20] | headerPtr[19:0]".
     In SetSamplerBinding.ViaHeaderBinding (i.e. OGL) mode, the headerPtr would be used as the
     samplerPtr as well. 
     Any header pointer greater than one specified in SetTexHeaderPoolC.MaximumIndex will be regarded
     as an "invalid" texture (i.e. equivalent to BIND_GROUP_TEXTURE_HEADER_VALID_FALSE in fermi).
     Any sampler pointer greater than one specified in SetSamplerHeaderPoolC.MaximumIndex will be
     regarded as an "invalid" texture (i.e. equivalent to BIND_GROUP_TEXTURE_HEADER_VALID_FALSE in
     fermi).

  #tidU08, #smpU05:
     This is the "almost" Fermi-compatible specification of tsPtrIdxU13 which allows running of
     legacy apps/traces where sass will transform these into tsPtrIdxU13 as follows:
     #tsPtrIdxU13 = {#smpU05, #tidU08}

  #wmskU04       destination write mask (decimated contiguous writes)
     Allows for write masking the returning data writes via a bit enable
     for each of R,G,B,A. A four-vector is always returned from TEX.
     #wmskU04 defaults to 0xf.

  Ra cannot be RZ.

  TXA implies a 2D normalized texture lookup.

Description

Resolve the VCAA surface by applying a set of weights to the texture filter. The weights are retrieved via a normal TEX op.

The first texture fetch (TEX) returns the weights, packed as 8 weights of 4 bits each into a u32 value. This value is returned as the first scalar. The second texture fetch (TXA) supplies the (x,y) position and weights and returns the final filtered RGBA values.

The parameters are as follows:

    Texture parameter packing in Ra
    Regparameterformat
    Ra+0sfp32
    Ra+1tfp32
    Ra+2r (weights)fp32

Registers Ra, and Rd have alignment restrictions based on amount of data. Specifically,

  1. Rd should be aligned to number of valid components being returned (as specified by wmask)
  2. Ra should always be aligned to 4 (vec4 register)
  3. Ra cannot be RZ

Examples:

# exmple of using TXA
   IPA R4,f[x];           // x coord (no perspective correction needed)
   IPA R5,f[y];           // y coord (no perspective correction needed)
   TEX R6,R4,5,2D,0x1;    // texture fetch, returns weights packed into 32 bits
   TXA R0,R4,8,0xf;       // texture fetch that resolves VCAA, returns RGBA
END

Back to Index of Instructions