iris: Resolves for compute
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Dec 2018 03:08:40 +0000 (19:08 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:12 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_draw.c

index 4d2ea3a03e805666182953bb37ef79bf88938a63..12637fd41f38006ca232f997d02ab363fd9c0ea2 100644 (file)
@@ -177,13 +177,19 @@ iris_launch_grid(struct pipe_context *ctx, const struct pipe_grid_info *grid)
    if (unlikely(INTEL_DEBUG & DEBUG_REEMIT))
       ice->state.dirty |= IRIS_ALL_DIRTY_FOR_COMPUTE;
 
+   /* We can't do resolves on the compute engine, so awkwardly, we have to
+    * do them on the render batch...
+    */
+   for (gl_shader_stage stage = 0; stage < MESA_SHADER_STAGES; stage++) {
+      iris_predraw_resolve_inputs(ice, &ice->batches[IRIS_BATCH_RENDER],
+                                  &ice->state.shaders[stage], NULL, false);
+   }
+
    iris_batch_maybe_flush(batch, 1500);
 
    //if (dirty & IRIS_DIRTY_UNCOMPILED_CS)
       iris_update_compiled_compute_shader(ice);
 
-   // XXX: predraw resolves / cache flushing
-
    iris_update_grid_size_resource(ice, grid);
 
    iris_binder_reserve_compute(ice);