diff options
author | Paul Berry <[email protected]> | 2013-05-21 11:58:38 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-06-12 11:10:07 -0700 |
commit | b09a75407886fba476bb79d65b408ffc08876a75 (patch) | |
tree | b1958d1e5739c9c312945b372fbd04067027b9ef /src/mesa | |
parent | ef9142d4a37c28bf6ae3527f71b9aa1b57ba9eb0 (diff) |
i965/gen7: Enable support for fast color clears.
This patch adds code to place mcs_state into INTEL_MCS_STATE_RESOLVED
for miptrees that are capable of supporting fast color clears. This
will have no effect on buffers that don't undergo a fast color clear;
however, for buffers that do undergo a fast color clear, an MCS
miptree will be allocated (at the time of the first fast clear), and
will be used thereafter.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 5b767df070f..1776a4b34c5 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -608,6 +608,16 @@ intel_miptree_create(struct intel_context *intel, return NULL; } +#ifndef I915 + /* If this miptree is capable of supporting fast color clears, set + * mcs_state appropriately to ensure that fast clears will occur. + * Allocation of the MCS miptree will be deferred until the first fast + * clear actually occurs. + */ + if (intel_is_non_msrt_mcs_buffer_supported(intel, mt)) + mt->mcs_state = INTEL_MCS_STATE_RESOLVED; +#endif + return mt; } @@ -699,6 +709,16 @@ intel_miptree_create_for_dri2_buffer(struct intel_context *intel, return NULL; singlesample_mt->region->name = region->name; +#ifndef I915 + /* If this miptree is capable of supporting fast color clears, set + * mcs_state appropriately to ensure that fast clears will occur. + * Allocation of the MCS miptree will be deferred until the first fast + * clear actually occurs. + */ + if (intel_is_non_msrt_mcs_buffer_supported(intel, singlesample_mt)) + singlesample_mt->mcs_state = INTEL_MCS_STATE_RESOLVED; +#endif + if (num_samples == 0) return singlesample_mt; |