i965: Move intel_context::max_gtt_map_object_size to brw_context.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 3 Jul 2013 21:44:07 +0000 (14:44 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 9 Jul 2013 21:09:16 +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_context.c
src/mesa/drivers/dri/i965/intel_context.h
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index d1086440444cf8e8859963faa3d06b7a7f4c24db..ce639d731e308de916446bbb207f39cd2b51f27d 100644 (file)
@@ -865,6 +865,8 @@ struct brw_context
     */
    bool perf_debug;
 
+   uint32_t max_gtt_map_object_size;
+
    bool emit_state_always;
    bool has_surface_tile_offset;
    bool has_compr4;
index 2839d6dd91ab4bbc2dac73debba4a090aca2e6d8..1d6aac8d6cc459405b15db32a81229f754f5a4fe 100644 (file)
@@ -523,7 +523,7 @@ intelInitContext(struct brw_context *brw,
     * taken up by things like the framebuffer and the ringbuffer and such, so
     * be more conservative.
     */
-   intel->max_gtt_map_object_size = gtt_size / 4;
+   brw->max_gtt_map_object_size = gtt_size / 4;
 
    brw->bufmgr = intelScreen->bufmgr;
 
index 2713eb852a6855cc7347b45dc4224f2aa5ee5a33..ae0bc93d011e7e121c15002a2bbeec48f3354b0b 100644 (file)
@@ -137,8 +137,6 @@ struct intel_context
       char buffer[4096];
    } upload;
 
-   uint32_t max_gtt_map_object_size;
-
    int driFd;
 
    __DRIcontext *driContext;
index 6ad8044d8c08277caf08031e73c0d245c92e141f..cc3145c7580f47e6ee64f25acf2a7166d69aa7f9 100644 (file)
@@ -571,7 +571,7 @@ intel_miptree_create(struct brw_context *brw,
     * BLT engine to support it.  The BLT paths can't currently handle Y-tiling,
     * so we need to fall back to X.
     */
-   if (y_or_x && mt->region->bo->size >= intel->max_gtt_map_object_size) {
+   if (y_or_x && mt->region->bo->size >= brw->max_gtt_map_object_size) {
       perf_debug("%dx%d miptree larger than aperture; falling back to X-tiled\n",
                  mt->total_width, mt->total_height);
       intel_region_release(&mt->region);
@@ -2146,7 +2146,7 @@ intel_miptree_map_singlesample(struct brw_context *brw,
             mt->region->pitch < 32768) {
       intel_miptree_map_blit(brw, mt, map, level, slice);
    } else if (mt->region->tiling != I915_TILING_NONE &&
-              mt->region->bo->size >= intel->max_gtt_map_object_size) {
+              mt->region->bo->size >= brw->max_gtt_map_object_size) {
       assert(mt->region->pitch < 32768);
       intel_miptree_map_blit(brw, mt, map, level, slice);
    } else {