summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-05-21 00:32:04 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:06 -0800
commit7437c28c0d75e6411bfb5958c9849a940036b32e (patch)
tree2886a6218afbe8aa06861995f83e72210ec7ee13 /src/gallium
parentf6017da83febd1dcb070a4d5a96967e5587b70a1 (diff)
iris: util_copy_framebuffer_state (ported from Rob's v3d patches)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_state.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 155ee917b7c..87a34d73721 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -38,6 +38,7 @@
#include "pipe/p_screen.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
+#include "util/u_framebuffer.h"
#include "util/u_transfer.h"
#include "util/u_upload_mgr.h"
#include "i915_drm.h"
@@ -1275,20 +1276,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
ice->state.dirty |= IRIS_DIRTY_BLEND_STATE;
}
- cso->width = state->width;
- cso->height = state->height;
- cso->layers = state->layers;
- cso->samples = state->samples;
-
- unsigned i;
- for (i = 0; i < state->nr_cbufs; i++)
- pipe_surface_reference(&cso->cbufs[i], state->cbufs[i]);
- for (; i < cso->nr_cbufs; i++)
- pipe_surface_reference(&cso->cbufs[i], NULL);
-
- cso->nr_cbufs = state->nr_cbufs;
-
- pipe_surface_reference(&cso->zsbuf, state->zsbuf);
+ util_copy_framebuffer_state(cso, state);
struct iris_depth_buffer_state *cso_z =
malloc(sizeof(struct iris_depth_buffer_state));