mesa: Add driver method to determine the possible sample counts
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 1 Dec 2012 19:05:00 +0000 (11:05 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 16 Jan 2013 05:34:45 +0000 (21:34 -0800)
commitf5e7f12e4a1d2ee98ced36c232842d60181fc01e
tree90eeea0255dfd8eca7baf91251ed71b75d7b7fed
parentbda540d2357f69a63dcf16550e178f803682d6ce
mesa: Add driver method to determine the possible sample counts

Use this method in _mesa_GetInternalformativ for both GL_SAMPLES and
GL_NUM_SAMPLE_COUNTS.

v2: internalFormat may not be color renderable by the driver, so zero
can be returned as a sample count.  Require that drivers supporting the
extension provide a QuerySamplesForFormat function.  The later was
suggested by Eric Anholt.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/common/driverfuncs.c
src/mesa/main/dd.h
src/mesa/main/formatquery.c