KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
768 stars 404 forks source link

GPU-Assisted-Validation emits warning even when setup is correct #8528

Closed EpicJeanNoeMorissette closed 1 month ago

EpicJeanNoeMorissette commented 1 month ago

Describe the Issue

Even if timeline semaphore extension is included and enabled, a callback is issued with a validation warning "Forcing VkPhysicalDeviceTimelineSemaphoreFeatures::timelineSemaphore to VK_TRUE".

Expected behavior

Callback should not be issued if the setup was correct (or perhaps it shouldn't be a warning).

Additional context

The existing code (gpu_shader_instrumentor.cpp): ... if (auto *ts_features = const_cast<VkPhysicalDeviceTimelineSemaphoreFeatures *>( vku::FindStructInPNextChain<VkPhysicalDeviceTimelineSemaphoreFeatures>(modified_create_info))) { InternalWarning(device, record_obj.location, "Forcing VkPhysicalDeviceTimelineSemaphoreFeatures::timelineSemaphore to VK_TRUE"); ts_features->timelineSemaphore = VK_TRUE; } else { ...

A condition "if (ts_features->timelineSemaphore == VK_FALSE)" should be added before emitting the warning (the same way it is done in the VkPhysicalDeviceVulkan12Features check lower in the same function).

spencer-lunarg commented 1 month ago

@EpicJeanNoeMorissette thanks for raising this, but I think you were beat to it https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/8509/files

EpicJeanNoeMorissette commented 1 month ago

Actually, it was fixed for Vulkan 1.2 and up... Look at Vulkan 1.1 a little higher in the same code, it still has the issue doesn't it?

spencer-lunarg commented 1 month ago

awww... good call, let me literally fix this right now

EpicJeanNoeMorissette commented 1 month ago

Thanks!