Changes between Version 7 and Version 8 of GcnInstrsMimg


Ignore:
Timestamp:
01/15/16 01:00:16 (8 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GcnInstrsMimg

    v7 v8  
    10731073<p>Opcode: 16 (0x10) for GCN 1.0/1.1; 17 (0x11) for GCN 1.2<br />
    10741074Syntax: IMAGE_ATOMIC_CMPSWAP VDATA(1:4), VADDR(1:4), SRSRC(4,8)<br />
    1075 Description: First half of VDATA into image SRSRC to pixel at address VADDR if
    1076 second halof of VDATA is equal old value from image's pixel, otherwise keep
     1075Description: Store first half of VDATA into image SRSRC to pixel at address VADDR if
     1076second half of VDATA is equal old value from image's pixel, otherwise keep
    10771077old value from that pixel. Data type determined by image data format and half number of
    10781078enabled bits in DMASK. Four dword data types are not supported.
     
    11041104                 ((UINT64*)VM)[i]-1 : VDATA[i]
    11051105VDATA = (GLC) ? P : VDATA // atomic</code></p>
     1106<h4>IMAGE_ATOMIC_FCMPSWAP</h4>
     1107<p>Opcode: 29 (0x1d) for GCN 1.0/1.1<br />
     1108Syntax: IMAGE_ATOMIC_FCMPSWAP VDATA(1:4), VADDR(1:4), SRSRC(4,8)<br />
     1109Description: Store first single/double floating point value of VDATA into image
     1110SRSRC to pixel at address VADDR if second single/double FP of VDATA is equal old value
     1111from image's pixel, otherwise keep old value from that pixel.
     1112Data type determined by image data format and half number of
     1113enabled bits in DMASK. Four dword data types are not supported.
     1114If GLC is set then return old values from image, otherwise keep VDATA value.
     1115Operation is atomic.<br />
     1116Operation:<br />
     1117<code>PIXELTYPE* VM = VMIMG(SRSRC, VADDR)
     1118if (sizeof(PIXELTYPE)==8)
     1119{
     1120    DOUBLE P = *VM;
     1121    *VM = *VM==ASDOUBLE(VDATA[1]) ? VDATA[0] : *VM // part of atomic
     1122    VDATA[0] = (GLC) ? P : VDATA[0] // last part of atomic
     1123}
     1124else
     1125{
     1126    FLOAT P = *VM;
     1127    *VM = *VM==ASFLOAT(VDATA[1]) ? VDATA[0] : *VM // part of atomic
     1128    VDATA[0] = (GLC) ? P : VDATA[0] // last part of atomic
     1129}</code></p>
    11061130<h4>IMAGE_ATOMIC_INC</h4>
    11071131<p>Opcode: 27 (0x1b)<br />