From 0d6dea0ac87ec3ca089c4ab637fd07a2f488e6a1 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sun, 31 Mar 2019 17:27:13 -0500 Subject: [PATCH] anv/cmd_buffer: Use gen_mi_sub instead of gen_mi_add with a negative Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/genX_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 7771afe..b6d935c 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -2950,7 +2950,7 @@ void genX(CmdDrawIndirectByteCountEXT)( gen_mi_mem32(anv_address_add(counter_buffer->address, counterBufferOffset)); if (counterOffset) - count = gen_mi_iadd(&b, count, gen_mi_imm(-counterOffset)); + count = gen_mi_isub(&b, count, gen_mi_imm(counterOffset)); count = gen_mi_udiv32_imm(&b, count, vertexStride); gen_mi_store(&b, gen_mi_reg32(GEN7_3DPRIM_VERTEX_COUNT), count); -- 2.7.4