radv/xfb: fix counter buffer bounds checks.
authorDave Airlie <airlied@redhat.com>
Thu, 13 Dec 2018 03:29:04 +0000 (03:29 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 13 Dec 2018 19:27:05 +0000 (19:27 +0000)
commitb3f2b03ece06327276b183d34fc6f94a2424f094
treed46dec809ab14b04680d238172aa3632f3221558
parent9ebc00f32ee434d4ca70f0fc562fc4df62e3859d
radv/xfb: fix counter buffer bounds checks.

If we gave this function 0 counter buffers, we'd still try and
access pCounterBuffers[0] as this check was incorrect.

Fixes crash with ext_transform_feedback-pipeline-basic-primgen
on zink on radv.

Fixes: 677b496b6 (radv: fix begin/end transform feedback with 0 counter buffers.)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_cmd_buffer.c