Driver confusion between buffer view size and buffer view elements

During initialization, my application creates a buffer view with 0x940b90 elements of type VK_FORMAT_R32G32B32A32_SFLOAT.

Here is the output from the api_dump layer, for reference:

t{0} vkCreateBufferView(device = 0x2f2a980, pCreateInfo = 0x1bf2c8, pAllocator = 0x0, *pView = 0x59af150) = VK_ERROR_VALIDATION_FAILED_EXT
   pCreateInfo:
    sType = VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
    pNext = 0x0
    flags = 0x0
    buffer = 0x5a4dc50
    format = VK_FORMAT_R32G32B32A32_SFLOAT
    offset = 0x0
    range = 0x940b900

But when vkCreateBufferView is executed, it returns VK_ERROR_VALIDATION_FAILED_EXT and the driver outputs this on the debug callback:

vkCreateBufferView: pCreateInfo->range 940b900 is too big for the texel buffer maximum 8000000

As far as I know, the only limit in Vulkan related to buffer views is maxTexelBufferElements, which is 0x8000000 for my GTX 970. But note that this is defined as the limit to the number of elements of a buffer view, and not a limit to the size in bytes as the driver seems to think. Therefore the error returned by the driver is wrong.

Drivers version: 373.06
Hardware: GTX 970
OS: Windows 7 64bits

This issue is still not yet fixed :(

Vulkan spec states that:

“If range is not equal to VK_WHOLE_SIZE, range divided by the element size of format must be less than or equal to VkPhysicalDeviceLimits::maxTexelBufferElements”

Unfortunately, the driver does not divide range by element size before checking, and using VK_WHOLE_SIZE does not workaround the issue either.

Are you still seeing this issue? If so, which driver version are you using? This issue should be fixed in driver version 411.63 (September 19, 2018) and beyond.

If you are still seeing an issue in a driver after 411.63, what symptom are you seeing? I don’t think you should be seeing the “vkCreateBufferView: pCreateInfo->range 940b900 is too big for the texel buffer maximum 8000000” message any more.

Thanks, I just checked with the latest driver and confirmed the bug was already fixed.