Fix memory management, image layout issues in uploadImageSparse()
authorDominik Witczak <Dominik.Witczak@amd.com>
Thu, 17 Nov 2016 12:10:19 +0000 (13:10 +0100)
committerPyry Haulos <phaulos@google.com>
Mon, 28 Nov 2016 19:23:37 +0000 (14:23 -0500)
commit70fc0800efe725f4f91f4d03b09aa0e567dbb09c
tree9550b113c6fa2a8422820701b40e0993e041f356
parent179031edd002b72ab8d2f4d8c9bb7d9fb59e1ac9
Fix memory management, image layout issues in uploadImageSparse()

Fixes an issue where ShaderRenderCaseInstance::uploadSparseImage()
would first configure sparse image bindings and then deallocate
the memory objects, prior to actually sampling the image.

Fixes an issue where the sparse image, after having been filled with
contents, would first be transitioned to SHADER_READ_ONLY_OPTIMAL
layout, and then used in a DS which was expecting it to be in
GENERLA layout.

Finally, the patch addresses a problem, where the function would not
correctly recognize the VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT,
as reported by the running driver.

The change affects dEQP-VK.glsl.*sparse* tests

Khronos issue: #543

Change-Id: Ie5717841fe0ef9c0672b5075380ff96bba9855b9
external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.hpp