From bcac11c8f12ec46010bb624690ba121720d19911 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 5 Nov 2018 23:16:14 -0800 Subject: [PATCH] iris: Use at least 1x1 size for null FB surface state. Otherwise we get 0 - 1 = 0xffffffff and fail to pack SURFACE_STATE. Fixes some object namespace pollution gltexsubimage2d tests --- src/gallium/drivers/iris/iris_state.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 86975e279e1..06e3e8eacc5 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2055,7 +2055,10 @@ iris_set_framebuffer_state(struct pipe_context *ctx, void *null_surf_map = upload_state(ice->state.surface_uploader, &ice->state.null_fb, 4 * GENX(RENDER_SURFACE_STATE_length), 64); - isl_null_fill_state(&screen->isl_dev, null_surf_map, isl_extent3d(cso->width, cso->height, cso->layers ? cso->layers : 1)); + isl_null_fill_state(&screen->isl_dev, null_surf_map, + isl_extent3d(MAX2(cso->width, 1), + MAX2(cso->height, 1), + cso->layers ? cso->layers : 1)); ice->state.null_fb.offset += iris_bo_offset_from_base_address(iris_resource_bo(ice->state.null_fb.res)); -- 2.30.2