diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-14 16:26:49 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-17 08:36:14 -0700 |
commit | 67a34acd00c056341ebb87d5bc0ce0b76a3b2c10 (patch) | |
tree | a2e54b277df82d9e371e45b8dc0cbbd404e11080 | |
parent | bdf169abb3f4feea72e2033eeb193e61fc8fca4f (diff) |
panfrost: Set array_size to permit array textures
Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index d7591eae7b9..d872884077f 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -2097,10 +2097,21 @@ panfrost_create_sampler_view( } } + /* In the hardware, array_size refers specifically to array textures, + * whereas in Gallium, it also covers cubemaps */ + + unsigned array_size = texture->array_size; + + if (texture->target == PIPE_TEXTURE_CUBE) { + /* TODO: Cubemap arrays */ + assert(array_size == 6); + } + struct mali_texture_descriptor texture_descriptor = { .width = MALI_POSITIVE(texture->width0), .height = MALI_POSITIVE(texture->height0), .depth = MALI_POSITIVE(texture->depth0), + .array_size = MALI_POSITIVE(array_size), /* TODO: Decode */ .format = { |