diff options
author | Jakob Bornecrantz <[email protected]> | 2011-02-20 13:41:18 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2011-02-21 23:42:53 +0000 |
commit | 43e6fe5549edb7e837480f28b1262357568d54ea (patch) | |
tree | c1065f4fa44a7f0be442775281309f427a73611a /src/gallium | |
parent | 27b49e91c982638497f7a92f7d611c29dd9cad18 (diff) |
i915g: Add option to lie about caps
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/i915/i915_debug.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_debug.c b/src/gallium/drivers/i915/i915_debug.c index d11da83eb29..e0ea025d0ec 100644 --- a/src/gallium/drivers/i915/i915_debug.c +++ b/src/gallium/drivers/i915/i915_debug.c @@ -50,11 +50,13 @@ boolean i915_tiling = TRUE; DEBUG_GET_ONCE_FLAGS_OPTION(i915_debug, "I915_DEBUG", debug_options, 0); DEBUG_GET_ONCE_BOOL_OPTION(i915_no_tiling, "I915_NO_TILING", FALSE); +DEBUG_GET_ONCE_BOOL_OPTION(i915_lie, "I915_LIE", FALSE); void i915_debug_init(struct i915_screen *is) { i915_debug = debug_get_option_i915_debug(); is->debug.tiling = !debug_get_option_i915_no_tiling(); + is->debug.lie = debug_get_option_i915_lie(); } 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: diff --git a/src/gallium/drivers/i915/i915_screen.h b/src/gallium/drivers/i915/i915_screen.h index e76e33ad42e..60f0e2971e0 100644 --- a/src/gallium/drivers/i915/i915_screen.h +++ b/src/gallium/drivers/i915/i915_screen.h @@ -48,6 +48,7 @@ struct i915_screen struct { boolean tiling; + boolean lie; } debug; }; |