bombomby / optick

C++ Profiler For Games

Home Page:https://optick.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vulkan GPU implementation not conforming with Validation Layers

gununes opened this issue · comments

This was tested on Windows using Vulkan SDK: 1.2.162.0

Repro Steps:

Build the Vulkan Windows example and on VulkanDebug.cpp change

const char *validationLayerNames[] = {
			"VK_LAYER_LUNARG_standard_validation"
		};

to

const char *validationLayerNames[] = {
			"VK_LAYER_KHRONOS_validation"
		};

Thats because VK_LAYER_LUNARG_standard_validation is deprecated on 1.2.162.0

And on multithreading.cpp enable the validation:

#define ENABLE_VALIDATION true

Look at the console log messages forvalidation errors coming from Optick, such as:

ERROR: [Validation] Code 0 : Validation Error: [ UNASSIGNED-CoreValidation-DrawState-QueryNotReset ] Object 0: handle = 0x185f86fb138, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x9cacd67a | vkCmdWriteTimestamp(): VkQueryPool 0x983e60000000003[] and query 5234: query not reset. After query pool creation, each query must be reset before it is used. Queries must also be reset between uses.
ERROR: [Validation] Code 0 : Validation Error: [ VUID-vkCmdResetQueryPool-commandBuffer-recording ] Object 0: handle = 0x185f86fb138, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x45e90123 | You must call vkBeginCommandBuffer() before this call to VkCmdResetQueryPool(). The Vulkan spec states: commandBuffer must be in the recording state (https://vulkan.lunarg.com/doc/view/1.2.162.0/windows/1.2-extensions/vkspec.html#VUID-vkCmdResetQueryPool-commandBuffer-recording)