Mesa (master): i965: When the kernel lacks the LLC check, assume it' s present on gen >= 6.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Apr 12 01:14:50 UTC 2012
Module: Mesa
Branch: master
Commit: 249fc7056104113633215106ac085b505d8dc161
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=249fc7056104113633215106ac085b505d8dc161
Author: Eric Anholt <eric at anholt.net>
Date: Wed Mar 21 14:35:14 2012 -0700
i965: When the kernel lacks the LLC check, assume it's present on gen >= 6.
The param wasn't added until drm-intel-next for 3.4, so we were
missing our various LLC fast-paths.
---
src/mesa/drivers/dri/intel/intel_screen.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 6344d98..e823792 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -770,9 +770,13 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
intelScreen->hw_must_use_separate_stencil = intelScreen->gen >= 7;
intelScreen->dri2_has_hiz = INTEL_DRI2_HAS_HIZ_UNKNOWN;
- intelScreen->hw_has_llc =
- intel_get_boolean(intelScreen->driScrnPriv,
- I915_PARAM_HAS_LLC);
+ int has_llc = 0;
+ bool success = intel_get_param(intelScreen->driScrnPriv, I915_PARAM_HAS_LLC,
+ &has_llc);
+ if (success && has_llc)
+ intelScreen->hw_has_llc = true;
+ else if (!success && intelScreen->gen >= 6)
+ intelScreen->hw_has_llc = true;
intel_override_separate_stencil(intelScreen);
More information about the mesa-commit
mailing list