Revert "i965/batch: avoid reverting batch buffer if saved state is an empty"
authorMark Janes <mark.a.janes@intel.com>
Thu, 1 Nov 2018 22:44:45 +0000 (15:44 -0700)
committerMark Janes <mark.a.janes@intel.com>
Thu, 1 Nov 2018 23:28:05 +0000 (16:28 -0700)
This reverts commit a9031bf9b55602d93cccef6c926e2179c23205b4.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108630

src/mesa/drivers/dri/i965/brw_compute.c
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/genX_blorp_exec.c
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_batchbuffer.h

index 5c8e3a5d4de463fd1f5615dc5af97be5fb534697..de08fc3ac160262e3163c4096f2fa39d288b1556 100644 (file)
@@ -167,7 +167,7 @@ static void
 brw_dispatch_compute_common(struct gl_context *ctx)
 {
    struct brw_context *brw = brw_context(ctx);
-   bool fail_next;
+   bool fail_next = false;
 
    if (!_mesa_check_conditional_render(ctx))
       return;
@@ -185,7 +185,6 @@ brw_dispatch_compute_common(struct gl_context *ctx)
    intel_batchbuffer_require_space(brw, 600);
    brw_require_statebuffer_space(brw, 2500);
    intel_batchbuffer_save_state(brw);
-   fail_next = intel_batchbuffer_saved_state_is_empty(brw);
 
  retry:
    brw->batch.no_wrap = true;
index 19ee3962d740647092fe02fb063cf56dab0b5f50..8536c040109bd3053a340d12854c653d45e0485b 100644 (file)
@@ -885,7 +885,7 @@ brw_draw_single_prim(struct gl_context *ctx,
 {
    struct brw_context *brw = brw_context(ctx);
    const struct gen_device_info *devinfo = &brw->screen->devinfo;
-   bool fail_next;
+   bool fail_next = false;
 
    /* Flag BRW_NEW_DRAW_CALL on every draw.  This allows us to have
     * atoms that happen on every draw call.
@@ -898,7 +898,6 @@ brw_draw_single_prim(struct gl_context *ctx,
    intel_batchbuffer_require_space(brw, 1500);
    brw_require_statebuffer_space(brw, 2400);
    intel_batchbuffer_save_state(brw);
-   fail_next = intel_batchbuffer_saved_state_is_empty(brw);
 
    if (brw->num_instances != prim->num_instances ||
        brw->basevertex != prim->basevertex ||
index fd9ce93c6c7d006f41328ca76ce79c0e6fc66c1b..34bfcad03ebb2c8a1c269db0cf39f9b90a80e7c7 100644 (file)
@@ -268,7 +268,7 @@ genX(blorp_exec)(struct blorp_batch *batch,
    assert(batch->blorp->driver_ctx == batch->driver_batch);
    struct brw_context *brw = batch->driver_batch;
    struct gl_context *ctx = &brw->ctx;
-   bool check_aperture_failed_once;
+   bool check_aperture_failed_once = false;
 
 #if GEN_GEN >= 11
    /* The PIPE_CONTROL command description says:
@@ -309,7 +309,6 @@ retry:
    intel_batchbuffer_require_space(brw, 1400);
    brw_require_statebuffer_space(brw, 600);
    intel_batchbuffer_save_state(brw);
-   check_aperture_failed_once = intel_batchbuffer_saved_state_is_empty(brw);
    brw->batch.no_wrap = true;
 
 #if GEN_GEN == 6
index 6207de5a06f11a6f29f7d32bac0f4e8d29ee3b8f..8b769eaf53465c568adf9ec5e4db260d03f26c1b 100644 (file)
@@ -301,13 +301,6 @@ intel_batchbuffer_save_state(struct brw_context *brw)
    brw->batch.saved.exec_count = brw->batch.exec_count;
 }
 
-bool
-intel_batchbuffer_saved_state_is_empty(struct brw_context *brw)
-{
-   struct intel_batchbuffer *batch = &brw->batch;
-   return (batch->saved.map_next == batch->batch.map);
-}
-
 void
 intel_batchbuffer_reset_to_saved(struct brw_context *brw)
 {
index 91720dad5b4674eb4d92ba95467aa8de15ad745e..0632142cd318decc7faea9b5991f068245380d27 100644 (file)
@@ -24,7 +24,6 @@ struct intel_batchbuffer;
 void intel_batchbuffer_init(struct brw_context *brw);
 void intel_batchbuffer_free(struct intel_batchbuffer *batch);
 void intel_batchbuffer_save_state(struct brw_context *brw);
-bool intel_batchbuffer_saved_state_is_empty(struct brw_context *brw);
 void intel_batchbuffer_reset_to_saved(struct brw_context *brw);
 void intel_batchbuffer_require_space(struct brw_context *brw, GLuint sz);
 int _intel_batchbuffer_flush_fence(struct brw_context *brw,