diff options
author | Jakob Bornecrantz <[email protected]> | 2009-09-22 10:55:41 -0700 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-09-22 11:06:56 -0700 |
commit | e369294f760efd89754f4f66a1080bcf384ba4c6 (patch) | |
tree | 4a1dc768caf3a722f58cb336c56d1a0c378c81f0 /src/gallium/drivers/i915simple/i915_state.c | |
parent | 67d7021ae06e1c3559f3c0c35162768fcd1402d4 (diff) |
i915g: Do propper references of surfaces in context
Diffstat (limited to 'src/gallium/drivers/i915simple/i915_state.c')
-rw-r--r-- | src/gallium/drivers/i915simple/i915_state.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915simple/i915_state.c b/src/gallium/drivers/i915simple/i915_state.c index 0087dfa410f..7d48e6e84d5 100644 --- a/src/gallium/drivers/i915simple/i915_state.c +++ b/src/gallium/drivers/i915simple/i915_state.c @@ -588,9 +588,17 @@ static void i915_set_framebuffer_state(struct pipe_context *pipe, const struct pipe_framebuffer_state *fb) { struct i915_context *i915 = i915_context(pipe); + int i; + draw_flush(i915->draw); - i915->framebuffer = *fb; /* struct copy */ + i915->framebuffer.width = fb->width; + i915->framebuffer.height = fb->height; + i915->framebuffer.nr_cbufs = fb->nr_cbufs; + for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { + pipe_surface_reference(&i915->framebuffer.cbufs[i], fb->cbufs[i]); + } + pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf); i915->dirty |= I915_NEW_FRAMEBUFFER; } |