summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-03-29 16:22:09 +1300
committerChris Forbes <[email protected]>2013-03-29 20:54:36 +1300
commit4412f3bc13886751f91f265babd78bac28c7ba41 (patch)
tree2b3c75d0ad7dec69b40d8313b2a4c89e0eaad1e0 /src/mesa/drivers/common
parentee624ced364bfd2f896809874ef3a808a11c5ecf (diff)
mesa: provide default implementation of QuerySamplesForFormat
Previously at least i915 failed to provide an implementation, but exposed ARB_internalformat_query anyway, leading to crashes when QueryInternalformativ was called. Default implementation just returns 1 for everything, so is suitable for any driver which does not support multisampling. V2: - Move from intel to core mesa. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r--src/mesa/drivers/common/driverfuncs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 731d46658d0..a98dfc607c5 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -28,6 +28,7 @@
#include "main/accum.h"
#include "main/arrayobj.h"
#include "main/context.h"
+#include "main/formatquery.h"
#include "main/framebuffer.h"
#include "main/mipmap.h"
#include "main/queryobj.h"
@@ -90,7 +91,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
/* Texture functions */
driver->ChooseTextureFormat = _mesa_choose_tex_format;
- driver->QuerySamplesForFormat = NULL;
+ driver->QuerySamplesForFormat = _mesa_query_samples_for_format;
driver->TexImage = _mesa_store_teximage;
driver->TexSubImage = _mesa_store_texsubimage;
driver->GetTexImage = _mesa_meta_GetTexImage;