diff options
author | Kenneth Graunke <[email protected]> | 2013-07-03 15:00:34 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-07-09 14:09:25 -0700 |
commit | d5b4a3f5a34626e9841993900922384698ee61b8 (patch) | |
tree | 2bc01b1281bf5cc6afd54a173ee61d7778bd1e36 /src | |
parent | 02128c448d1f4eedf70b3bdb4ec187cf405c530e (diff) |
i965: Move intel_context::has_swizzling to brw_context.
Signed-off-by: Kenneth Graunke <[email protected]>
Acked-by: Chris Forbes <[email protected]>
Acked-by: Paul Berry <[email protected]>
Acked-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_subimage.c | 2 |
5 files changed, 7 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 659f7bf3a52..9c242a0d0f2 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -876,6 +876,7 @@ struct brw_context uint32_t max_gtt_map_object_size; bool emit_state_always; + bool has_swizzling; bool has_surface_tile_offset; bool has_compr4; bool has_negative_rhw_bug; diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 626eab723d2..c9a5897ec5f 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -499,7 +499,7 @@ intelInitContext(struct brw_context *brw, intel->must_use_separate_stencil = brw->intelScreen->hw_must_use_separate_stencil; intel->has_hiz = intel->gen >= 6; intel->has_llc = brw->intelScreen->hw_has_llc; - intel->has_swizzling = brw->intelScreen->hw_has_swizzling; + brw->has_swizzling = brw->intelScreen->hw_has_swizzling; memset(&ctx->TextureFormatSupported, 0, sizeof(ctx->TextureFormatSupported)); diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 406f3f566c9..3ca78c989f3 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -125,7 +125,6 @@ struct intel_context bool must_use_separate_stencil; bool has_hiz; bool has_llc; - bool has_swizzling; }; /** diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index c361914fa13..8af99367271 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -1787,7 +1787,6 @@ intel_miptree_map_s8(struct brw_context *brw, struct intel_miptree_map *map, unsigned int level, unsigned int slice) { - struct intel_context *intel = &brw->intel; map->stride = map->w; map->buffer = map->ptr = malloc(map->stride * map->h); if (!map->buffer) @@ -1810,7 +1809,7 @@ intel_miptree_map_s8(struct brw_context *brw, ptrdiff_t offset = intel_offset_S8(mt->region->pitch, x + image_x + map->x, y + image_y + map->y, - intel->has_swizzling); + brw->has_swizzling); untiled_s8_map[y * map->w + x] = tiled_s8_map[offset]; } } @@ -1834,7 +1833,6 @@ intel_miptree_unmap_s8(struct brw_context *brw, unsigned int level, unsigned int slice) { - struct intel_context *intel = &brw->intel; if (map->mode & GL_MAP_WRITE_BIT) { unsigned int image_x, image_y; uint8_t *untiled_s8_map = map->ptr; @@ -1847,7 +1845,7 @@ intel_miptree_unmap_s8(struct brw_context *brw, ptrdiff_t offset = intel_offset_S8(mt->region->pitch, x + map->x, y + map->y, - intel->has_swizzling); + brw->has_swizzling); tiled_s8_map[offset] = untiled_s8_map[y * map->w + x]; } } @@ -1927,7 +1925,6 @@ intel_miptree_map_depthstencil(struct brw_context *brw, struct intel_miptree_map *map, unsigned int level, unsigned int slice) { - struct intel_context *intel = &brw->intel; struct intel_mipmap_tree *z_mt = mt; struct intel_mipmap_tree *s_mt = mt->stencil_mt; bool map_z32f_x24s8 = mt->format == MESA_FORMAT_Z32_FLOAT; @@ -1961,7 +1958,7 @@ intel_miptree_map_depthstencil(struct brw_context *brw, ptrdiff_t s_offset = intel_offset_S8(s_mt->region->pitch, map_x + s_image_x, map_y + s_image_y, - intel->has_swizzling); + brw->has_swizzling); ptrdiff_t z_offset = ((map_y + z_image_y) * (z_mt->region->pitch / 4) + (map_x + z_image_x)); @@ -2000,7 +1997,6 @@ intel_miptree_unmap_depthstencil(struct brw_context *brw, unsigned int level, unsigned int slice) { - struct intel_context *intel = &brw->intel; struct intel_mipmap_tree *z_mt = mt; struct intel_mipmap_tree *s_mt = mt->stencil_mt; bool map_z32f_x24s8 = mt->format == MESA_FORMAT_Z32_FLOAT; @@ -2022,7 +2018,7 @@ intel_miptree_unmap_depthstencil(struct brw_context *brw, ptrdiff_t s_offset = intel_offset_S8(s_mt->region->pitch, x + s_image_x + map->x, y + s_image_y + map->y, - intel->has_swizzling); + brw->has_swizzling); ptrdiff_t z_offset = ((y + z_image_y) * (z_mt->region->pitch / 4) + (x + z_image_x)); diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c index 008ac8d7efc..1e4e98c2d7c 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c @@ -268,7 +268,7 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx, + (x_pixels % tile_width_pixels) * cpp; intptr_t offset_bytes = y_offset_bytes + x_offset_bytes; - if (intel->has_swizzling) { + if (brw->has_swizzling) { #if 0 /* Clear, unoptimized version. */ bool bit6 = (offset_bytes >> 6) & 1; |