On Wed, Nov 25, 2015 at 11:01:18AM -0800, Ben Widawsky wrote: > On Wed, Nov 25, 2015 at 06:36:36PM +0100, Neil Roberts wrote: > > For single-sampled textures the MCS buffer is only used to implement > > fast clears. However the surface always needs to be resolved before > > being used as a texture anyway so the the MCS buffer doesn't actually > > achieve anything. This is important for Gen9 because in that case SRGB > > I admit a good deal of ignorance, but why do we have to do a resolve before we > sample from it? I thought the whole point of the MCS was that we can sample > from > it without a resolve.
This is my understanding also, I can't see much benefit from the fast clear if it would need to be anyway resolved before reading it using GPU (reading using CPU is then another story of course). > > > surfaces are not supported for fast clears and we don't want the > > hardware to see the MCS buffer in that case. > > --- > > src/mesa/drivers/dri/i965/gen8_surface_state.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c > > b/src/mesa/drivers/dri/i965/gen8_surface_state.c > > index 80252a5..075424a 100644 > > --- a/src/mesa/drivers/dri/i965/gen8_surface_state.c > > +++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c > > @@ -225,7 +225,11 @@ gen8_emit_texture_surface_state(struct brw_context > > *brw, > > pitch = mt->pitch; > > } > > > > - if (mt->mcs_mt) { > > + /* The MCS is not uploaded for single-sampled surfaces because the color > > + * buffer should always have been resolved before it is used as a > > texture > > + * so there is no need for it. > > + */ > > + if (mt->mcs_mt && mt->num_samples > 1) { > > aux_mt = mt->mcs_mt; > > aux_mode = GEN8_SURFACE_AUX_MODE_MCS; > > > > > -- > Ben Widawsky, Intel Open Source Technology Center > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev