SPIRV-Tools/source
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
..
fuzz spirv-fuzz: Support AtomicStore (#4440) 2021-08-05 14:08:44 +01:00
link Linker usability improvements (#4084) 2021-01-13 09:05:40 -05:00
lint Remove PCH from source/lint/CMakeLists.txt (#4459) 2021-08-09 15:30:51 -04:00
opt Add spirv-opt convert-to-sampled-image pass (#4340) 2021-08-18 08:30:48 -04:00
reduce spirv-reduce: Eliminate skeletal structured control flow construct (#4360) 2021-07-06 07:14:36 +01:00
util Support constant-folding UConvert and SConvert (#2960) 2019-10-16 16:29:55 -04:00
val Disallow loading a runtime-sized array (#4473) 2021-08-16 18:23:10 -04:00
assembly_grammar.cpp
assembly_grammar.h
binary.cpp Initial support for SPV_KHR_integer_dot_product (#4327) 2021-06-23 13:32:24 -04:00
binary.h
cfa.h Avoid copying a ref in a loop (#4000) 2020-10-29 09:20:45 -04:00
CMakeLists.txt Add new target for spirv-lint (#4446) 2021-08-06 14:03:59 -04:00
common_debug_info.h Add common enum for debug info instructions from either opencl or vulkan (#4377) 2021-07-16 16:28:14 -04:00
diagnostic.cpp fix strncpy bound error (#4331) 2021-06-29 10:07:13 -04:00
diagnostic.h
disassemble.cpp Initial support for SPV_KHR_integer_dot_product (#4327) 2021-06-23 13:32:24 -04:00
disassemble.h
enum_set.h Instrument: Debug Printf support (#3215) 2020-03-12 09:19:52 -04:00
enum_string_mapping.cpp
enum_string_mapping.h
ext_inst.cpp Add non-semantic vulkan extended instruction set (#4362) 2021-07-12 05:51:08 -04:00
ext_inst.h Handle conflict between debug info and existing validation rule (#3104) 2020-01-23 17:04:30 -05:00
extensions.cpp
extensions.h
extinst.nonsemantic.vulkan.debuginfo.100.grammar.json Add non-semantic vulkan extended instruction set (#4362) 2021-07-12 05:51:08 -04:00
instruction.h
latest_version_glsl_std_450_header.h
latest_version_opencl_std_header.h
latest_version_spirv_header.h
libspirv.cpp Remove WebGPU support (#4108) 2021-01-14 16:45:18 -05:00
macro.h
name_mapper.cpp Update some language usage. (#3611) 2020-07-29 13:50:58 -04:00
name_mapper.h
opcode.cpp Add validation for SPV_EXT_shader_atomic_float_min_max (#4105) 2021-03-24 08:49:21 -04:00
opcode.h Take new (raytracing) termination instructions into account. (#4050) 2020-12-07 10:26:05 -05:00
operand.cpp spirv-opt: Add specific handling of vulkan debug info differences (#4398) 2021-07-28 21:35:32 -04:00
operand.h Handle conflict between debug info and existing validation rule (#3104) 2020-01-23 17:04:30 -05:00
parsed_operand.cpp
parsed_operand.h
pch_source.cpp
pch_source.h
print.cpp Enabled tvOS platform (#4329) 2021-06-29 15:14:38 -04:00
print.h
software_version.cpp
spirv_constant.h
spirv_definition.h
spirv_endian.cpp
spirv_endian.h
spirv_fuzzer_options.cpp spirv-fuzz: Add pass recommendations (#3757) 2020-09-18 15:51:35 +01:00
spirv_fuzzer_options.h spirv-fuzz: Add pass recommendations (#3757) 2020-09-18 15:51:35 +01:00
spirv_optimizer_options.cpp
spirv_optimizer_options.h
spirv_reducer_options.cpp spirv-reduce: Support reducing a specific function (#3774) 2020-09-11 06:29:43 +01:00
spirv_reducer_options.h spirv-reduce: Support reducing a specific function (#3774) 2020-09-11 06:29:43 +01:00
spirv_target_env.cpp Remove WebGPU support (#4108) 2021-01-14 16:45:18 -05:00
spirv_target_env.h Remove WebGPU support (#4108) 2021-01-14 16:45:18 -05:00
spirv_validator_options.cpp Validate SPV_KHR_workgroup_memory_explicit_layout (#4128) 2021-01-27 19:38:38 -05:00
spirv_validator_options.h Validate SPV_KHR_workgroup_memory_explicit_layout (#4128) 2021-01-27 19:38:38 -05:00
table.cpp Remove WebGPU support (#4108) 2021-01-14 16:45:18 -05:00
table.h
text_handler.cpp
text_handler.h
text.cpp Support OpenCL.DebugInfo.100 extended instruction set (#3080) 2019-12-19 17:16:26 -05:00
text.h