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
This commit is contained in:
Kenneth Graunke
2018-11-05 23:16:14 -08:00
parent 9c8fdf8133
commit bcac11c8f1
+4 -1
View File
@@ -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));