From: Kenneth Graunke Date: Tue, 6 Nov 2018 07:16:14 +0000 (-0800) Subject: iris: Use at least 1x1 size for null FB surface state. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bcac11c8f12ec46010bb624690ba121720d19911;p=mesa.git 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 --- 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));