Skip to content

Commit

Permalink
Merge pull request #90620 from thimenesup/fix_push_constant
Browse files Browse the repository at this point in the history
Fix incorrect bounds check in RenderingDevice push constant
  • Loading branch information
akien-mga committed Apr 23, 2024
2 parents fc912de + 1ab5a47 commit a55ffba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions servers/rendering/rendering_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6400,11 +6400,11 @@ Vector<int64_t> RenderingDevice::_draw_list_switch_to_next_pass_split(uint32_t p
#endif

void RenderingDevice::_draw_list_set_push_constant(DrawListID p_list, const Vector<uint8_t> &p_data, uint32_t p_data_size) {
ERR_FAIL_COND((uint32_t)p_data.size() > p_data_size);
ERR_FAIL_COND(p_data_size > (uint32_t)p_data.size());
draw_list_set_push_constant(p_list, p_data.ptr(), p_data_size);
}

void RenderingDevice::_compute_list_set_push_constant(ComputeListID p_list, const Vector<uint8_t> &p_data, uint32_t p_data_size) {
ERR_FAIL_COND((uint32_t)p_data.size() > p_data_size);
ERR_FAIL_COND(p_data_size > (uint32_t)p_data.size());
compute_list_set_push_constant(p_list, p_data.ptr(), p_data_size);
}

0 comments on commit a55ffba

Please sign in to comment.