Skip to content

Commit

Permalink
vkd3d: Print build commit using a fixed width format.
Browse files Browse the repository at this point in the history
And use vkd3d_version to detect dirty tree builds.

Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
  • Loading branch information
Saancreed authored and HansKristian-Work committed Jun 18, 2024
1 parent 7e99b34 commit 81ac2f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/vkd3d/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance,
const char **extensions;
uint32_t layer_count, i;
VkInstance vk_instance;
bool dirty_tree_build;
VkResult vr;
HRESULT hr;
uint32_t loader_version = VK_API_VERSION_1_0;
Expand Down Expand Up @@ -1029,7 +1030,12 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance,
application_info.engineVersion = vkd3d_get_vk_version();
application_info.apiVersion = loader_version;

INFO("vkd3d-proton - build: %"PRIx64".\n", vkd3d_build);
/* Builds from dirty trees generate vkd3d_version ending with a '+'. */
dirty_tree_build = sizeof(vkd3d_version) >= 2 && vkd3d_version[sizeof(vkd3d_version) - 2] == '+';
if (dirty_tree_build)
INFO("vkd3d-proton - build: %015"PRIx64"+.\n", vkd3d_build >> 4);
else
INFO("vkd3d-proton - build: %015"PRIx64".\n", vkd3d_build);

if (vkd3d_get_program_name(application_name))
application_info.pApplicationName = application_name;
Expand Down

0 comments on commit 81ac2f2

Please sign in to comment.