SPIRV-Tools/tools
Jaebaek Seo 57e1d8ebe3
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 ...
2021-08-18 08:30:48 -04:00
..
as Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
cfg Fix -Wunreachable-code-aggressive. (#4358) 2021-07-14 10:23:59 -04:00
dis Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
emacs Define variable to skip installation 2017-07-04 12:24:44 -04:00
fuzz spirv-fuzz: Allow inapplicable transformations to be ignored (#4407) 2021-07-28 22:59:37 +01:00
lesspipe tools/lesspipe: Allow generic shell (#2255) 2018-12-27 15:06:37 -05:00
link Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
lint Add new target for spirv-lint (#4446) 2021-08-06 14:03:59 -04:00
opt Add spirv-opt convert-to-sampled-image pass (#4340) 2021-08-18 08:30:48 -04:00
reduce Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
sva Bump glob-parent from 5.0.0 to 5.1.2. (#4353) 2021-06-29 11:25:32 -04:00
util Fix header include syntax. (#2882) 2019-09-19 09:26:24 -05:00
val Use standard function to get stdin to binary mode. (#4141) 2021-03-01 09:38:49 -05:00
CMakeLists.txt Add new target for spirv-lint (#4446) 2021-08-06 14:03:59 -04:00
io.h fix SIGSEGV when reading from a non-existant file (#4453) 2021-08-16 09:44:22 -04:00