summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-04-17 13:58:00 -0700
committerEric Anholt <[email protected]>2013-04-29 11:41:33 -0700
commiteb062ab07f0bea3c7ce83274ed64ce9b5197c667 (patch)
treef67572e1f06b875d345f24c2f9c100834215eded /src/mesa/drivers
parent5e46482993dfd30b888d5219f6fecf4b4d1f42de (diff)
i915: Correctly set the OQ counter bits.
While we may provide the extension, we need to tell applications that they can't actually use it: An implementation can either set QUERY_COUNTER_BITS_ARB to the value 0, or to some number greater than or equal to n. If an implementation returns 0 for QUERY_COUNTER_BITS_ARB, then the occlusion queries will always return that zero samples passed the occlusion test, and so an application should not use occlusion queries on that implementation.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c1
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 524e7cba384..f4b35178493 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -113,6 +113,7 @@ i830CreateContext(int api,
ctx->Const.MaxTextureMaxAnisotropy = 2.0;
ctx->Const.MaxDrawBuffers = 1;
+ ctx->Const.QueryCounterBits.SamplesPassed = 0;
_tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12,
18 * sizeof(GLfloat));
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 133f339321f..46fc9664221 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -262,6 +262,7 @@ i915CreateContext(int api,
fs_options->EmitNoIndirectTemp = true;
ctx->Const.MaxDrawBuffers = 1;
+ ctx->Const.QueryCounterBits.SamplesPassed = 0;
_tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12,
36 * sizeof(GLfloat));