iris: fix cube texture view
authorDave Airlie <airlied@redhat.com>
Tue, 27 Nov 2018 03:02:03 +0000 (13:02 +1000)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index e07bd8919db0c130d6baae8e120c0e37ee55045c..675037a51621dbea0347b2284126d3ef2e909b51 100644 (file)
@@ -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);