From f5e7f12e4a1d2ee98ced36c232842d60181fc01e Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sat, 1 Dec 2012 11:05:00 -0800 Subject: 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 Reviewed-by: Eric Anholt Reviewed-by: Jordan Justen --- src/mesa/drivers/common/driverfuncs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/drivers/common') diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 93fa3c745e7..3de5199b477 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -91,6 +91,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver) /* Texture functions */ driver->ChooseTextureFormat = _mesa_choose_tex_format; + driver->QuerySamplesForFormat = NULL; driver->TexImage = _mesa_store_teximage; driver->TexSubImage = _mesa_store_texsubimage; driver->GetTexImage = _mesa_meta_GetTexImage; -- cgit v1.2.3