summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_screen.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2011-02-20 13:41:18 +0100
committerJakob Bornecrantz <[email protected]>2011-02-21 23:42:53 +0000
commit43e6fe5549edb7e837480f28b1262357568d54ea (patch)
treec1065f4fa44a7f0be442775281309f427a73611a /src/gallium/drivers/i915/i915_screen.c
parent27b49e91c982638497f7a92f7d611c29dd9cad18 (diff)
i915g: Add option to lie about caps
Diffstat (limited to 'src/gallium/drivers/i915/i915_screen.c')
-rw-r--r--src/gallium/drivers/i915/i915_screen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 2260bcecf6e..d929eb25bdc 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -100,6 +100,8 @@ i915_get_name(struct pipe_screen *screen)
static int
i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
{
+ struct i915_screen *is = i915_screen(screen);
+
switch (cap) {
/* Supported features (boolean caps). */
case PIPE_CAP_ANISOTROPIC_FILTER:
@@ -123,7 +125,6 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_INDEP_BLEND_ENABLE:
case PIPE_CAP_INDEP_BLEND_FUNC:
case PIPE_CAP_INSTANCED_DRAWING: /* draw module? */
- case PIPE_CAP_OCCLUSION_QUERY:
case PIPE_CAP_POINT_SPRITE:
case PIPE_CAP_SHADER_STENCIL_EXPORT:
case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
@@ -131,6 +132,10 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_TIMER_QUERY:
return 0;
+ /* Features we can lie about (boolean caps). */
+ case PIPE_CAP_OCCLUSION_QUERY:
+ return is->debug.lie ? 1 : 0;
+
/* Texturing. */
case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
case PIPE_CAP_MAX_COMBINED_SAMPLERS: