Minor conveniences

This commit is contained in:
David Gonzalez Martin 2024-11-30 05:18:15 -06:00 committed by David
parent ed3c76c0b0
commit 108ed377f2
2 changed files with 10 additions and 5 deletions

View File

@ -171,14 +171,18 @@ fn String message_type_to_string(VkDebugUtilsMessageTypeFlagBitsEXT message_type
fn VkBool32 VKAPI_CALL debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, VkDebugUtilsMessageTypeFlagsEXT message_type, const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data)
{
unused(message_severity);
unused(message_type);
unused(user_data);
print("Validation message ({s}) ({s}) ({cstr}): {cstr}\n", message_severity_to_string(message_severity), message_type_to_string(message_type), callback_data->pMessageIdName ? callback_data->pMessageIdName : "ID_NONE", callback_data->pMessage ? callback_data->pMessage : "MESSAGE_NONE");
if (callback_data->pMessage)
{
print("Validation message ({s}) ({s}) ({cstr}): {cstr}\n", message_severity_to_string(message_severity), message_type_to_string(message_type), callback_data->pMessageIdName ? callback_data->pMessageIdName : "ID_NONE", callback_data->pMessage);
}
if (message_severity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT)
{
failed_execution();
}
return VK_FALSE;
}
@ -2008,5 +2012,3 @@ void window_draw_indexed(RenderWindow* window, u32 index_count, u32 instance_cou
auto* frame = window_frame(window);
vkCmdDrawIndexed(frame->command_buffer, index_count, instance_count, first_index, vertex_offset, first_instance);
}

View File

@ -95,6 +95,7 @@ cmake . \
-DCMAKE_C_COMPILER=$C_COMPILER_PATH \
-DCMAKE_CXX_COMPILER=$CXX_COMPILER_PATH \
-DCMAKE_ASM_COMPILER=$ASM_COMPILER_PATH \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCOMPILER_NAME=$COMPILER_NAME \
-DBB_DIR=$BB_DIR \
-DBB_IS_CI=$BB_IS_CI \
@ -105,6 +106,8 @@ cmake . \
cd $BUILD_DIR
ninja -v
cd $ORIGINAL_DIR/build
ln -s $BUILD_DIR/compile_commands.json . || true
cd $ORIGINAL_DIR
if [ "$#" -ne 0 ]; then