mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +01:00
i965: Move intel_context::has_swizzling to brw_context.
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>
This commit is contained in:
parent
02128c448d
commit
d5b4a3f5a3
5 changed files with 7 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -125,7 +125,6 @@ struct intel_context
|
|||
bool must_use_separate_stencil;
|
||||
bool has_hiz;
|
||||
bool has_llc;
|
||||
bool has_swizzling;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue