iris: hack around samples confusion
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 24 Jul 2018 17:59:10 +0000 (10:59 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:07 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index aa92b5726754dc1a4dc46b1f36787091dcc73012..10fcf9da1dbeef45a31ca8126c1052c67bcc36ea 100644 (file)
@@ -1365,7 +1365,9 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
    struct isl_device *isl_dev = &screen->isl_dev;
    struct pipe_framebuffer_state *cso = &ice->state.framebuffer;
 
-   if (cso->samples != state->samples) {
+   unsigned samples = util_framebuffer_get_num_samples(state);
+
+   if (cso->samples != samples) {
       ice->state.dirty |= IRIS_DIRTY_MULTISAMPLE;
    }
 
@@ -1378,6 +1380,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
    }
 
    util_copy_framebuffer_state(cso, state);
+   cso->samples = samples;
 
    struct iris_depth_buffer_state *cso_z = &ice->state.genx->depth_buffer;