iris: fix null FB and unbound tex surface state addresses
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 11 Sep 2018 08:09:27 +0000 (01:09 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:08 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 5472ff57fcadcfa054e59dbc3c8c9a9e13c6b53d..454e05979e49243b648eb2650292bf69107fd7ac 100644 (file)
@@ -1754,6 +1754,8 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
       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));
+   ice->state.null_fb.offset +=
+      iris_bo_offset_from_base_address(iris_resource_bo(ice->state.null_fb.res));
 
    ice->state.dirty |= IRIS_DIRTY_DEPTH_BUFFER;
 
@@ -4328,4 +4330,6 @@ genX(init_state)(struct iris_context *ice)
       upload_state(ice->state.surface_uploader, &ice->state.unbound_tex,
                    4 * GENX(RENDER_SURFACE_STATE_length), 64);
    isl_null_fill_state(&screen->isl_dev, null_surf_map, isl_extent3d(1, 1, 1));
+   ice->state.unbound_tex.offset +=
+      iris_bo_offset_from_base_address(iris_resource_bo(ice->state.unbound_tex.res));
 }