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>
Thu, 9 Feb 2017 17:54:12 +0000 (12:54 -0500)
commit83781bfa0cd221a190f925e3c196115801514f51
tree14b9908ad3ca3b02b628a53915acb7515ac6536b
parentb788e7ed33968a201f44d0b5f25ac04e4bbb61a0
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

VK-GL-CTS issue: 156

Change-Id: Ie5717841fe0ef9c0672b5075380ff96bba9855b9
(cherry picked from commit 70fc0800efe725f4f91f4d03b09aa0e567dbb09c)
external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.hpp