ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

vISA SCATTER

T1 intel-gpu simd insn
Intel GPU vISA Instruction: SCATTER
SourceIntel Graphics Compiler Official Virtual ISA (vISA) Specification (intel_gpu_visa)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeIntel Gen8–Xe2 vISA
Intel Gen9–Gen12 / Xe-LP / Xe-HPG / Xe-HPC / Xe2
License & VersionMIT
master
Upstreamhttps://github.com/intel/intel-graphics-compiler/tree/master/documentation/visa
Privilegeuser

Summary

Performs scattered write into <surface>, using the values from <src>.

Syntax / Encoding

SCATTER.<elt_size> <surface> <global_offset> <element_offset> <src>

Binary Encodings (1)

WidthFormatBit PatternMask / Match
Intel-vISA /

Operands

NameDescription
SurfaceIndex of the surface variable. It must be a buffer. Valid values are:
Global_offsetThe global offset of all the elements in element size. Must have type UD
Element_offsetThe raw operand of a general variable storing the offset values. The first Num_elts elements will be used as the offsets into the surface, and they are in the unit of element size. Must have type UD
SrcThe variable providing the values to be written. The first num_elts elements will be used. The operand must have one of UD, D, F type; for 1 and 2 byte accesses the upper bits will be ignored

Reference Notes

## Opcode

  SCATTER = 0x3a

## Format

| | | | | | |
| --- | --- | --- | --- | --- | --- |
| 0x3a(SCATTER) | Elt_size | Num_elts | Surface | Global_offset | Element_offset | Src |


## Semantics




      for (i = 0; i < exec_size; ++i) {
        if (ChEn[i]) {
          surface[global_offset+element_offset[i]] = src[i]; //1, 2, or 4 byte
        }
      }

## Description


    Performs scattered write into <surface>, using the values from <src>.

- **Elt_size(ub):**

  - Bit[1..0]: encodes the byte size of each element

    - 0b00:  1 byte
    - 0b01:  2 bytes
    - 0b10:  4 bytes
- **Num_elts(ub):**

  - Bit[1..0]: encodes the number of elements that will be written

    - 0b00:  8 elements
    - 0b01:  16 elements
    - 0b10:  1 element
  - Bit[7..4]: encodes the execution mask as described in Table 4.

- **Surface(ub):** Index of the surface variable.  It must be a buffer. Valid values are:

  - 0: T0 - Shared Local Memory (SLM) access
  - 5: T255 - Stateless surface access
- **Global_offset(scalar):** The global offset of all the elements in element size. Must have type UD

- **Element_offset(raw_operand):** The raw operand of a general variable storing the offset values. The first Num_elts elements will be used as the offsets into the surface, and they are in the unit of element size. Must have type UD

- **Src(raw_operand):** The variable providing the values to be written. The first num_elts elements will be used. The operand must have one of UD, D, F type; for 1 and 2 byte accesses the upper bits will be ignored

#### Properties
- **Out-of-bound Access:** On write: data is dropped.


## Text
```


        SCATTER.<elt_size> <surface> <global_offset> <element_offset> <src>
```



## Notes



    The behavior is undefined if more than one channel writes to the same address.