iris: make an ice->render_batch field
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 20 Jan 2018 02:25:55 +0000 (18:25 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
we may want a second one for transfers

src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_draw.c
src/gallium/drivers/iris/iris_pipe.c

index 7ecdfb058ceb73e70c3b52f78360fc73a939d2ab..6652510a364de7749fa3fe5d076323f25f39793c 100644 (file)
@@ -27,6 +27,7 @@
 #include "pipe/p_state.h"
 #include "util/u_debug.h"
 #include "intel/common/gen_debug.h"
+#include "iris_batch.h"
 #include "iris_screen.h"
 
 struct iris_bo;
@@ -75,6 +76,9 @@ struct iris_context {
 
    struct iris_uncompiled_shader *progs[MESA_SHADER_STAGES];
 
+   /** The main batch for rendering */
+   struct iris_batch render_batch;
+
    struct {
       uint64_t dirty;
       unsigned num_viewports; // XXX: can viewports + scissors be different?
index afeb149c95b2c9c21c85b7e04779c5a6b5810de7..72537ccb26291f6a61466c554f6ea102a907b8e5 100644 (file)
@@ -37,6 +37,5 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
    struct iris_context *ice = (struct iris_context *) ctx;
 
    iris_update_compiled_shaders(ice);
-   //iris_upload_render_state(ice, &ice->batch, info);
-   iris_upload_render_state(ice, NULL, info);
+   iris_upload_render_state(ice, &ice->render_batch, info);
 }
index ec7ff5244eb7ed368f63d649e0ebd7c9e5458279..0aa14c0c0d0617a09a59961da7dda674a3087603 100644 (file)
@@ -129,12 +129,10 @@ iris_transfer_map(struct pipe_context *ctx,
    transfer->layer_stride = 1;
    *ptransfer = transfer;
 
-#if 0
    if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
-       iris_batch_references(&ice->batch, res->bo)) {
-      iris_batch_flush(&ice->batch);
+       iris_batch_references(&ice->render_batch, res->bo)) {
+      iris_batch_flush(&ice->render_batch);
    }
-#endif
 
    if ((usage & PIPE_TRANSFER_DONTBLOCK) && iris_bo_busy(res->bo))
       return NULL;