From 90c104c9f1fd3ea13e5ba52c8c246c2335dcff75 Mon Sep 17 00:00:00 2001 From: daigennki Date: Fri, 12 Jan 2024 01:24:53 +0900 Subject: [PATCH] Fix wrong comparison in push constant size validation check (#2452) * Fix wrong comparison in push constant size validation check * Fix incorrectly placed backtick in validation error problem Oops. --- vulkano/src/command_buffer/commands/bind_push.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vulkano/src/command_buffer/commands/bind_push.rs b/vulkano/src/command_buffer/commands/bind_push.rs index acb12ce6..d8f9d88e 100644 --- a/vulkano/src/command_buffer/commands/bind_push.rs +++ b/vulkano/src/command_buffer/commands/bind_push.rs @@ -1062,10 +1062,10 @@ impl RawRecordingCommandBuffer { })); } - if offset as usize + remaining_size >= properties.max_push_constants_size as usize { + if offset as usize + remaining_size > properties.max_push_constants_size as usize { return Err(Box::new(ValidationError { - problem: "`offset` + the size of `push_constants` is not less than the \ - `max_push_constants_size` limit" + problem: "`offset` + the size of `push_constants` is not less than or \ + equal to the `max_push_constants_size` limit" .into(), vuids: &["VUID-vkCmdPushConstants-size-00371"], ..Default::default()