1<!---======================= begin_copyright_notice ============================
2
3Copyright (C) 2020-2021 Intel Corporation
4
5SPDX-License-Identifier: MIT
6
7============================= end_copyright_notice ==========================-->
8
9
10
11## Opcode
12
13  INFO = 0x70
14
15## Format
16
17| | | | | |
18| --- | --- | --- | --- | --- |
19| 0x70(INFO) | Op | Exec_size | Surface | LOD | Dst |
20
21
22## Semantics
23
24
25
26
27    Returns information about the surface
28
29## Description
30
31
32
33    <exec_size>*4 elements are returned in RGBA order with the format described below. Only the enabled pixels are written to in <dst>.
34
35    **Return format for resinfo:**
36
37        +----------------+------------------------------------+--------------------------------------+------------------+------------+
38        | Surface type   | R                                  | G                                    | B                | A          |
39        +----------------+------------------------------------+--------------------------------------+------------------+------------+
40        | 1D             | (Width+1)>>LOD                     | 0                                    | 0                | MIPCount   |
41        +----------------+------------------------------------+--------------------------------------+------------------+------------+
42        | 1D_array       | (Width+1)>>LOD                     | Depth+1                              | 0                | MIPCount   |
43        +----------------+------------------------------------+--------------------------------------+------------------+------------+
44        | 2D             | ((Width+1)>>LOD)*(QuiltWidth+1)    | ((Height+1)>>LOD)*(QuiltHeight+1)    | 0                | MIPCount   |
45        +----------------+------------------------------------+--------------------------------------+------------------+------------+
46        | 2D_array       | ((Width+1)>>LOD)*(QuiltWidth+1)    | ((Height+1)>>LOD)*(QuiltHeight+1)    | Depth+1          | MIPCount   |
47        +----------------+------------------------------------+--------------------------------------+------------------+------------+
48        | 3D             | (Width+1)>>LOD                     | (Height+1)>>LOD                      | (Depth+1)>>LOD   | MIPCount   |
49        +----------------+------------------------------------+--------------------------------------+------------------+------------+
50        | CUBE           | Buffer size                        | (Height+1)>>LOD                      | Depth+1          | MIPCount   |
51        +----------------+------------------------------------+--------------------------------------+------------------+------------+
52
53    Return format for sampleinfo:
54
55        +----------------+---------------------+-------+-------+---------------------------------+
56        | Surface type   | R                   | G     | B     | A                               |
57        +----------------+---------------------+-------+-------+---------------------------------+
58        | 2D             | Number of samples   | N/A   | N/A   | Sample position palette index   |
59        +----------------+---------------------+-------+-------+---------------------------------+
60
61- **Op(ub):**
62
63  - Bit[4..0]: encodes the sampler operation
64
65    - 0b01010:  resinfo
66    - 0b01011:  sampleinfo
67- **Exec_size(ub):** Execution size
68
69  - Bit[2..0]: size of the region for source and destination operands
70
71    - 0b011:  8 elements
72    - 0b100:  16 elements
73  - Bit[7..4]: execution mask (explicit control over the enabled channels)
74
75    - 0b0000:  M1
76    - 0b0001:  M2
77    - 0b0010:  M3
78    - 0b0011:  M4
79    - 0b0100:  M5
80    - 0b0101:  M6
81    - 0b0110:  M7
82    - 0b0111:  M8
83    - 0b1000:  M1_NM
84    - 0b1001:  M2_NM
85    - 0b1010:  M3_NM
86    - 0b1011:  M4_NM
87    - 0b1100:  M5_NM
88    - 0b1101:  M6_NM
89    - 0b1110:  M7_NM
90    - 0b1111:  M8_NM
91- **Surface(ub):** Index of the surface variable
92
93- **LOD(raw_operand):** The LOD parameter. The field is present only for resinfo. Must have type UD
94
95- **Dst(raw_operand):** results of the sampler operation. Must have type UD
96
97#### Properties
98
99
100## Text
101```
102
103
104
105
106RESINFO (exec_size) <surface> <lod> <dst>
107
108SAMPLEINFO (exec_size) <surface> <dst>
109```
110
111
112
113## Notes
114
115
116