projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: add B10G10R10A2_UINT format
[mesa.git]
/
src
/
gallium
/
auxiliary
/
util
/
u_sampler.c
diff --git
a/src/gallium/auxiliary/util/u_sampler.c
b/src/gallium/auxiliary/util/u_sampler.c
index e77f562ea222a2cec01a2f38636d14acad873b3d..bb26099b7e15febdb349ac1223abe3d62b3b5c90 100644
(file)
--- a/
src/gallium/auxiliary/util/u_sampler.c
+++ b/
src/gallium/auxiliary/util/u_sampler.c
@@
-40,8
+40,11
@@
default_template(struct pipe_sampler_view *view,
*/
view->format = format;
*/
view->format = format;
- view->first_level = 0;
- view->last_level = texture->last_level;
+ view->u.tex.first_level = 0;
+ view->u.tex.last_level = texture->last_level;
+ view->u.tex.first_layer = 0;
+ view->u.tex.last_layer = texture->target == PIPE_TEXTURE_3D ?
+ texture->depth0 - 1 : texture->array_size - 1;
view->swizzle_r = PIPE_SWIZZLE_RED;
view->swizzle_g = PIPE_SWIZZLE_GREEN;
view->swizzle_b = PIPE_SWIZZLE_BLUE;
view->swizzle_r = PIPE_SWIZZLE_RED;
view->swizzle_g = PIPE_SWIZZLE_GREEN;
view->swizzle_b = PIPE_SWIZZLE_BLUE;