aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2016-09-30 18:15:31 +0200
committerAxel Davy <[email protected]>2016-10-10 23:43:51 +0200
commit8a50b1244fcb77334dc9d8e470061cd5f9537375 (patch)
treedd65dc756e996e600e28514f42392f050b3cb791 /src/gallium/state_trackers/nine
parentb5603056872708fdd82f1224854097805a01d4c0 (diff)
st/nine: Prepare update_framebuffer for MS quality levels
Compare resource's nr_samples instead of D3D multisample level. Required for multisample quality levels to work correct. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index a832a13a32a..66c75812c15 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -466,7 +466,7 @@ update_framebuffer(struct NineDevice9 *device, bool is_clear)
struct NineSurface9 *rt0 = state->rt[0];
unsigned w = rt0->desc.Width;
unsigned h = rt0->desc.Height;
- D3DMULTISAMPLE_TYPE nr_samples = rt0->desc.MultiSampleType;
+ unsigned nr_samples = rt0->base.info.nr_samples;
unsigned ps_mask = state->ps ? state->ps->rt_mask : 1;
unsigned mask = is_clear ? 0xf : ps_mask;
const int sRGB = state->rs[D3DRS_SRGBWRITEENABLE] ? 1 : 0;
@@ -489,7 +489,7 @@ update_framebuffer(struct NineDevice9 *device, bool is_clear)
if (rt0->desc.Format == D3DFMT_NULL && state->ds) {
w = state->ds->desc.Width;
h = state->ds->desc.Height;
- nr_samples = state->ds->desc.MultiSampleType;
+ nr_samples = state->ds->base.info.nr_samples;
}
for (i = 0; i < device->caps.NumSimultaneousRTs; ++i) {
@@ -497,7 +497,7 @@ update_framebuffer(struct NineDevice9 *device, bool is_clear)
if (rt && rt->desc.Format != D3DFMT_NULL && (mask & (1 << i)) &&
rt->desc.Width == w && rt->desc.Height == h &&
- rt->desc.MultiSampleType == nr_samples) {
+ rt->base.info.nr_samples == nr_samples) {
fb->cbufs[i] = NineSurface9_GetSurface(rt, sRGB);
state->rt_mask |= 1 << i;
fb->nr_cbufs = i + 1;
@@ -517,7 +517,7 @@ update_framebuffer(struct NineDevice9 *device, bool is_clear)
if (state->ds && state->ds->desc.Width >= w &&
state->ds->desc.Height >= h &&
- state->ds->desc.MultiSampleType == nr_samples) {
+ state->ds->base.info.nr_samples == nr_samples) {
fb->zsbuf = NineSurface9_GetSurface(state->ds, 0);
} else {
fb->zsbuf = NULL;