Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaebaek Seo <jaebaek@google.com>2021-08-18 15:30:48 +0300
committerGitHub <noreply@github.com>2021-08-18 15:30:48 +0300
commit57e1d8ebe3190c4ba23c1bee5147fe00c83ce358 (patch)
treeca546f7b5a5bbb8407e59eb4119c4a97861b42bb /BUILD.gn
parentb2e36b67eca055e4338d260cf5bc23c12420494d (diff)
Add spirv-opt convert-to-sampled-image pass (#4340)
convert-to-sampled-image pass converts images and/or samplers with given pairs of descriptor set and binding to sampled image. If a pair of an image and a sampler have the same pair of descriptor set and binding that is one of the given pairs, they will be converted to a sampled image. In addition, if only an image has the descriptor set and binding that is one of the given pairs, it will be converted to a sampled image as well. For example, when we have %a = OpLoad %type_2d_image %texture %b = OpLoad %type_sampler %sampler %combined = OpSampledImage %type_sampled_image %a %b %value = OpImageSampleExplicitLod %v4float %combined ... 1. If %texture and %sampler have the same descriptor set and binding %combine_texture_and_sampler = OpVaraible %ptr_type_sampled_image_Uniform ... %combined = OpLoad %type_sampled_image %combine_texture_and_sampler %value = OpImageSampleExplicitLod %v4float %combined ... 2. If %texture and %sampler have different pairs of descriptor set and binding %a = OpLoad %type_sampled_image %texture %extracted_image = OpImage %type_2d_image %a %b = OpLoad %type_sampler %sampler %combined = OpSampledImage %type_sampled_image %extracted_image %b %value = OpImageSampleExplicitLod %v4float %combined ...
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn2
1 files changed, 2 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 036a0a1c0..8a0e5014d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -608,6 +608,8 @@ static_library("spvtools_opt") {
"source/opt/constants.h",
"source/opt/control_dependence.cpp",
"source/opt/control_dependence.h",
+ "source/opt/convert_to_sampled_image_pass.cpp",
+ "source/opt/convert_to_sampled_image_pass.h",
"source/opt/convert_to_half_pass.cpp",
"source/opt/convert_to_half_pass.h",
"source/opt/copy_prop_arrays.cpp",