On Tue, Dec 11, 2018 at 6:10 PM Ilia Mirkin <[email protected]> wrote: > > On Tue, Dec 11, 2018 at 5:50 PM Rob Clark <[email protected]> wrote: > > > > Signed-off-by: Rob Clark <[email protected]> > > --- > > src/gallium/include/pipe/p_context.h | 11 +++++++++++ > > src/mesa/state_tracker/st_cb_fbo.c | 26 ++++++++++++++++++++++++++ > > 2 files changed, 37 insertions(+) > > > > diff --git a/src/gallium/include/pipe/p_context.h > > b/src/gallium/include/pipe/p_context.h > > index d4e9179b78a..eb52c7e9a4e 100644 > > --- a/src/gallium/include/pipe/p_context.h > > +++ b/src/gallium/include/pipe/p_context.h > > @@ -811,6 +811,17 @@ struct pipe_context { > > void (*invalidate_surface)(struct pipe_context *ctx, > > struct pipe_surface *surf); > > > > + /** > > + * Invalidate a portion of a surface. This is used to > > + * > > + * (1) implement glInvalidateSubFramebuffer() and friends > > + * (2) as a hint before a scissored clear (which is turned into > > draw_vbo() > > + * that the cleared rect can be discarded > > + */ > > + void (*invalidate_sub_surface)(struct pipe_context *ctx, > > + struct pipe_surface *surf, > > + const struct pipe_scissor_state *rect); > > I think pipe_box is a bit more natural here than scissor state? box is > used for transfers, etc. This could also enable you to to specify a > sub-3d area. And perhaps by passing a level, you could go back to this > being a resource (and just extend invalidate_resource)?
I prefer surface to resource+params, as I mentioned in the other reply on this thread. I guess box is an option.. it is overkill for what the gl API wants and I can't immediately think of a use for this for more than a 2d slice of a higher dimensioned object, where pipe_surface is a perfect fit. (Are there any GPUs that can render to a 3d render target? I guess at least the intersection of tilers and GPUs that can is pretty small for now..) BR, -R > > -ilia _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
