From 9130e4564b8481b51c6d709bc9b8466cd223b722 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 30 Dec 2021 11:10:46 +1000 Subject: [PATCH] crocus: set max clip planes to 6 for gen4. Fixes piglit gl-1.0-user-clip-all-planes Part-of: --- src/gallium/drivers/crocus/crocus_screen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/crocus/crocus_screen.c b/src/gallium/drivers/crocus/crocus_screen.c index 2c23beeddd8..b1e1054d674 100644 --- a/src/gallium/drivers/crocus/crocus_screen.c +++ b/src/gallium/drivers/crocus/crocus_screen.c @@ -294,7 +294,11 @@ crocus_get_param(struct pipe_screen *pscreen, enum pipe_cap param) } case PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY: return 140; - + case PIPE_CAP_CLIP_PLANES: + if (devinfo->verx10 < 45) + return 6; + else + return 1; // defaults to MAX (8) case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT: /* 3DSTATE_CONSTANT_XS requires the start of UBOs to be 32B aligned */ return 32;