Test frag shader side effects are not removed by optimizations
authorRicardo Garcia <rgarcia@igalia.com>
Thu, 7 May 2020 12:15:56 +0000 (14:15 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 17 Jul 2020 08:37:09 +0000 (04:37 -0400)
commit280d7a815a9131891b382750d37ad432f2959d40
treebd869bde7718ab0543b872b26103f108b622c635
parenta0673086d0f9beea895dd529c59415a0c7389f71
Test frag shader side effects are not removed by optimizations

This commit adds a net set of tests that check fragment shader side
effects, in the form of an SSBO write, are not removed by optimizations
done when the fragment is discarded by several possible means:

* Calling "discard" for the fragment (translated to OpKill).
* Calling "demote" for the fragment (translated to
  OpDemoteToHelperInvocationEXT).
* Setting SampleMask to zero.
* Setting alphaToCoverageEnable and output 0 in the alpha component.
* Making the depth bounds test fail.
* Making the depth test fail.
* Making the stencil test fail.

New tests:
dEQP-VK.rasterization.frag_side_effects.*

Components: Vulkan
VK-GL-CTS issue: 2336

Change-Id: I6de8a50f137f37538fe614088f289f4ae05d88d0
AndroidGen.mk
android/cts/master/vk-master-2020-03-01.txt
android/cts/master/vk-master.txt
external/vulkancts/framework/vulkan/vkObjUtil.cpp
external/vulkancts/framework/vulkan/vkObjUtil.hpp
external/vulkancts/modules/vulkan/rasterization/CMakeLists.txt
external/vulkancts/modules/vulkan/rasterization/vktRasterizationFragShaderSideEffectsTests.cpp [new file with mode: 0644]
external/vulkancts/modules/vulkan/rasterization/vktRasterizationFragShaderSideEffectsTests.hpp [new file with mode: 0644]
external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp
external/vulkancts/modules/vulkan/vktTestCase.cpp
external/vulkancts/mustpass/master/vk-default.txt