From: Kenneth Graunke Date: Sat, 20 Jan 2018 02:25:55 +0000 (-0800) Subject: iris: make an ice->render_batch field X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86e0c08b143d04974032a7024989e68e33d9455a;p=mesa.git iris: make an ice->render_batch field we may want a second one for transfers --- diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 7ecdfb058ce..6652510a364 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -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? diff --git a/src/gallium/drivers/iris/iris_draw.c b/src/gallium/drivers/iris/iris_draw.c index afeb149c95b..72537ccb262 100644 --- a/src/gallium/drivers/iris/iris_draw.c +++ b/src/gallium/drivers/iris/iris_draw.c @@ -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); } diff --git a/src/gallium/drivers/iris/iris_pipe.c b/src/gallium/drivers/iris/iris_pipe.c index ec7ff5244eb..0aa14c0c0d0 100644 --- a/src/gallium/drivers/iris/iris_pipe.c +++ b/src/gallium/drivers/iris/iris_pipe.c @@ -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;