[Mesa-dev] [PATCH RFC 2/2] i965: Implement validation for scanout usage
Daniel Stone
daniels at collabora.com
Tue May 3 21:42:33 UTC 2016
Add a more comprehensive validateUsage() call, checking that the tiling
mode for the __DRIimage.
Signed-off-by: Daniel Stone <daniels at collabora.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
---
src/mesa/drivers/dri/i965/intel_screen.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index e52554c..fb75e72 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -632,6 +632,15 @@ intel_validate_usage(__DRIimage *image, unsigned int use)
return GL_FALSE;
}
+ if (use & __DRI_IMAGE_USE_SCANOUT) {
+ uint32_t tiling, swizzle;
+
+ drm_intel_bo_get_tiling(image->bo, &tiling, &swizzle);
+
+ if (tiling == I915_TILING_Y && image->gen < 9)
+ return GL_FALSE;
+ }
+
return GL_TRUE;
}
--
2.7.4
More information about the mesa-dev
mailing list