From: Jason Ekstrand Date: Sun, 31 Mar 2019 22:27:13 +0000 (-0500) Subject: anv/cmd_buffer: Use gen_mi_sub instead of gen_mi_add with a negative X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d6dea0ac87ec3ca089c4ab637fd07a2f488e6a1;p=mesa.git anv/cmd_buffer: Use gen_mi_sub instead of gen_mi_add with a negative Reviewed-by: Lionel Landwerlin --- diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 7771afe663e..b6d935c6901 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);