On Thursday, August 17, 2017 10:26:44 PM PDT Jason Ekstrand wrote: > On August 17, 2017 4:36:42 PM Kenneth Graunke <kenn...@whitecape.org> wrote: > > > ISL already offers functions to fill out most kinds of SURFACE_STATE, > > so why not handle null surfaces too? > > > > Null surfaces are simple, so we can just take the dimensions, rather > > than an entirte fill structure. > > --- > > src/intel/isl/isl.c | 7 +++++++ > > src/intel/isl/isl.h | 4 ++++ > > src/intel/isl/isl_genX_priv.h | 3 +++ > > src/intel/isl/isl_surface_state.c | 26 ++++++++++++++++++++++++++ > > 4 files changed, 40 insertions(+) > > > > Applies on top of Jason's patches: > > https://lists.freedesktop.org/archives/mesa-dev/2017-August/166628.html > > > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > > index 3788f9c2ead..59f512fc050 100644 > > --- a/src/intel/isl/isl.c > > +++ b/src/intel/isl/isl.c > > @@ -1811,6 +1811,13 @@ isl_buffer_fill_state_s(const struct isl_device > > *dev, void *state, > > isl_genX_call(dev, buffer_fill_state_s, state, info); > > } > > > > +void > > +isl_null_fill_state(const struct isl_device *dev, void *state, > > + struct isl_extent3d size) > > I might be inclined to make this an extent4d, assert that one off depth and > array_length is zero, and take the maximum of the two as the depth. Thoughts?
I suppose if you wanted a null surface with a different depth and render target view extent, then an isl_extent4d could be useful. But...neither driver actually wants to do that today. So it seems simpler to keep them the same, and make the caller pass the width/height/depth they want the surface to have. Seems like less magic. That's my preference, anyway. > > +{ > > + isl_genX_call(dev, null_fill_state, state, size); > > This is so much nicer. Thanks for complaining. Thanks for tidying it up :)
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev