diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index c07f1d501ca..f05530d5a4d 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -134,6 +134,7 @@ panfrost_resource_from_handle(struct pipe_screen *pscreen, struct pan_image_wsi_layout explicit_layout = { .offset_B = whandle->offset, .row_pitch_B = whandle->stride, + .strict = dev->debug & PAN_DBG_STRICT_IMPORT, }; rsc->modifier = mod; diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 649ac58fc33..ac3d685a47f 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -72,6 +72,7 @@ static const struct debug_named_value panfrost_debug_options[] = { {"nocrc", PAN_DBG_NO_CRC, "Disable transaction elimination"}, {"msaa16", PAN_DBG_MSAA16, "Enable MSAA 8x and 16x support"}, {"linear", PAN_DBG_LINEAR, "Force linear textures"}, + {"strict_import", PAN_DBG_STRICT_IMPORT, "Use the explicit WSI stride and fail if it's not properly aligned"}, {"nocache", PAN_DBG_NO_CACHE, "Disable BO cache"}, {"dump", PAN_DBG_DUMP, "Dump all graphics memory"}, #ifdef PAN_DBG_OVERFLOW diff --git a/src/panfrost/lib/pan_util.h b/src/panfrost/lib/pan_util.h index 854c59ac03d..4f87d6e7eb6 100644 --- a/src/panfrost/lib/pan_util.h +++ b/src/panfrost/lib/pan_util.h @@ -43,7 +43,7 @@ #define PAN_DBG_GL3 0x0100 #define PAN_DBG_NO_AFBC 0x0200 #define PAN_DBG_MSAA16 0x0400 -/* 0x800 unused */ +#define PAN_DBG_STRICT_IMPORT 0x0800 #define PAN_DBG_LINEAR 0x1000 #define PAN_DBG_NO_CACHE 0x2000 #define PAN_DBG_DUMP 0x4000