[Mesa-dev] [PATCH 2/7] i965: Give a nice message if the driver isn't built for the hardware.
Matt Turner
mattst88 at gmail.com
Tue Jun 10 21:57:18 PDT 2014
---
src/mesa/drivers/dri/i965/intel_screen.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 8299d3d..35e80e6 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1330,6 +1330,14 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
if (!intelScreen->devinfo)
return false;
+#ifdef STATIC_GEN
+ if (intelScreen->devinfo->gen != STATIC_GEN) {
+ fprintf(stderr, "i965_dri.so built only for Gen" STRINGIFY(STATIC_GEN)
+ " but hardware is Gen%d\n", intelScreen->devinfo->gen);
+ return false;
+ }
+#endif
+
intelScreen->hw_must_use_separate_stencil = intelScreen->devinfo->gen >= 7;
intelScreen->hw_has_swizzling = intel_detect_swizzling(intelScreen);
--
1.8.3.2
More information about the mesa-dev
mailing list