struct pipe_resource *tex,
const struct pipe_sampler_view *tmpl)
{
- struct iris_context *ice = (struct iris_context *) ctx;
struct iris_screen *screen = (struct iris_screen *)ctx->screen;
const struct gen_device_info *devinfo = &screen->devinfo;
struct iris_sampler_view *isv = calloc(1, sizeof(struct iris_sampler_view));
ISL_SURF_USAGE_TEXTURE_BIT);
}
- upload_surface_states(ice->state.surface_uploader, &isv->surface_state);
-
return &isv->base;
}
struct pipe_resource *tex,
const struct pipe_surface *tmpl)
{
- struct iris_context *ice = (struct iris_context *) ctx;
struct iris_screen *screen = (struct iris_screen *)ctx->screen;
const struct gen_device_info *devinfo = &screen->devinfo;
#endif
}
- upload_surface_states(ice->state.surface_uploader, &surf->surface_state);
-
-#if GEN_GEN == 8
- upload_surface_states(ice->state.surface_uploader,
- &surf->surface_state_read);
-#endif
-
return psurf;
}
isl_surf_fill_state_s(&screen->isl_dev, surf->surface_state.cpu, &f);
- upload_surface_states(ice->state.surface_uploader, &surf->surface_state);
-
return psurf;
}
struct iris_resource *res = (void *) p_surf->texture;
uint32_t offset = 0;
+ if (GEN_GEN == 8 && is_read_surface && !surf->surface_state_read.ref.res) {
+ upload_surface_states(ice->state.surface_uploader,
+ &surf->surface_state_read);
+ }
+
+ if (!surf->surface_state.ref.res) {
+ upload_surface_states(ice->state.surface_uploader,
+ &surf->surface_state);
+ }
+
if (res->aux.bo) {
iris_use_pinned_bo(batch, res->aux.bo, writeable, access);
if (res->aux.clear_color_bo)
enum isl_aux_usage aux_usage =
iris_resource_texture_aux_usage(ice, isv->res, isv->view.format);
+ if (!isv->surface_state.ref.res)
+ upload_surface_states(ice->state.surface_uploader, &isv->surface_state);
+
if (isv->res->aux.bo) {
iris_use_pinned_bo(batch, isv->res->aux.bo,
false, IRIS_DOMAIN_OTHER_READ);