[Mesa-dev] Seeking advice on implementing KHR_no_error
Timothy Arceri
timothy.arceri at collabora.com
Fri Dec 30 00:58:09 UTC 2016
On Fri, 2016-12-30 at 10:02 +1000, Dave Airlie wrote:
> On 30 December 2016 at 09:48, Ilia Mirkin <imirkin at alum.mit.edu>
> wrote:
> > On Thu, Dec 29, 2016 at 5:54 PM, Thomas Helland
> > <thomashelland90 at gmail.com> wrote:
> > > Apart from that it's basically a case of looking at a patch
> > > series implementing
> > > some other fairly trivial extension to get an idea of what needs
> > > changing apart
> > > from the functionality of the extension itself.
> >
> > There are a few ways to implement the ext. You could have the
> > trivial
> > implementation which just makes it not report errors. However
> > there's
> > a bunch of validation that gets done in various cases, which can be
> > costly. I believe the point of the extension is to get rid of that
> > extra costly validation.
> >
> > You're going to have to track down the specifics, but one thing
> > that
> > comes off the top of my head is the validation that's done for ES
> > interface matching. There's probably 30 other things too though,
> > that
> > one is just one that I happen to remember at this moment. I think
> > sampler/texture validation is another, probably stuff with
> > uniforms,
> > etc.
> >
> > So the idea would be for those validation functions to just do if
> > (ctxflags & NO_ERROR) { return; } somewhere near the top. (For
> > example.)
>
> In theory for a lot of the API you could split the API into
>
> _mesa_API_nocheck
> and
> _mesa_API {
> do error checks
> call _mesa_API_nocheck
> }
> variants, then have a separate dispatch table that goes straight to
> nocheck for a bunch of the API.
>
Yeah that's what I was thinking when I looked at this extension a while
ago. For my quick look at various api calls at the time there was a lot
of:
_mesa_API {
do error checks
do useful things
do error checks
}
Which meant there is likely a lot of refactoring work in future for
anyone implementing this extension.
> Then you'd fixed up the other callsites on a case by case basis.
>
> Dave.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list