turnip: fix tu_cs sub-streams
authorChia-I Wu <olvaffe@gmail.com>
Mon, 25 Feb 2019 22:37:55 +0000 (14:37 -0800)
committerChia-I Wu <olvaffe@gmail.com>
Mon, 11 Mar 2019 17:02:13 +0000 (10:02 -0700)
Update cs->start in tu_cs_end_sub_stream.  Otherwise, the entry
would include commands from all prior sub-streams.

src/freedreno/vulkan/tu_cs.c

index 11e1737d5d3d247804930177cd08d117b34ce5ab..27fe75b8b50489273ff3110c0448cfc708d61d45 100644 (file)
@@ -272,11 +272,15 @@ tu_cs_end_sub_stream(struct tu_cs *cs, struct tu_cs *sub_cs)
 
    cs->cur = sub_cs->cur;
 
-   return (struct tu_cs_entry) {
+   struct tu_cs_entry entry = {
       .bo = cs->bos[cs->bo_count - 1],
       .size = tu_cs_get_size(cs) * sizeof(uint32_t),
       .offset = tu_cs_get_offset(cs) * sizeof(uint32_t),
    };
+
+   cs->start = cs->cur;
+
+   return entry;
 }
 
 /**