[Mesa-dev] [PATCH v2] mesa/pbo: Handle zero width, height or depth when validating access

Neil Roberts neil at linux.intel.com
Thu Sep 3 04:09:53 PDT 2015


Jason Ekstrand <jason at jlekstrand.net> writes:

> We can probably just bail higher up in the stack and never call the
> driver hook if we have a zero dimension. That would also protect us
> from silly zero-dim bugs that may exist.

Yes, that already does happen. As mentioned elsewhere in the thread,
_mesa_validate_pbo_access is called outside of the driver code before it
tries to bail out.

I think we do still want to call _mesa_validate_pbo_access for
zero-sized images because it generates other errors that we're probably
supposed to catch so we can't just move the shortcut further up the
stack.

Regards,
- Neil


More information about the mesa-dev mailing list