[Mesa-dev] mesa: handle PBO access error in display list mode

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue Oct 18 20:19:10 PDT 2011


On Mon, Oct 17, 2011 at 08:24:38AM -0600, Brian Paul wrote:
> On 10/15/2011 08:05 PM, Liu Aleaxander wrote:
> > From 98d4600d74829d16045dd577855b7c9f25e762c2 Mon Sep 17 00:00:00 2001
> >From: Yuanhan Liu<yuanhan.liu at linux.intel.com>
> >Date: Sun, 16 Oct 2011 09:13:10 +0800
> >Subject: [PATCH] mesa: handle PBO access error in display list mode
> >
> >While dealing with pbo data in display list mode, it does check the pbo
> >access error at unpack_image. But it could not generate it, as it is
> >in display list compile time. If invalid PBO access found, NULL then
> >would be returned. While at the execution time, we can't detect if we
> >met a such error as the data is not stored as PBO access anymore. The
> >code would treat it as a _normal_ NULL pixel data.
> >
> >That's how the error is missed. Here I introduced a in-file macro
> >BAD_ACCESS to mark that we meet a PBO access error at compile time, and
> >we would like to handle it at the execution time. This would make the
> >error defer recognizable.
> 
> I think we should just generate the INVALID_OPERATION error at
> display list compilation time.  If a glDrawPixels() command is being
> compiled and its data is coming from a PBO, we'll access the PBO
> data at compile time, not execution time.  If we encounter an error
> when we're doing that, we should generate the error right away.

Thanks for the info.

> 
> The ARB_pbo spec says:
>    "If a pixel unpack buffer object
>     is bound and unpacking the pixel data according to the process
>     described below would access memory beyond the size of the pixel
>     unpack buffer's memory size, INVALID_OPERATION results."
> 
> I think if the intention was to generate the error later during
> execution, the spec would have said so.  Have you found spec
> language to indicate otherwise?

Nope, I just thought we should handle the error at execution time but
not compile time.

Updated patch sent.

Thanks,
Yuanhan Liu


More information about the mesa-dev mailing list