summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-12-01 11:06:31 -0800
committerIan Romanick <[email protected]>2013-01-15 21:34:45 -0800
commit3c00a52f7e02007f40fa53a06fad517bed0328ff (patch)
treebffc7dc5e97b06606e55bba115d6aa457f794612 /src/mesa/drivers
parentf5e7f12e4a1d2ee98ced36c232842d60181fc01e (diff)
intel: Enable GL_ARB_internalformat_query
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c23
-rwxr-xr-xsrc/mesa/drivers/dri/intel/intel_extensions.c1
2 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 70657b7d5b4..7b53360a381 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -58,6 +58,28 @@
* Mesa's Driver Functions
***************************************/
+static size_t
+brw_query_samples_for_format(struct gl_context *ctx, GLenum internalFormat,
+ int samples[16])
+{
+ struct intel_context *intel = intel_context(ctx);
+
+ switch (intel->gen) {
+ case 7:
+ samples[0] = 8;
+ samples[1] = 4;
+ return 2;
+
+ case 6:
+ samples[0] = 4;
+ return 1;
+
+ default:
+ samples[0] = 1;
+ return 1;
+ }
+}
+
static void brwInitDriverFunctions(struct intel_screen *screen,
struct dd_function_table *functions)
{
@@ -66,6 +88,7 @@ static void brwInitDriverFunctions(struct intel_screen *screen,
brwInitFragProgFuncs( functions );
brw_init_queryobj_functions(functions);
+ functions->QuerySamplesForFormat = brw_query_samples_for_format;
functions->BeginTransformFeedback = brw_begin_transform_feedback;
if (screen->gen >= 7)
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 5c6b651eccd..8d92df2b1a8 100755
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -47,6 +47,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.ARB_explicit_attrib_location = true;
ctx->Extensions.ARB_framebuffer_object = true;
ctx->Extensions.ARB_half_float_pixel = true;
+ ctx->Extensions.ARB_internalformat_query = true;
ctx->Extensions.ARB_map_buffer_range = true;
ctx->Extensions.ARB_point_sprite = true;
ctx->Extensions.ARB_shader_objects = true;