| 976 | return res; |
| 977 | } |
| 978 | id define_sampler(const location &loc, const texture &, sampler &info) override |
| 979 | { |
| 980 | const id res = info.id = define_variable(loc, info.type, info.unique_name.c_str(), spv::StorageClassUniformConstant); |
| 981 | |
| 982 | // Default to a binding index equivalent to the entry in the sampler list (this is later overwritten in 'finalize_code_for_entry_point' to a more optimal placement) |
| 983 | const uint32_t default_binding = static_cast<uint32_t>(_module.samplers.size()); |
| 984 | add_decoration(res, spv::DecorationBinding, { default_binding }); |
| 985 | add_decoration(res, spv::DecorationDescriptorSet, { 1 }); |
| 986 | |
| 987 | _module.samplers.push_back(info); |
| 988 | |
| 989 | return res; |
| 990 | } |
| 991 | id define_storage(const location &loc, const texture &tex_info, storage &info) override |
| 992 | { |
| 993 | const id res = info.id = define_variable(loc, info.type, info.unique_name.c_str(), spv::StorageClassUniformConstant, format_to_image_format(tex_info.format)); |
nothing calls this directly
no test coverage detected