Fix wrong barriers in D+S texture upload routines in vkt::pipeline tests
authorSlawomir Cygan <slawomir.cygan@intel.com>
Wed, 2 Nov 2016 17:16:30 +0000 (18:16 +0100)
committerPyry Haulos <phaulos@google.com>
Tue, 8 Nov 2016 19:29:44 +0000 (14:29 -0500)
commit0d97fc03d92681fa891c3211c50c7b88d61c0e6c
treecf5a65cc878eaf76a2f4526b7db559593a43e788
parent6971d4702d10f7b89483a663cb8d9df407b18075
Fix wrong barriers in D+S texture upload routines in vkt::pipeline tests

Affects tests:
dEQP-VK.texture.shadow.2d.nearest.less_or_equal_d24_unorm_s8_uint
dEQP-VK.texture.shadow.2d.nearest.less_or_equal_d32_sfloat_s8_uint
...and possibly other dEQP-VK.texture.shadow.*d.*.*d*s8_uint

In case of D+S textures, there was an invalid aspect mask used in
barriers before and after the copy to image operation in
vkt::pipeline::uploadTestTextureInternal.

Because the upload of textures was split into D-only and S-only phases,
the barriers were operating separately on D and S aspects of DS texture,
what is forbidden by spec:

"""
If image has a depth/stencil format with both depth and stencil
components, then aspectMask member of subresourceRange must include
both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT".
"""

This change batches D & S uploads together (uploadTestTextureInternal is
called once), so full DS aspect mask is used in case of D+S textures.

Change-Id: Ib9d8b2a0156ffc8437edc0d5ed76c54116dd736b
external/vulkancts/modules/vulkan/pipeline/vktPipelineImageUtil.cpp