Name Strings
SPV_QCOM_image_processing3
Contact
To report problems with this extension, please open a new issue at:
Contributors
-
Matt Netsch, Qualcomm
-
Wooyoung Kim, Qualcomm
Notice
Copyright (c) 2020-2025 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
Final
Version
Last Modified Date |
2025-09-21 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.6 Revision 6, Unified.
This extension requires SPIR-V 1.4.
Overview
This extension introduces an image gather instruction for image processing, that gathers the requested components from the four texels that are specified with an additional mode parameter.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_QCOM_image_processing3"
New Capabilities
This extension introduces two new capabilities:
ImageGatherLinearQCOM ImageGatherExtendedModesQCOM
New Instructions
Instruction added under the ImageGatherLinearQCOM and/or ImageGatherExtendedModesQCOM capabilities:
OpImageGatherQCOM
Modifications to the SPIR-V Specification, Version 1.6
Capabilities
Modify Section 3.2.30, "Capability", adding these rows to the Capability table:
| Capability | Implicitly declares | |
|---|---|---|
4543 |
ImageGatherLinearQCOM |
|
4544 |
ImageGatherExtendedModesQCOM |
|
3.2.X Image Gather Modes
New section in 3.2 "Enumerants".
| Gather Modes | Enabling Capabilities | |
|---|---|---|
0 |
Gather4x1QCOM |
ImageGatherLinearQCOM |
1 |
GatherDQCOM |
ImageGatherExtendedModesQCOM |
2 |
GatherH2QCOM |
ImageGatherExtendedModesQCOM |
3 |
GatherV2QCOM |
ImageGatherExtendedModesQCOM |
3.3.10 Image Instructions
Modify Section 3.3.10, "Image Instructions", adding before OpImageSampleFootprintNV:
OpImageGatherQCOM Assuming the (0,0) is at the upper-left corner and (1.0, 1.0) is at the lower-right corner in the diagram below, OpImageGatherQCOM gathers component values from the four texels
when Mode is GatherV2QCOM, given P, (a, b, c, d). when Mode is GatherH2QCOM, given P, (e, f, g, h). when Mode is GatherDQCOM, given Q, (S, E, N, W). when Mode is Gather4x1QCOM, given R, (R, S, T, U). Result Type must be a vector of four components of floating-point type or integer type. Its components must be the same as Sampled Type of the underlying OpTypeImage (unless that underlying Sampled Type is OpTypeVoid). It has one component per gathered texel. Sampled Image must be an object whose type is OpTypeSampledImage. Its OpTypeImage must have a Dim of 2D or Rect. The MS operand of the underlying OpTypeImage must be 0. Coordinate must be a vector of floating-point type. It contains (u, v [, array layer]) as needed by the definition of Sampled Image. Component is the component number gathered from all four texels. It must be a 32-bit integer type scalar. Behavior is undefined if its value is not 0, 1, 2 or 3. Mode specifies four texels from which the component values are gathered. It must be a 32-bit integer type scalar constant whose value corresponds to a Gather Modes. Behavior is undefined if its value is not 0, 1, 2 or 3. Image Operands encodes what operands follow, as per Image Operands. |
Capability: |
||||||||
7 + variable |
4545 |
<id> Result Type |
<id> Sampled Image |
<id> Coordinate |
<id> Component |
<id> Mode |
Optional Image Operands |
Optional <id>, <id>, … |
|
Validation Rules
An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension.
Issues
Revision History
| Rev | Date | Author | Changes |
|---|---|---|---|
1 |
2025-09-21 |
Wooyoung Kim |
Initial version |