summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri2.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-05-23 22:25:12 -0400
committerMarek Olšák <[email protected]>2018-07-31 18:28:41 -0400
commit8632626c81a09315276d7defa63092247d7fd308 (patch)
treeed5377da2e0d5e3061b333e49651988124c226d8 /src/gallium/state_trackers/dri/dri2.c
parent0caf74bbcdf38914cecffa8772ee9b122b249b78 (diff)
gallium: add pipe_resource::nr_storage_samples, and set it same as nr_samples
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri/dri2.c')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 34205853335..9a22e47693b 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -832,6 +832,7 @@ dri2_allocate_textures(struct dri_context *ctx,
templ.bind = drawable->textures[statt]->bind &
~(PIPE_BIND_SCANOUT | PIPE_BIND_SHARED);
templ.nr_samples = drawable->stvis.samples;
+ templ.nr_storage_samples = drawable->stvis.samples;
/* Try to reuse the resource.
* (the other resource parameters should be constant)
@@ -883,10 +884,12 @@ dri2_allocate_textures(struct dri_context *ctx,
if (drawable->stvis.samples > 1) {
templ.nr_samples = drawable->stvis.samples;
+ templ.nr_storage_samples = drawable->stvis.samples;
zsbuf = &drawable->msaa_textures[statt];
}
else {
templ.nr_samples = 0;
+ templ.nr_storage_samples = 0;
zsbuf = &drawable->textures[statt];
}