summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2018-06-11 10:23:23 -0700
committerNanley Chery <[email protected]>2018-07-13 08:31:21 -0700
commitfbe01625f6bf2cef6742e1ff0d3d44a2afec003e (patch)
treeee10fb6c09bffba9bd59f1bba44f433124b03991 /src
parent6c9947c3ef3f1ce81fb4409a0970590d5da44184 (diff)
i965/miptree: Share tiling_flags in miptree_create
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 6c087c0f662..e9ea5b8a70b 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -686,11 +686,16 @@ miptree_create(struct brw_context *brw,
enum intel_miptree_create_flags flags)
{
const struct gen_device_info *devinfo = &brw->screen->devinfo;
+ isl_tiling_flags_t tiling_flags = ISL_TILING_ANY_MASK;
+
+ /* TODO: This used to be because there wasn't BLORP to handle Y-tiling. */
+ if (devinfo->gen < 6 && _mesa_is_format_color_format(format))
+ tiling_flags &= ~ISL_TILING_Y0_BIT;
if (format == MESA_FORMAT_S_UINT8)
return make_surface(brw, target, format, first_level, last_level,
width0, height0, depth0, num_samples,
- ISL_TILING_W_BIT,
+ tiling_flags,
ISL_SURF_USAGE_STENCIL_BIT |
ISL_SURF_USAGE_TEXTURE_BIT,
BO_ALLOC_BUSY,
@@ -708,7 +713,7 @@ miptree_create(struct brw_context *brw,
struct intel_mipmap_tree *mt = make_surface(
brw, target, devinfo->gen >= 6 ? depth_only_format : format,
first_level, last_level,
- width0, height0, depth0, num_samples, ISL_TILING_Y0_BIT,
+ width0, height0, depth0, num_samples, tiling_flags,
ISL_SURF_USAGE_DEPTH_BIT | ISL_SURF_USAGE_TEXTURE_BIT,
BO_ALLOC_BUSY, 0, NULL);
@@ -735,12 +740,6 @@ miptree_create(struct brw_context *brw,
if (flags & MIPTREE_CREATE_BUSY)
alloc_flags |= BO_ALLOC_BUSY;
- isl_tiling_flags_t tiling_flags = ISL_TILING_ANY_MASK;
-
- /* TODO: This used to be because there wasn't BLORP to handle Y-tiling. */
- if (devinfo->gen < 6)
- tiling_flags &= ~ISL_TILING_Y0_BIT;
-
struct intel_mipmap_tree *mt = make_surface(
brw, target, format,
first_level, last_level,