| 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)); |
| 994 | |
| 995 | // Default to a binding index equivalent to the entry in the storage list (this is later overwritten in 'finalize_code_for_entry_point' to a more optimal placement) |
| 996 | const uint32_t default_binding = static_cast<uint32_t>(_module.storages.size()); |
| 997 | add_decoration(res, spv::DecorationBinding, { default_binding }); |
| 998 | add_decoration(res, spv::DecorationDescriptorSet, { 2 }); |
| 999 | |
| 1000 | _module.storages.push_back(info); |
| 1001 | |
| 1002 | return res; |
| 1003 | } |
| 1004 | id define_uniform(const location &, uniform &info) override |
| 1005 | { |
| 1006 | if (_uniforms_to_spec_constants && info.has_initializer_value) |
nothing calls this directly
no test coverage detected