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 4d8f861ce49047f6d1123235241d49c486c5b03e..bb26099b7e15febdb349ac1223abe3d62b3b5c90 100644
(file)
--- a/
src/gallium/auxiliary/util/u_sampler.c
+++ b/
src/gallium/auxiliary/util/u_sampler.c
@@
-32,7
+32,7
@@
static void
default_template(struct pipe_sampler_view *view,
static void
default_template(struct pipe_sampler_view *view,
- const struct pipe_
textur
e *texture,
+ const struct pipe_
resourc
e *texture,
enum pipe_format format,
unsigned expand_green_blue)
{
enum pipe_format format,
unsigned expand_green_blue)
{
@@
-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;
@@
-77,7
+80,7
@@
default_template(struct pipe_sampler_view *view,
void
u_sampler_view_default_template(struct pipe_sampler_view *view,
void
u_sampler_view_default_template(struct pipe_sampler_view *view,
- const struct pipe_
textur
e *texture,
+ const struct pipe_
resourc
e *texture,
enum pipe_format format)
{
/* Expand to (0, 0, 0, 1) */
enum pipe_format format)
{
/* Expand to (0, 0, 0, 1) */
@@
-89,7
+92,7
@@
u_sampler_view_default_template(struct pipe_sampler_view *view,
void
u_sampler_view_default_dx9_template(struct pipe_sampler_view *view,
void
u_sampler_view_default_dx9_template(struct pipe_sampler_view *view,
- const struct pipe_
textur
e *texture,
+ const struct pipe_
resourc
e *texture,
enum pipe_format format)
{
/* Expand to (1, 1, 1, 1) */
enum pipe_format format)
{
/* Expand to (1, 1, 1, 1) */