iris: BIG OL' HACK for UBO updates
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 25 Jul 2018 22:09:50 +0000 (15:09 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:08 +0000 (10:26 -0800)
We need to re-push data when UBO changes.  This will need to be replaced
with a usage history based flushing system later.

src/gallium/drivers/iris/iris_resource.c

index e45e502667170c44314000f793a16c1968655d04..1380221912307e4bebc9199313fccdbbf61992c6 100644 (file)
@@ -588,10 +588,21 @@ iris_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer *xfer)
 {
    struct iris_context *ice = (struct iris_context *)ctx;
    struct iris_transfer *map = (void *) xfer;
+   struct iris_resource *res = (struct iris_resource *) xfer->resource;
+   struct isl_surf *surf = &res->surf;
 
    if (map->unmap)
       map->unmap(map);
 
+   /* XXX: big ol' hack!  need to re-emit UBOs.  want bind_history? */
+   if (surf->tiling == ISL_TILING_LINEAR) {
+      ice->state.dirty |= IRIS_DIRTY_CONSTANTS_VS  | IRIS_DIRTY_BINDINGS_VS
+                       |  IRIS_DIRTY_CONSTANTS_TCS | IRIS_DIRTY_BINDINGS_TCS
+                       |  IRIS_DIRTY_CONSTANTS_TES | IRIS_DIRTY_BINDINGS_TES
+                       |  IRIS_DIRTY_CONSTANTS_GS  | IRIS_DIRTY_BINDINGS_GS
+                       |  IRIS_DIRTY_CONSTANTS_FS  | IRIS_DIRTY_BINDINGS_FS;
+   }
+
    pipe_resource_reference(&xfer->resource, NULL);
    slab_free(&ice->transfer_pool, map);
 }