[Mesa-dev] [PATCH] intel: Give an explanation why we are exiting for debugging.
Eugeni Dodonov
eugeni at dodonov.net
Fri Sep 2 12:10:00 PDT 2011
On Fri, Sep 2, 2011 at 15:53, Eric Anholt <eric at anholt.net> wrote:
> On Fri, 2 Sep 2011 12:33:44 -0300, Eugeni Dodonov <eugeni at dodonov.net>
> wrote:
> > From: Eugeni Dodonov <eugeni.dodonov at intel.com>
> >
> > This could happen in 3 different cases, and ERRNO can explain what
> > happened. First case would be EIO (gpu hang), second EINVAL (something is
> > wrong inside the batch), and we also discovered that sometimes it happens
> > with ENOSPACE. All of those cases are different it it could be worth to
> at
> > least know what happened.
> >
> > Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
> > ---
> > src/mesa/drivers/dri/intel/intel_batchbuffer.c | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
> b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
> > index db4343b..73367f3 100644
> > --- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
> > +++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
> > @@ -138,6 +138,7 @@ do_flush_locked(struct intel_context *intel)
> > }
> >
> > if (ret != 0) {
> > + _mesa_warning(NULL, "do_flush_locked: %d\n", ret);
> > exit(1);
> > }
> > intel->vtbl.new_batch(intel);
>
> I would make it
>
> fprintf(stderr, "intel_batchbuffer_flush failed: %s\n", strerror(ret));
>
> You want the output even if built without Mesa debugging enabled, and
> strings are nicer than numbers.
>
Indeed, thanks for the idea!
--
Eugeni Dodonov
http://eugeni.dodonov.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110902/af3969af/attachment.htm>
More information about the mesa-dev
mailing list