File: SAMPLE_UNORM.md

package info (click to toggle)
intel-graphics-compiler 1.0.17791.18-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 102,312 kB
  • sloc: cpp: 935,343; lisp: 286,143; ansic: 16,196; python: 3,279; yacc: 2,487; lex: 1,642; pascal: 300; sh: 174; makefile: 27
file content (92 lines) | stat: -rw-r--r-- 2,324 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!---======================= begin_copyright_notice ============================

Copyright (C) 2020-2022 Intel Corporation

SPDX-License-Identifier: MIT

============================= end_copyright_notice ==========================-->

## Opcode

  SAMPLE_UNORM = 0x41

## Format

| | | | | | | |
| --- | --- | --- | --- | --- | --- | --- |
| 0x41(SAMPLE_UNORM) | Channel_mask | Sampler | Surface | U_offset | V_offset | DeltaU |
|                    | DeltaV       | Dst     |         |          |          |        |


## Semantics


```

                    Sample a UNORM surface
```

## Description





```
    Samples an UNORM <surface> using the indicated sampler state.
```


- **Channel_mask(ub):**

  - Bit[3..0]: determines the write masks for the RGBA channel, with R being bit 0 and A bit 3. At least one channel must be enabled (i.e., "0000" is not allowed).

  - Bit[5..4]: is Output format control.

    - 0b00:  "16-bit full". Two bytes will be returned for each pixel
    - 0b01:  "16-bit chrominance downsampled". Like the previous one, except only even pixels are returned for R and B channels
    - 0b10:  "8-bit full". One byte is returned for each pixel
    - 0b11:  "8-bit chrominance downsampled". Like the previous one, except only even pixels are returned for R and B channels

- **Sampler(ub):** Index of the sampler variable


- **Surface(ub):** Index of the surface variable


- **U_offset(scalar):** the normalized x coordinate of pixel 0. Must have type F


- **V_offset(scalar):** the normalized y coordinate of pixel 0. Must have type F


- **DeltaU(scalar):** the difference in coordinates for adjacent pixels in the X direction. Must have type F


- **DeltaV(scalar):** the difference in coordinates for adjacent pixels in the Y direction. Must have type F


- **Dst(raw_operand):** The raw operand of a general variable storing the result of the sample. The variable must have 32 * num_enabled_channels elements, with the disabled channels skipped in the results. Must have type UW


#### Properties
- **SIMD Control Flow:** channel enable is ignored




## Text
```



    SAMPLE_UNORM.<channel>.<output_format> <sampler> <surface> <u_offset> <v_offset> <deltaU> <deltaV> <dst>

    //<output_format> is one of "16-full", "16-downsampled", "8-full", "8-downsampled"
```
## Notes