OSDN Git Service

st/mesa: use table-driven approach to exposing extensions based on CAPs
authorMarek Olšák <maraeo@gmail.com>
Tue, 24 Jan 2012 22:16:50 +0000 (23:16 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sun, 29 Jan 2012 01:19:57 +0000 (02:19 +0100)
commitc21d7b1e30edfc0e400836705645d188a0f538cd
tree896826b75f49844b2f6eea5f7c7802bd67fdcef6
parent171be755223d99f8cc5cc1bdaf8bd7b4caa04b4f
st/mesa: use table-driven approach to exposing extensions based on CAPs

This change is not exactly equivalent (sometimes we checked for non-zero,
sometimes if >0 or >1), but the behavior shouldn't change, because all drivers
report 0 for unsupported CAPs.

Exposing CAP_STREAM_OUTPUT_PAUSE_RESUME without CAP_MAX_STREAM_OUTPUT_BUFFERS
is a driver bug and st/mesa does no checking if the latter is supported as
well. Drivers must report CAPs consistently.

v2: make the array const
src/mesa/state_tracker/st_extensions.c