|
| 1 | +:capability_token: 6528 |
| 2 | +:handle_to_image_token: 6529 |
| 3 | +:handle_to_sampler_token: 6530 |
| 4 | + |
| 5 | +SPV_INTEL_bindless_images |
| 6 | +========================= |
| 7 | + |
| 8 | +== Name Strings |
| 9 | + |
| 10 | +SPV_INTEL_bindless_images |
| 11 | + |
| 12 | +== Contact |
| 13 | + |
| 14 | +To report problems with this extension, please open a new issue at: |
| 15 | + |
| 16 | +<https://github.com/intel/llvm/issues> |
| 17 | + |
| 18 | +== Contributors |
| 19 | + |
| 20 | +- Duncan Brawley, Codeplay |
| 21 | +- Przemek Malon, Codeplay |
| 22 | +- Peter Žužek, Codeplay |
| 23 | +- Chedy Najjar, Codeplay |
| 24 | +- Sean Stirling, Codeplay |
| 25 | +- Isaac Ault, Codeplay |
| 26 | +- Victor Lomuller, Codeplay |
| 27 | + |
| 28 | +== Notice |
| 29 | + |
| 30 | +Copyright © Codeplay Software Limited. All rights reserved. |
| 31 | + |
| 32 | +== Status |
| 33 | + |
| 34 | +In Development |
| 35 | + |
| 36 | +== Version |
| 37 | + |
| 38 | +[width="40%",cols="25,25"] |
| 39 | +|======================================== |
| 40 | +| Last Modified Date | 2024-03-25 |
| 41 | +| Revision | 6 |
| 42 | +|======================================== |
| 43 | + |
| 44 | +== Dependencies |
| 45 | + |
| 46 | +This extension is written against the SPIR-V Specification, |
| 47 | +Version 1.6 Revision 1. |
| 48 | + |
| 49 | +This extension requires SPIR-V 1.0. |
| 50 | + |
| 51 | +== Overview |
| 52 | + |
| 53 | +This extension adds support for bindless images. |
| 54 | +This is done by adding support for SPIR-V to convert unsigned integer handles to |
| 55 | +images/samplers. |
| 56 | + |
| 57 | +Bindless images are a feature that provides flexibility on how images are |
| 58 | +accessed and used, such as removing limitations on how many images can be |
| 59 | +accessed as well as potentially improving performance. |
| 60 | +This is an improvement on the legacy bound images model which is a holdover from |
| 61 | +binding slots in hardware which used to be limited in number. |
| 62 | + |
| 63 | +== Extension Name |
| 64 | + |
| 65 | +To use this extension within a SPIR-V module, the following *OpExtension* must |
| 66 | +be present in the module: |
| 67 | + |
| 68 | +---- |
| 69 | +OpExtension "SPV_INTEL_bindless_images" |
| 70 | +---- |
| 71 | + |
| 72 | +== New Capabilities |
| 73 | + |
| 74 | +This extension introduces a new capability: |
| 75 | + |
| 76 | +---- |
| 77 | +BindlessImagesINTEL |
| 78 | +---- |
| 79 | + |
| 80 | +== New Instructions |
| 81 | + |
| 82 | +Instructions added under *BindlessImagesINTEL* capability. |
| 83 | + |
| 84 | +---- |
| 85 | +OpConvertHandleToImageINTEL |
| 86 | +OpConvertHandleToSamplerINTEL |
| 87 | +---- |
| 88 | + |
| 89 | +== Token Number Assignments |
| 90 | + |
| 91 | +-- |
| 92 | +[width="40%"] |
| 93 | +[cols="70%,30%"] |
| 94 | +[grid="rows"] |
| 95 | +|==== |
| 96 | +|BindlessImagesINTEL |{capability_token} |
| 97 | +|OpConvertHandleToImageINTEL |{handle_to_image_token} |
| 98 | +|OpConvertHandleToSamplerINTEL |{handle_to_sampler_token} |
| 99 | +|==== |
| 100 | +-- |
| 101 | + |
| 102 | +== Modifications to the SPIR-V Specification, Version 1.6, Revision 2 |
| 103 | + |
| 104 | +Modify Section 3.49.10, Image Instructions, adding to the end of the list of |
| 105 | +instructions: |
| 106 | + |
| 107 | +[cols="2*1,3*2"] |
| 108 | +|====== |
| 109 | +5+|[[OpConvertHandleToImageINTEL]]*OpConvertHandleToImageINTEL* + |
| 110 | + + |
| 111 | +Converts an unsigned integer pointed by _Operand_ to image type. |
| 112 | + |
| 113 | +Unsigned integer is either a 32 or 64 bit unsigned integer. |
| 114 | +Depending on if the addressing model is set to *Physical32* or *Physical64*. |
| 115 | + |
| 116 | +_Result type_ must be an `OpTypeImage`. |
| 117 | + |
| 118 | +| 4 | {handle_to_image_token} | '<id> Result Type' | 'Result <id>' | |
| 119 | +'<id> Operand' |
| 120 | +|====== |
| 121 | + |
| 122 | +[cols="2*1,3*2"] |
| 123 | +|====== |
| 124 | +5+|[[OpConvertHandleToSamplerINTEL]]*OpConvertHandleToSamplerINTEL* + |
| 125 | + + |
| 126 | +Converts an unsigned integer pointed by _Operand_ to sampler type. |
| 127 | + |
| 128 | +Unsigned integer is either a 32 or 64 bit unsigned integer. |
| 129 | +Depending on if the addressing model is set to *Physical32* or *Physical64*. |
| 130 | + |
| 131 | +_Result type_ must be an `OpTypeSampler`. |
| 132 | + |
| 133 | +| 4 | {handle_to_sampler_token} | '<id> Result Type' | 'Result <id>' | |
| 134 | +'<id> Operand' |
| 135 | +|====== |
| 136 | + |
| 137 | +Modify Section 3.31, Capability, adding row to the capability table: |
| 138 | + |
| 139 | +[width="40%"] |
| 140 | +[options="header"] |
| 141 | +|==== |
| 142 | +2+^| Capability ^| Implicitly Declares |
| 143 | +| {capability_token} | BindlessImagesINTEL | |
| 144 | +|==== |
| 145 | + |
| 146 | + |
| 147 | +== Issues |
| 148 | + |
| 149 | +None Yet. |
| 150 | + |
| 151 | +== Revision History |
| 152 | + |
| 153 | +[cols="5,15,15,70"] |
| 154 | +[grid="rows"] |
| 155 | +[options="header"] |
| 156 | +|======================================== |
| 157 | +|Rev|Date|Author|Changes |
| 158 | +|1|2023-03-23|Duncan Brawley|*Initial public release* |
| 159 | +|2|2023-03-30|Duncan Brawley| Updated token assignments |
| 160 | +|3|2023-05-29|Duncan Brawley| Updated token assignments and fix capitalization |
| 161 | +|4|2023-06-13|Duncan Brawley| Remove need for OpHandleAddressingModeINTEL |
| 162 | + instruction |
| 163 | +|5|2024-02-23|Duncan Brawley| Remove OpConvertHandleToSampledImageINTEL |
| 164 | + instruction and clarify return types |
| 165 | +|6|2024-03-25|Duncan Brawley| Wording/formatting improvements, clarify sections |
| 166 | + edited, make capability addition explicit and |
| 167 | + substitute instruction numbers |
| 168 | +|======================================== |
| 169 | + |
0 commit comments