MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / push_constants

Method push_constants

framework/core/command_buffer.h:1009–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007 }
1008}
1009
1010template <vkb::BindingType bindingType>
1011template <typename T>
1012inline 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}

Callers 7

draw_implMethod · 0.80
drawMethod · 0.80
drawMethod · 0.80
render_compute_postMethod · 0.80
draw_renderpassMethod · 0.80

Calls 6

to_u32Function · 0.85
to_bytesFunction · 0.85
sizeMethod · 0.80
endMethod · 0.80
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected