diff options
author | Matt Turner <[email protected]> | 2015-08-04 22:58:08 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-08-06 12:33:25 -0700 |
commit | 1c175fc2e3a685b531920dec247086463ab9a154 (patch) | |
tree | 326d2951fa6aca4c87e78d070a0583cad0f3f620 /src/mesa/drivers | |
parent | 3d551c5c7036b650124f23e4e2e3f40b9a8ad426 (diff) |
i965: Correct a mistake that always forced texture tiling.
Regression since commit 3a31876600, when tiling modes were moved into
layout_flags.
The relevant enum values are
MIPTREE_LAYOUT_ALLOC_YTILED = 1 << 5
MIPTREE_LAYOUT_ALLOC_XTILED = 1 << 6
MIPTREE_LAYOUT_ALLOC_ANY_TILED = MIPTREE_LAYOUT_ALLOC_YTILED |
MIPTREE_LAYOUT_ALLOC_XTILED
MIPTREE_LAYOUT_ALLOC_LINEAR = 1 << 7
so the expression (layout_flags & MIPTREE_LAYOUT_ALLOC_ANY_TILED) can
never produce a value of MIPTREE_LAYOUT_ALLOC_LINEAR.
The enum this replaced was
enum intel_miptree_tiling_mode {
INTEL_MIPTREE_TILING_ANY,
INTEL_MIPTREE_TILING_Y,
INTEL_MIPTREE_TILING_NONE,
};
where "ANY" means "Y" or "NONE" (i.e., linear). As such, remove the
unused (and worse, unhandled) MIPTREE_LAYOUT_ALLOC_XTILED and redefine
MIPTREE_LAYOUT_ALLOC_ANY_TILED to mean what it did before.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91513
Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 89fdccb1730..506c25846cf 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -537,13 +537,11 @@ enum { MIPTREE_LAYOUT_FORCE_HALIGN16 = 1 << 4, MIPTREE_LAYOUT_ALLOC_YTILED = 1 << 5, - MIPTREE_LAYOUT_ALLOC_XTILED = 1 << 6, - MIPTREE_LAYOUT_ALLOC_LINEAR = 1 << 7, + MIPTREE_LAYOUT_ALLOC_LINEAR = 1 << 6, + MIPTREE_LAYOUT_ALLOC_ANY_TILED = MIPTREE_LAYOUT_ALLOC_YTILED | + MIPTREE_LAYOUT_ALLOC_LINEAR, }; -#define MIPTREE_LAYOUT_ALLOC_ANY_TILED (MIPTREE_LAYOUT_ALLOC_YTILED | \ - MIPTREE_LAYOUT_ALLOC_XTILED) - struct intel_mipmap_tree *intel_miptree_create(struct brw_context *brw, GLenum target, mesa_format format, |