From: Dave Airlie Date: Tue, 27 Nov 2018 03:02:03 +0000 (+1000) Subject: iris: fix cube texture view X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00645ea01ce9f6a8ad278e05f858535670c6e6a4;p=mesa.git iris: fix cube texture view --- diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index e07bd8919db..675037a5162 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1518,6 +1518,10 @@ iris_create_sampler_view(struct pipe_context *ctx, ISL_SURF_USAGE_TEXTURE_BIT | (isv->res->surf.usage & ISL_SURF_USAGE_CUBE_BIT); + if (isv->base.target == PIPE_TEXTURE_CUBE || + isv->base.target == PIPE_TEXTURE_CUBE_ARRAY) + usage |= ISL_SURF_USAGE_CUBE_BIT; + const struct iris_format_info fmt = iris_format_for_usage(devinfo, tmpl->format, usage);