On Tue, Dec 11, 2018 at 6:34 PM Rob Clark <robdcl...@gmail.com> wrote: > > On Tue, Dec 11, 2018 at 6:10 PM Ilia Mirkin <imir...@alum.mit.edu> wrote: > > > > On Tue, Dec 11, 2018 at 5:50 PM Rob Clark <robdcl...@gmail.com> wrote: > > > > > > Signed-off-by: Rob Clark <robdcl...@gmail.com> > > > --- > > > 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..)
Any DX10- or GL 3.2-capable GPU can render to multiple layers at once. You bind a bunch of layers at a time. -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev