Vulkan-API-Tutorials icon indicating copy to clipboard operation
Vulkan-API-Tutorials copied to clipboard

Cannot call vkCmdSetViewport()

Open GarethH96 opened this issue 7 years ago • 4 comments

On tutorial 4, when setting up the viewport I get this error: VKDBG: ERROR: @[DS]: Cannot call vkCmdSetViewport() on a command buffer allocated from a pool without VK_QUEUE_GRAPHICS_BIT capabilities. The spec valid usage text states 'The VkCommandPool that commandBuffer was allocated from must support graphics operations' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkCmdSetViewport-commandBuffer-cmdpool). GPU: AMD RX 480 8GB, OS: GNU/Linux Antergos, Driver: Mesa 17.3.3-2.

GarethH96 avatar Feb 17 '18 20:02 GarethH96

I can't immediately see what could cause this. See what values does the queueFamilyIndex get. pool_create_info.queueFamilyIndex = r._graphics_family_index; Then see in the Renderer.cpp lines

bool found = false;
for( uint32_t i=0; i < family_count; ++i ) {
	if( family_property_list[ i ].queueFlags & VK_QUEUE_GRAPHICS_BIT ) {
		found = true;
		_graphics_family_index = i;
	}
}

See what value does the _graphics_family_index have. compare it to the family_property_list flags with the same index. If you're sure that the queueFlags contains the VK_QUEUE_GRAPHICS_BIT then I think it's the validation layer bug.

Noxagonal avatar Feb 20 '18 17:02 Noxagonal

Hi GarethH96, I'm also an Radv user. You might be interested in this article: https://www.phoronix.com/scan.php?page=news_item&px=Mesa-17.3-Remains-Buggy

hodasemi avatar Feb 22 '18 06:02 hodasemi

@hodasemi That's interesting. @GarethH96 Can you test this with AMD closed drivers to verify it's a problem with Mesa?

Noxagonal avatar Feb 22 '18 06:02 Noxagonal

I'm also using Mesa (17.3.5 by now) and Archlinux. Tutorial 4 doesn't make any problems on my side (RX 470).

hodasemi avatar Feb 22 '18 17:02 hodasemi