summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_texture.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_texture.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c
index 1487f7441c9..5ba851fa104 100644
--- a/src/gallium/drivers/freedreno/freedreno_texture.c
+++ b/src/gallium/drivers/freedreno/freedreno_texture.c
@@ -70,6 +70,7 @@ static void set_sampler_views(struct fd_texture_stateobj *tex,
unsigned start, unsigned nr, struct pipe_sampler_view **views)
{
unsigned i;
+ unsigned samplers = 0;
for (i = 0; i < nr; i++) {
struct pipe_sampler_view *view = views ? views[i] : NULL;
@@ -82,6 +83,13 @@ static void set_sampler_views(struct fd_texture_stateobj *tex,
}
tex->num_textures = util_last_bit(tex->valid_textures);
+
+ for (i = 0; i < tex->num_textures; i++) {
+ uint nr_samples = tex->textures[i]->texture->nr_samples;
+ samplers |= (nr_samples >> 1) << (i * 2);
+ }
+
+ tex->samples = samplers;
}
void