i965: Move intel_context::has_llc to brw_context.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 6 Jul 2013 07:20:25 +0000 (00:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 9 Jul 2013 21:09:33 +0000 (14:09 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Paul Berry <stereotype441@gmail.com>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_context.c
src/mesa/drivers/dri/i965/intel_context.h
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_tex_subimage.c

index c6e75d562a512caccf80f50ea99af936a2ea8bb5..d5c60602e4f4fd963b34fb2134f6aa5ff91a2fb0 100644 (file)
@@ -884,6 +884,7 @@ 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 ea85066fdff8d7424b9b5c581a86a85ac052db4c..e40fe5224a105950b4d9a33b9e1883da15b6ed9e 100644 (file)
@@ -71,7 +71,7 @@ intel_batchbuffer_init(struct brw_context *brw)
                                                      4096, 4096);
    }
 
-   if (!intel->has_llc) {
+   if (!brw->has_llc) {
       brw->batch.cpu_map = malloc(BATCH_SZ);
       brw->batch.map = brw->batch.cpu_map;
    }
@@ -80,7 +80,6 @@ intel_batchbuffer_init(struct brw_context *brw)
 static void
 intel_batchbuffer_reset(struct brw_context *brw)
 {
-   struct intel_context *intel = &brw->intel;
    if (brw->batch.last_bo != NULL) {
       drm_intel_bo_unreference(brw->batch.last_bo);
       brw->batch.last_bo = NULL;
@@ -91,7 +90,7 @@ intel_batchbuffer_reset(struct brw_context *brw)
 
    brw->batch.bo = drm_intel_bo_alloc(brw->bufmgr, "batchbuffer",
                                        BATCH_SZ, 4096);
-   if (intel->has_llc) {
+   if (brw->has_llc) {
       drm_intel_bo_map(brw->batch.bo, true);
       brw->batch.map = brw->batch.bo->virtual;
    }
@@ -181,7 +180,7 @@ do_flush_locked(struct brw_context *brw)
    struct intel_batchbuffer *batch = &brw->batch;
    int ret = 0;
 
-   if (intel->has_llc) {
+   if (brw->has_llc) {
       drm_intel_bo_unmap(batch->bo);
    } else {
       ret = drm_intel_bo_subdata(batch->bo, 0, 4*batch->used, batch->map);
index a3c1042e5f89e80401f35567796875d54c5a9a5b..f2717c45090f1baee814568b6e3eef58ce4dfdd9 100644 (file)
@@ -498,7 +498,7 @@ intelInitContext(struct brw_context *brw,
    brw->has_separate_stencil = brw->intelScreen->hw_has_separate_stencil;
    brw->must_use_separate_stencil = brw->intelScreen->hw_must_use_separate_stencil;
    brw->has_hiz = intel->gen >= 6;
-   intel->has_llc = brw->intelScreen->hw_has_llc;
+   brw->has_llc = brw->intelScreen->hw_has_llc;
    brw->has_swizzling = brw->intelScreen->hw_has_swizzling;
 
    memset(&ctx->TextureFormatSupported,
index 9194d0db04ce4132d3ef5bb698a9455b0dfb15d5..ade9f32c16d2e5b8d0880deb71798d5c4a7ddb85 100644 (file)
@@ -118,7 +118,6 @@ struct intel_context
     */
    int gen;
    int gt;
-   bool has_llc;
 };
 
 /**
index a14b28796e578cd0d66ad4a23f9226454f530266..25ba85bff2ac616810029fd96dd3c814389e541f 100644 (file)
@@ -2130,7 +2130,7 @@ intel_miptree_map_singlesample(struct brw_context *brw,
       intel_miptree_map_depthstencil(brw, mt, map, level, slice);
    }
    /* See intel_miptree_blit() for details on the 32k pitch limit. */
-   else if (intel->has_llc &&
+   else if (brw->has_llc &&
             !(mode & GL_MAP_WRITE_BIT) &&
             !mt->compressed &&
             (mt->region->tiling == I915_TILING_X ||
index 1e4e98c2d7c5f7c2e4da1cd4e2cd6071cb57c2ad..5604a7d8e79a59fdf69f0d6b069359abb35e50b2 100644 (file)
@@ -170,7 +170,6 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
                                bool for_glTexImage)
 {
    struct brw_context *brw = brw_context(ctx);
-   struct intel_context *intel = intel_context(ctx);
    struct intel_texture_image *image = intel_texture_image(texImage);
 
    /* The miptree's buffer. */
@@ -182,7 +181,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
     * a 2D BGRA texture. It could be generalized to support more types by
     * varying the arithmetic loop below.
     */
-   if (!intel->has_llc ||
+   if (!brw->has_llc ||
        format != GL_BGRA ||
        type != GL_UNSIGNED_BYTE ||
        texImage->TexFormat != MESA_FORMAT_ARGB8888 ||