| 1007 | } |
| 1008 | } |
| 1009 | |
| 1010 | template <vkb::BindingType bindingType> |
| 1011 | template <typename T> |
| 1012 | inline void CommandBuffer<bindingType>::push_constants(const T &value) |
| 1013 | { |
| 1014 | auto data = to_bytes(value); |
| 1015 | |
| 1016 | uint32_t size = to_u32(stored_push_constants.size() + data.size()); |
| 1017 | |
| 1018 | if (size > max_push_constants_size) |
| 1019 | { |
| 1020 | LOGE("Push constant limit exceeded ({} / {} bytes)", size, max_push_constants_size); |
| 1021 | throw std::runtime_error("Cannot overflow push constant limit"); |
| 1022 | } |
| 1023 | |
| 1024 | stored_push_constants.insert(stored_push_constants.end(), data.begin(), data.end()); |
| 1025 | } |
no test coverage detected