diff options
author | Eric Anholt <[email protected]> | 2017-11-21 16:05:49 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-11-22 10:56:31 -0800 |
commit | c55813c22e2099d59dbff81b9202b5ce70926e45 (patch) | |
tree | ac74a4a4f71ab38b3b68a2193b492bb0100ddae0 /src/gallium | |
parent | ad1521d7088b7e9e7f9bad474419924bfabc064e (diff) |
broadcom/vc5: Fix array texture layer count setup.
Fixes piglit array-texture.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_state.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc5/vc5_state.c b/src/gallium/drivers/vc5/vc5_state.c index dc0ee12260b..b7f9c405e4a 100644 --- a/src/gallium/drivers/vc5/vc5_state.c +++ b/src/gallium/drivers/vc5/vc5_state.c @@ -623,7 +623,12 @@ vc5_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc, v3dx_pack(&so->texture_shader_state, TEXTURE_SHADER_STATE, tex) { tex.image_width = prsc->width0 * msaa_scale; tex.image_height = prsc->height0 * msaa_scale; - tex.image_depth = prsc->depth0; + if (prsc->target == PIPE_TEXTURE_3D) { + tex.image_depth = prsc->depth0; + } else { + tex.image_depth = (cso->u.tex.last_layer - + cso->u.tex.first_layer) + 1; + } tex.srgb = util_format_is_srgb(cso->format); |