diff options
author | Eric Anholt <[email protected]> | 2010-03-16 16:05:53 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-03-25 17:30:37 -0700 |
commit | 57e793644f8b1c229703ac69ef2ee5d26cb282c9 (patch) | |
tree | d3da4b200de7fff1b5b12a644b490fc412b4af0b /src/mesa/drivers/dri | |
parent | 4980891252f35a2c87ef302b40d7536327a9babd (diff) |
intel: Remove extra tiling setting after allocating a tiled region.
(cherry picked from commit 32f143b4327521a058dc05f0ab9087a5696b9618)
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_regions.c | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_regions.h | 1 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c index 563baa36c46..9b075d22edc 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.c +++ b/src/mesa/drivers/dri/intel/intel_regions.c @@ -164,7 +164,6 @@ intel_region_alloc_internal(struct intel_context *intel, /* Default to no tiling */ region->tiling = I915_TILING_NONE; - region->bit_6_swizzle = I915_BIT_6_SWIZZLE_NONE; _DBG("%s <-- %p\n", __FUNCTION__, region); return region; @@ -194,12 +193,7 @@ intel_region_alloc(struct intel_context *intel, region = intel_region_alloc_internal(intel, cpp, width, height, pitch, buffer); - - if (tiling != I915_TILING_NONE) { - assert(((pitch * cpp) & 127) == 0); - drm_intel_bo_set_tiling(buffer, &tiling, pitch * cpp); - drm_intel_bo_get_tiling(buffer, ®ion->tiling, ®ion->bit_6_swizzle); - } + region->tiling = tiling; return region; } @@ -213,6 +207,7 @@ intel_region_alloc_for_handle(struct intel_context *intel, struct intel_region *region, *dummy; dri_bo *buffer; int ret; + uint32_t bit_6_swizzle; region = _mesa_HashLookup(intel->intelScreen->named_regions, handle); if (region != NULL) { @@ -236,7 +231,7 @@ intel_region_alloc_for_handle(struct intel_context *intel, return region; ret = dri_bo_get_tiling(region->buffer, ®ion->tiling, - ®ion->bit_6_swizzle); + &bit_6_swizzle); if (ret != 0) { fprintf(stderr, "Couldn't get tiling of buffer %d (%s): %s\n", handle, name, strerror(-ret)); diff --git a/src/mesa/drivers/dri/intel/intel_regions.h b/src/mesa/drivers/dri/intel/intel_regions.h index 7ee6a988eae..af5e52f5df0 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.h +++ b/src/mesa/drivers/dri/intel/intel_regions.h @@ -65,7 +65,6 @@ struct intel_region GLuint draw_x, draw_y; /**< Offset of drawing within the region */ uint32_t tiling; /**< Which tiling mode the region is in */ - uint32_t bit_6_swizzle; /**< GEM flag for address swizzling requirement */ struct intel_buffer_object *pbo; /* zero-copy uploads */ uint32_t name; /**< Global name for the bo */ |