summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2019-03-28 10:49:45 +0200
committerKenneth Graunke <[email protected]>2019-04-04 13:36:51 -0700
commit61cc37937140dc441bd0625233f82ef84085f967 (patch)
treea3ff7f3ba5d5722ca4a32ac4d6fa28fb7389012c /src/gallium
parent8d9e169bdd46c028fd14af90bfb1be40e744c31a (diff)
iris: move iris_flush_resource so we can call it from get_handle
Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index c16fc8eb015..d0a473fd72a 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -815,6 +815,21 @@ fail:
return NULL;
}
+static void
+iris_flush_resource(struct pipe_context *ctx, struct pipe_resource *resource)
+{
+ struct iris_context *ice = (struct iris_context *)ctx;
+ struct iris_batch *render_batch = &ice->batches[IRIS_BATCH_RENDER];
+ struct iris_resource *res = (void *) resource;
+ const struct isl_drm_modifier_info *mod = res->mod_info;
+
+ iris_resource_prepare_access(ice, render_batch, res,
+ 0, INTEL_REMAINING_LEVELS,
+ 0, INTEL_REMAINING_LAYERS,
+ mod ? mod->aux_usage : ISL_AUX_USAGE_NONE,
+ mod ? mod->supports_clear_color : false);
+}
+
static boolean
iris_resource_get_handle(struct pipe_screen *pscreen,
struct pipe_context *ctx,
@@ -1385,21 +1400,6 @@ iris_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer *xfer)
slab_free(&ice->transfer_pool, map);
}
-static void
-iris_flush_resource(struct pipe_context *ctx, struct pipe_resource *resource)
-{
- struct iris_context *ice = (struct iris_context *)ctx;
- struct iris_batch *render_batch = &ice->batches[IRIS_BATCH_RENDER];
- struct iris_resource *res = (void *) resource;
- const struct isl_drm_modifier_info *mod = res->mod_info;
-
- iris_resource_prepare_access(ice, render_batch, res,
- 0, INTEL_REMAINING_LEVELS,
- 0, INTEL_REMAINING_LAYERS,
- mod ? mod->aux_usage : ISL_AUX_USAGE_NONE,
- mod ? mod->supports_clear_color : false);
-}
-
void
iris_flush_and_dirty_for_history(struct iris_context *ice,
struct iris_batch *batch,