iris: Use the URB size from the L3$ config
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 17 Jan 2020 20:22:58 +0000 (14:22 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 31 Jan 2020 00:46:14 +0000 (18:46 -0600)
Cc: "20.0" mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>

src/gallium/drivers/iris/iris_context.c
src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_state.c

index e7b3a06a315eee689a21a647ee59472599b53b38..dc2a09a57c8e5892dc369ba03e7a69fa4a82cb7b 100644 (file)
@@ -264,8 +264,6 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
    ctx->get_device_reset_status = iris_get_device_reset_status;
    ctx->get_sample_position = iris_get_sample_position;
 
-   ice->shaders.urb_size = devinfo->urb.size;
-
    iris_init_context_fence_functions(ctx);
    iris_init_blit_functions(ctx);
    iris_init_clear_functions(ctx);
index 50300f9c2a69c7d765177fcd964fddbed11fb3a4..b5c3f78da2847c114e54602292e330e17f60e7fc 100644 (file)
@@ -667,8 +667,6 @@ struct iris_context {
       struct u_upload_mgr *uploader;
       struct hash_table *cache;
 
-      unsigned urb_size;
-
       /** Is a GS or TES outputting points or lines? */
       bool output_topology_is_points_or_lines;
 
index d6413faa8b1b94153f9d0fef1f4a62b093a58f32..9467f5d17421f92ab56cbcb7308a02f5557296cf 100644 (file)
@@ -7225,6 +7225,7 @@ genX(emit_urb_setup)(struct iris_context *ice,
                      bool tess_present, bool gs_present)
 {
    const struct gen_device_info *devinfo = &batch->screen->devinfo;
+   const struct gen_l3_config *l3_config = batch->screen->l3_config_3d;
    const unsigned push_size_kB = 32;
    unsigned entries[4];
    unsigned start[4];
@@ -7232,7 +7233,7 @@ genX(emit_urb_setup)(struct iris_context *ice,
    ice->shaders.last_vs_entry_size = size[MESA_SHADER_VERTEX];
 
    gen_get_urb_config(devinfo, 1024 * push_size_kB,
-                      1024 * ice->shaders.urb_size,
+                      1024 * gen_get_l3_config_urb_size(devinfo, l3_config),
                       tess_present, gs_present,
                       size, entries, start);