radv: Ignore CmdUpdateBuffer with size 0.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 12 Apr 2017 22:04:23 +0000 (00:04 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Thu, 13 Apr 2017 14:06:34 +0000 (16:06 +0200)
Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_meta_buffer.c

index 1e94f3b58669fef12b6d70e5145575fc24ea4307..cfa0b9320e2dc8fccf9f103dcc43e42987a5b792 100644 (file)
@@ -523,6 +523,9 @@ void radv_CmdUpdateBuffer(
        assert(!(dataSize & 3));
        assert(!(va & 3));
 
+       if (!dataSize)
+               return;
+
        if (dataSize < 4096) {
                si_emit_cache_flush(cmd_buffer);