Revert "anv: limit URB reconfigurations when using blorp"
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 27 Apr 2019 03:35:32 +0000 (11:35 +0800)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 29 Apr 2019 11:41:27 +0000 (11:41 +0000)
In commit 0d46e404 ("anv: limit URB reconfigurations when using
blorp") we tried to limit the number of URB reconfiguration by
checking if the last allocation is large enough to fit the blorp
dispatch.

We used the last bound pipeline to compare the allocation. The problem
with this is that the pipeline is bound but its commands might not
have been emitted into the command buffer yet.

Let's just revert commit 0d46e404677264bfb12ada15290e39c10a5eb455
since it didn't seem to yield any performance improvement.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0d46e404 ("anv: limit URB reconfigurations when using blorp")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110535
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_blorp_exec.c
src/intel/vulkan/genX_pipeline.c

index 1916104197a97ab6e995ae13384a6b0c775c78de..f1875aa7642146abac67b21479ea5b3bb412e265 100644 (file)
@@ -2747,7 +2747,6 @@ struct anv_pipeline {
    struct {
       const struct gen_l3_config *              l3_config;
       uint32_t                                  total_size;
-      unsigned                                  entry_size[4];
    } urb;
 
    VkShaderStageFlags                           active_stages;
index 852353cab2a67ee7ec5244c28de0e4308e42bf64..1592e7f7e3d49fabb9e749f10469ec4ae2367eff 100644 (file)
@@ -202,13 +202,6 @@ blorp_emit_urb_config(struct blorp_batch *batch,
 
    assert(sf_entry_size == 0);
 
-   /* If the last used gfx pipeline in the command buffer has enough VS URB
-    * space for what the blorp operation needs, skip reconfiguration.
-    */
-   if (cmd_buffer->state.gfx.base.pipeline &&
-       cmd_buffer->state.gfx.base.pipeline->urb.entry_size[MESA_SHADER_VERTEX] >= vs_entry_size)
-      return;
-
    const unsigned entry_size[4] = { vs_entry_size, 1, 1, 1 };
 
    genX(emit_urb_setup)(device, &cmd_buffer->batch,
index f2b7faca4a2e3cd89bf81c7615849487aaa82a3a..0b58dce05b0d52ace091cac1d3001c10e6a40f09 100644 (file)
@@ -308,18 +308,18 @@ genX(emit_urb_setup)(struct anv_device *device, struct anv_batch *batch,
 static void
 emit_urb_setup(struct anv_pipeline *pipeline)
 {
+   unsigned entry_size[4];
    for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {
       const struct brw_vue_prog_data *prog_data =
          !anv_pipeline_has_stage(pipeline, i) ? NULL :
          (const struct brw_vue_prog_data *) pipeline->shaders[i]->prog_data;
 
-      pipeline->urb.entry_size[i] = prog_data ? prog_data->urb_entry_size : 1;
+      entry_size[i] = prog_data ? prog_data->urb_entry_size : 1;
    }
 
    genX(emit_urb_setup)(pipeline->device, &pipeline->batch,
                         pipeline->urb.l3_config,
-                        pipeline->active_stages,
-                        pipeline->urb.entry_size);
+                        pipeline->active_stages, entry_size);
 }
 
 static void