From ebef8aad19e29102fd0deb19ca7e0fc884a0e30b Mon Sep 17 00:00:00 2001 From: harrand Date: Mon, 7 Aug 2023 00:45:05 +0100 Subject: [PATCH] [dbgui] fix a critical UB where the draw buffer was set to use draw_indirect_commands but was expected to use draw_indexed_indirect_commands. this had no issue in practice due to luckily/positioned data members, but was caught by MSVC debugging. --- src/tz/dbgui/dbgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tz/dbgui/dbgui.cpp b/src/tz/dbgui/dbgui.cpp index bc0f0f5710..cbbd3e3c14 100644 --- a/src/tz/dbgui/dbgui.cpp +++ b/src/tz/dbgui/dbgui.cpp @@ -381,10 +381,10 @@ namespace tz::dbgui { .access = tz::gl::resource_access::dynamic_access }); - tz::gl::buffer_resource draw_buffer = tz::gl::buffer_resource::from_one(tz::gl::draw_indirect_command + tz::gl::buffer_resource draw_buffer = tz::gl::buffer_resource::from_one(tz::gl::draw_indexed_indirect_command { .count = 0u, - .first = 0 + .first_index = 0 }, { .access = tz::gl::resource_access::dynamic_access,