diff options
author | Chad Versace <chad@chad-versace.us> | 2011-06-05 19:48:19 -0700 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2011-06-24 05:51:54 +0100 |
commit | 2aaafc97b8aebfb605b1256ed9e3d2a0e450322e (patch) | |
tree | 1260ae94a8304284824a0967b8707917e208ffe2 /uxa/uxa-accel.c | |
parent | 6fde368454ab5ebf2a5e1594c69b75191ccaafc1 (diff) |
dri: Do not create DRI2 buffers for unrecognized DRI2 buffer tokens
Before this commit, if a client were to request an unrecognized DRI2
buffer, such as DRI2BufferStencil, then I830DRI2CreateBuffer() allocated
and returned an X-tiled buffer by accident. The problem was that
unrecognized tokens were caught by the default case of a switch statement.
Now, when given unrecognized DRI2 tokens, I830DRI2CreateBuffers() returns
null.
This shouldn't break older Mesa versions, because they never query (via
DRI2GetBuffersWithFormat) for the drawable's DRI2BufferStencil.
CC: Eric Anholt <eric@anholt.net>
CC: Ian Romanick <idr@freedesktop.org>
CC: Kenneth Graunke <kenneth@whitecape.org>
CC: Kristian Høgsberg <krh@bitplanet.net
Signed-off-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit 263daba7e6afb37bd471fdc8dd8e4458da0a45ff)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'uxa/uxa-accel.c')
0 files changed, 0 insertions, 0 deletions