On Fri 26 May 2017, Jason Ekstrand wrote: > This commit adds a new unified interface for doing resolves. The basic > format is that, prior to any surface access such as texturing or > rendering, you call intel_miptree_prepare_access. If the surface was > written, you call intel_miptree_finish_write. These two functions take > parameters which tell them whether or not auxiliary compression and fast > clears are supported on the surface. Later commits will add wrappers > around these two functions for texturing, rendering, etc. > --- > src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 156 > +++++++++++++++++++++++++- > src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 80 +++++++++++++ > 2 files changed, 232 insertions(+), 4 deletions(-)
> +void > +intel_miptree_prepare_access(struct brw_context *brw, > + struct intel_mipmap_tree *mt, > + uint32_t start_level, uint32_t num_levels, > + uint32_t start_layer, uint32_t num_layers, > + bool aux_supported, bool fast_clear_supported) This parameter list seems a good place to pass in a bool that indicates the miptree data can be invalidated before access. For example, before a full, non-scissored clear or before mapping with GL_MAP_INVALIDATE_RANGE_BIT. That info would let us avoid unneeded aux ops. But, of course, such a change doesn't belong in this patch, or perhaps even in this patch series. I just wanted to suggest a future improvement. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev