diff options
author | Topi Pohjolainen <[email protected]> | 2016-04-24 10:45:48 +0300 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2016-05-12 19:49:22 +0300 |
commit | 1ca02b6ebb424489d7c16be26a9f96359bbce25a (patch) | |
tree | 18fb145cee59fb88319b8c7e2484d70f3e2aa14c /src/mesa/drivers/dri | |
parent | a6e0f1cc7fff4009ea204c75d3f8a2f1e26e42ef (diff) |
i965: Add flag telling if miptree is for client consumption
Consider later on adding specific disable flags such as
MIPTREE_LAYOUT_DISABLE_AUX_MCS = 1 << 3, /* CCS_D */
MIPTREE_LAYOUT_DISABLE_AUX_CCS_E = 1 << 4,
MIPTREE_LAYOUT_DISABLE_AUX = MIPTREE_LAYOUT_DISABLE_AUX_MCS |
MIPTREE_LAYOUT_DISABLE_AUX_CCS_E,
and equivalent boolean/enums into miptree.
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 86fe07d7f3f..8f6dc2400d8 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -392,6 +392,7 @@ intel_miptree_create_layout(struct brw_context *brw, mt->logical_depth0 = depth0; mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_NO_MCS; mt->disable_aux_buffers = (layout_flags & MIPTREE_LAYOUT_DISABLE_AUX) != 0; + mt->is_scanout = (layout_flags & MIPTREE_LAYOUT_FOR_SCANOUT) != 0; exec_list_make_empty(&mt->hiz_map); mt->cpp = _mesa_get_format_bytes(format); mt->num_samples = num_samples; @@ -898,7 +899,7 @@ intel_update_winsys_renderbuffer_miptree(struct brw_context *intel, height, 1, pitch, - 0); + MIPTREE_LAYOUT_FOR_SCANOUT); if (!singlesample_mt) goto fail; @@ -957,8 +958,8 @@ intel_miptree_create_for_renderbuffer(struct brw_context *brw, bool ok; GLenum target = num_samples > 1 ? GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D; const uint32_t layout_flags = MIPTREE_LAYOUT_ACCELERATED_UPLOAD | - MIPTREE_LAYOUT_TILING_ANY; - + MIPTREE_LAYOUT_TILING_ANY | + MIPTREE_LAYOUT_FOR_SCANOUT; mt = intel_miptree_create(brw, target, format, 0, 0, width, height, depth, num_samples, diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 4c6877eed9d..7f6e771b41d 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -657,6 +657,13 @@ struct intel_mipmap_tree */ bool disable_aux_buffers; + /** + * Tells if the underlying buffer is to be also consumed by entities other + * than the driver. This allows logic to turn off features such as lossless + * compression which is not currently understood by client applications. + */ + bool is_scanout; + /* These are also refcounted: */ GLuint refcount; @@ -697,6 +704,8 @@ enum { MIPTREE_LAYOUT_TILING_NONE = 1 << 6, MIPTREE_LAYOUT_TILING_ANY = MIPTREE_LAYOUT_TILING_Y | MIPTREE_LAYOUT_TILING_NONE, + + MIPTREE_LAYOUT_FOR_SCANOUT = 1 << 7, }; struct intel_mipmap_tree *intel_miptree_create(struct brw_context *brw, |