diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2026-08-18 22:51:56 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2026-08-18 22:51:56 +0200 |
| commit | d7fb64a1b127e76200359bf5505df64c04cb33ca (patch) | |
| tree | 6c7f90b0f0fa314ee1dc97489c92a795010552e0 /src/vk-command-buffer.cpp | |
| parent | a92179b4cb3f3e2088d3739034ad3848b0d7aa69 (diff) | |
Packed scene metadata fields
Diffstat (limited to 'src/vk-command-buffer.cpp')
| -rw-r--r-- | src/vk-command-buffer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vk-command-buffer.cpp b/src/vk-command-buffer.cpp index 00d60a1..aa87265 100644 --- a/src/vk-command-buffer.cpp +++ b/src/vk-command-buffer.cpp @@ -124,6 +124,8 @@ void command_buffer::copy(handle<device_buffer> buffer_handle, ::handle<device_t } void graphics_command_buffer::dispatch(const dispatch_params& params, const void* data, size_t size) const { + assert(size <= descriptor_heap_props.maxPushDataSize); + const device_pipeline* pipeline = vkdevice::get().get_pipeline(params.pipeline); vkCmdBindPipeline(vk_command_buffer, pipeline->bind_point, pipeline->vk_pipeline); @@ -204,6 +206,8 @@ void graphics_command_buffer::begin_renderpass(const renderpass_params& params) } void graphics_command_buffer::draw(const draw_params& params, const void* data, size_t size) const { + assert(size <= descriptor_heap_props.maxPushDataSize); + const device_pipeline* pipeline = vkdevice::get().get_pipeline(params.pipeline); vkCmdBindPipeline(vk_command_buffer, pipeline->bind_point, pipeline->vk_pipeline); @@ -222,6 +226,8 @@ void graphics_command_buffer::draw(const draw_params& params, const void* data, } void graphics_command_buffer::draw_indexed(const draw_indexed_params& params, const void* data, size_t size) const { + assert(size <= descriptor_heap_props.maxPushDataSize); + const device_pipeline* pipeline = vkdevice::get().get_pipeline(params.pipeline); vkCmdBindPipeline(vk_command_buffer, pipeline->bind_point, pipeline->vk_pipeline); |
