summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-08-24 02:12:12 +0100
committerDave Airlie <[email protected]>2017-08-25 00:52:32 +0100
commit12fd0f8dc1fede75142f7eb369ca5c98bd41eb74 (patch)
treef957bcaaa4c36f70e27a66cc4853ae723313db41 /src
parent95f533d922d3e628f56eec50c5680fca6f2cbb5e (diff)
radv: fix predication on gfx9
When I added gfx9 I did it wrong, this fixes it. Fixes: 5247b311e9 "radv/gfx9: fix set predication packet." Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/si_cmd_buffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
index 913ec0e7d2a..ef4f9264f9d 100644
--- a/src/amd/vulkan/si_cmd_buffer.c
+++ b/src/amd/vulkan/si_cmd_buffer.c
@@ -1133,8 +1133,10 @@ si_emit_cache_flush(struct radv_cmd_buffer *cmd_buffer)
void
si_emit_set_predication_state(struct radv_cmd_buffer *cmd_buffer, uint64_t va)
{
- uint32_t op = PRED_OP(PREDICATION_OP_BOOL64) | PREDICATION_DRAW_VISIBLE;
+ uint32_t op = 0;
+ if (va)
+ op = PRED_OP(PREDICATION_OP_BOOL64) | PREDICATION_DRAW_VISIBLE;
if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9) {
radeon_emit(cmd_buffer->cs, PKT3(PKT3_SET_PREDICATION, 2, 0));
radeon_emit(cmd_buffer->cs, op);