Name Strings
SPV_QCOM_image_processing
Contact
To report problems with this extension, please open a new issue at:
Contributors
-
Balaji Calidas, Qualcomm
-
Jeff Leger, Qualcomm
-
Ruihao Zhang, Qualcomm
-
Wooyoung Kim, Qualcomm
Notice
Copyright (c) 2020 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
-
Final
Version
Last Modified Date |
2022-09-21 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.6 Revision 2.
This extension requires SPIR-V 1.4.
Overview
This extension introduces a new set of operations for image processing, along with new capabilities and two new decorations.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_QCOM_image_processing"
New Capabilities
This extension introduces new capabilities:
TextureSampleWeightedQCOM TextureBoxFilterQCOM TextureBlockMatchQCOM
New Decorations
The extension adds two new decorations for texture types.
WeightTextureQCOM BlockMatchTextureQCOM
New Instructions
Instruction added under the TextureSampleWeightedQCOM capability:
OpImageSampleWeightedQCOM
Instruction added under the TextureBoxFilterQCOM capability:
OpImageBoxFilterQCOM
Instructions added under the TextureBlockMatchQCOM capability:
OpImageBlockMatchSSDQCOM OpImageBlockMatchSADQCOM
Modifications to the SPIR-V Specification, Version 1.6
Capabilities
Modify Section 3.31, "Capability", adding these rows to the Capability table:
Capability | Implicitly declares | |
---|---|---|
4484 |
TextureSampleWeightedQCOM |
|
4485 |
TextureBoxFilterQCOM |
|
4486 |
TextureBlockMatchQCOM |
Decorations
Modify Section 3.20, "Decoration", adding the following rows to the Decoration table:
Decoration | Extra Operands | Enabling Capabilities | ||
---|---|---|---|---|
4487 |
WeightTextureQCOM |
TextureSampleWeightedQCOM |
||
4488 |
BlockMatchTextureQCOM |
TextureBlockMatchQCOM |
Instructions
Modify Section 3.42.10, "Image Instructions", adding before OpImageSampleFootprintNV:
OpImageSampleWeightedQCOM Result Type is the type of the result of weighted sample operation Texture Sampled Image must be an object whose type is OpTypeSampledImage. The MS operand of the underlying OpTypeImage must be 0. Coordinate must be a vector of floating-point type, whose vector size is 2. Weight Image must be an object whose type is OpTypeSampledImage. If the object is an interface object, it must be decorated with WeightTextureQCOM. Otherwise, a texture object which is used to construct the object must be decorated with WeightTextureQCOM. The MS operand of the underlying OpTypeImage must be 0. |
Capability: |
|||||
6 |
4480 |
<id> Result Type |
<id> Texture Sampled Image |
<id> Coordinate |
<id> Weight Image |
OpImageBoxFilterQCOM Result Type is the type of the result of image box filter operation Texture Sampled Image must be an object whose type is OpTypeSampledImage. The MS operand of the underlying OpTypeImage must be 0. Coordinate must be a vector of floating-point type, whose vector size is 2.
|
Capability: |
|||||
6 |
4481 |
<id> Result Type |
<id> Texture Sampled Image |
<id> Coordinate |
<id> Box Size |
OpImageBlockMatchSSDQCOM Result Type is the type of the result of image block match sum of square differences Target Sampled Image must be an object whose type is OpTypeSampledImage. If the object is an interface object, it must be decorated with BlockMatchTextureQCOM. Otherwise, a texture object which is used to construct the object must be decorated with BlockMatchTextureQCOM. The MS operand of the underlying OpTypeImage must be 0. Target Coordinate must be a vector of integer type, whose vector size is 2 and signedness is 0. Reference Sampled Image must be an object whose type is OpTypeSampledImage. If the object is an interface object, it must be decorated with BlockMatchTextureQCOM. Otherwise, a texture object which is used to construct the object must be decorated with BlockMatchTextureQCOM. The MS operand of the underlying OpTypeImage must be 0. Reference Coordinate must be a vector of integer type, whose vector size is 2 and signedness is 0. Block Size must be a vector of integer type, whose vector size is 2 and signedness is 0. |
Capability: |
|||||||
8 |
4482 |
<id> Result Type |
<id> Target Sampled Image |
<id> Target Coordinate |
<id> Reference Sampled Image |
<id> Reference Coordinate |
<id> Block Size |
OpImageBlockMatchSADQCOM Result Type is the type of the result of image block match sum of absolute differences Target Sampled Image must be an object whose type is OpTypeSampledImage. If the object is an interface object, it must be decorated with BlockMatchTextureQCOM. Otherwise, a texture object which is used to construct the object must be decorated with BlockMatchTextureQCOM. The MS operand of the underlying OpTypeImage must be 0. Target Coordinate must be a vector of integer type, whose vector size is 2 and signedness is 0. Reference Sampled Image must be an object whose type is OpTypeSampledImage. If the object is an interface object, it must be decorated with BlockMatchTextureQCOM. Otherwise, a texture object which is used to construct the object must be decorated with BlockMatchTextureQCOM. The MS operand of the underlying OpTypeImage must be 0. Reference Coordinate must be a vector of integer type, whose vector size is 2 and signedness is 0. Block Size must be a vector of integer type, whose vector size is 2 and signedness is 0. |
Capability: |
|||||||
8 |
4483 |
<id> Result Type |
<id> Target Sampled Image |
<id> Target Coordinate |
<id> Reference Sampled Image |
<id> Reference Coordinate |
<id> Block Size |
Validation Rules
An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension:
An object decorated with either WeightTextureQCOM or BlockMatchTextureQCOM must be used only with the corresponding built-in functions. Such an object must not be used with any other functions.
OpExtension "SPV_QCOM_image_processing"
Issues
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
0 |
2021-12-07 |
Ruihao Zhang |
Initial version |
1 |
2022-09-21 |
Wooyoung Kim |
Replaced "should" with "must". |