projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad1521d
)
broadcom/vc5: Fix array texture layer count setup.
author
Eric Anholt
<eric@anholt.net>
Wed, 22 Nov 2017 00:05:49 +0000
(16:05 -0800)
committer
Eric Anholt
<eric@anholt.net>
Wed, 22 Nov 2017 18:56:31 +0000
(10:56 -0800)
Fixes piglit array-texture.
src/gallium/drivers/vc5/vc5_state.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/vc5/vc5_state.c
b/src/gallium/drivers/vc5/vc5_state.c
index
dc0ee12
..
b7f9c40
100644
(file)
--- 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);