radv: implement a workaround for VK_EXT_conditional_rendering
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 30 Apr 2019 15:08:19 +0000 (17:08 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 2 May 2019 07:24:05 +0000 (09:24 +0200)
commit6ac10e07c2d6d7740f09a4e53c6b2fc88f4ecadd
tree171faff9c1ed4077f17782c8db6e6a1f4bcd248f
parente03e7c510f571a8867ab7a8604058c075c601a70
radv: implement a workaround for VK_EXT_conditional_rendering

Per the Vulkan spec 1.1.107, the predicate is a 32-bit value. Though
the AMD hardware treats it as a 64-bit value which means it might
fail to discard.

I don't know why this extension has been drafted like that but this
definitely not fit with AMD. The hardware doesn't seem to support
a 32-bit value for the predicate, so we need to implement a workaround.

This fixes an issue when DXVK enables conditional rendering with RADV,
this also fixes the Sasha conditionalrender demo.

Fixes: e45ba51ea45 ("radv: add support for VK_EXT_conditional_rendering")
Reported-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c