diff options
author | Jason Ekstrand <[email protected]> | 2017-06-08 09:36:15 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-06-14 18:15:05 -0700 |
commit | 7175561598b1dedc0a9f872237061ca3bec42a1f (patch) | |
tree | aef58e9df058ac28176d2523cf77b5dce52c5ca0 /src/intel/blorp | |
parent | 39a13c08dc16ffde7c0e11bbe1bef3c0ee55ba0e (diff) |
intel/blorp: Work around Sandy Bridge occlusion query issue
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/intel/blorp')
-rw-r--r-- | src/intel/blorp/blorp_clear.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 3d5c41cc714..efacadfebe4 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -479,6 +479,16 @@ blorp_clear_depth_stencil(struct blorp_batch *batch, params.x1 = x1; params.y1 = y1; + if (ISL_DEV_GEN(batch->blorp->isl_dev) == 6) { + /* For some reason, Sandy Bridge gets occlusion queries wrong if we + * don't have a shader. In particular, it records samples even though + * we disable statistics in 3DSTATE_WM. Give it the usual clear shader + * to work around the issue. + */ + if (!blorp_params_get_clear_kernel(batch->blorp, ¶ms, false)) + return; + } + while (num_layers > 0) { params.num_layers = num_layers; |