i965: drop brw->has_llc in favor of devinfo->has_llc
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Aug 2017 08:29:11 +0000 (09:29 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Aug 2017 16:59:18 +0000 (17:59 +0100)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_pixel_read.c
src/mesa/drivers/dri/i965/intel_tex_image.c
src/mesa/drivers/dri/i965/intel_tex_subimage.c

index 9443f38dd84d84fb07cbe2a032da959977cc929c..2cd05b49ad767035857def7479d4d0a4a732061c 100644 (file)
@@ -858,7 +858,6 @@ brwCreateContext(gl_api api,
    brw->screen = screen;
    brw->bufmgr = screen->bufmgr;
 
-   brw->has_llc = devinfo->has_llc;
    brw->has_hiz = devinfo->has_hiz_and_separate_stencil;
    brw->has_separate_stencil = devinfo->has_hiz_and_separate_stencil;
    brw->has_pln = devinfo->has_pln;
index 0e37a4766c28bdfcca04cdd8a969abbf25d8be55..7e2673ece3fff5769185d87bdac2f4afb1388afb 100644 (file)
@@ -749,7 +749,6 @@ struct brw_context
    bool has_hiz;
    bool has_separate_stencil;
    bool must_use_separate_stencil;
-   bool has_llc;
    bool has_swizzling;
    bool has_surface_tile_offset;
    bool has_compr4;
index c7d7029fbd0e1bd926b7241dc55c78c6820586c1..6a0490149526d261132ff195c1153d3ef7af6dae 100644 (file)
@@ -178,7 +178,9 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch,
 static void
 intel_batchbuffer_reset_and_clear_render_cache(struct brw_context *brw)
 {
-   intel_batchbuffer_reset(&brw->batch, brw->bufmgr, brw->has_llc);
+   const struct gen_device_info *devinfo = &brw->screen->devinfo;
+
+   intel_batchbuffer_reset(&brw->batch, brw->bufmgr, devinfo->has_llc);
    brw_render_cache_set_clear(brw);
 }
 
@@ -634,7 +636,7 @@ do_flush_locked(struct brw_context *brw, int in_fence_fd, int *out_fence_fd)
    struct intel_batchbuffer *batch = &brw->batch;
    int ret = 0;
 
-   if (brw->has_llc) {
+   if (devinfo->has_llc) {
       brw_bo_unmap(batch->bo);
    } else {
       ret = brw_bo_subdata(batch->bo, 0, 4 * USED_BATCH(*batch), batch->map);
index ed18d2a8230822b1cfe955d80884df36c4ee6e99..9e2ca5449024f4a1ed586afa80761516ae3eeaf3 100644 (file)
@@ -3573,7 +3573,7 @@ use_intel_mipree_map_blit(struct brw_context *brw,
 {
    const struct gen_device_info *devinfo = &brw->screen->devinfo;
 
-   if (brw->has_llc &&
+   if (devinfo->has_llc &&
       /* It's probably not worth swapping to the blit ring because of
        * all the overhead involved.
        */
index c2ffb56c77a6dd0fbe89ec8183189dc81b3b468b..8304358f0344c735102b1a8610757a75f058e93d 100644 (file)
@@ -92,7 +92,7 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
     * a 2D BGRA, RGBA, L8 or A8 texture. It could be generalized to support
     * more types.
     */
-   if (!brw->has_llc ||
+   if (!devinfo->has_llc ||
        !(type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) ||
        pixels == NULL ||
        _mesa_is_bufferobj(pack->BufferObj) ||
index 39c1c9a454a2c5c31d56eaa06c251aaafa445513..4661581244e27c8c1db400ada20edaed5444da5b 100644 (file)
@@ -401,7 +401,7 @@ intel_gettexsubimage_tiled_memcpy(struct gl_context *ctx,
     * with _mesa_image_row_stride. However, before removing the restrictions
     * we need tests.
     */
-   if (!brw->has_llc ||
+   if (!devinfo->has_llc ||
        !(type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) ||
        !(texImage->TexObject->Target == GL_TEXTURE_2D ||
          texImage->TexObject->Target == GL_TEXTURE_RECTANGLE) ||
index 42f24bec6678d428c23508e4325faee45b158adb..8ccbf4f645004e63903e60570eab1c415698e723 100644 (file)
@@ -99,7 +99,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
     * with _mesa_image_row_stride. However, before removing the restrictions
     * we need tests.
     */
-   if (!brw->has_llc ||
+   if (!devinfo->has_llc ||
        !(type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) ||
        !(texImage->TexObject->Target == GL_TEXTURE_2D ||
          texImage->TexObject->Target == GL_TEXTURE_RECTANGLE) ||