From f3dd70182d0da93812efcc79a9e6854aceb594f5 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 25 Jul 2018 15:09:50 -0700 Subject: [PATCH] iris: BIG OL' HACK for UBO updates 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index e45e5026671..13802219123 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -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); } -- 2.30.2