projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i915g: Do generic remapping.
[mesa.git]
/
src
/
gallium
/
drivers
/
i915
/
i915_context.c
diff --git
a/src/gallium/drivers/i915/i915_context.c
b/src/gallium/drivers/i915/i915_context.c
index cbf919754e56e4f3391133942f92fb0ad8a4493b..7a98ef73c1fbd99d234f3799dd53a8900fe8cce0 100644
(file)
--- a/
src/gallium/drivers/i915/i915_context.c
+++ b/
src/gallium/drivers/i915/i915_context.c
@@
-39,7
+39,7
@@
#include "pipe/p_screen.h"
#include "pipe/p_screen.h"
-DEBUG_GET_ONCE_BOOL_OPTION(i915_no_vbuf, "I915_NO_VBUF", FALSE)
;
+DEBUG_GET_ONCE_BOOL_OPTION(i915_no_vbuf, "I915_NO_VBUF", FALSE)
/*
/*
@@
-103,6
+103,9
@@
static void i915_destroy(struct pipe_context *pipe)
int i;
draw_destroy(i915->draw);
int i;
draw_destroy(i915->draw);
+
+ if (i915->blitter)
+ util_blitter_destroy(i915->blitter);
if(i915->batch)
i915->iws->batchbuffer_destroy(i915->batch);
if(i915->batch)
i915->iws->batchbuffer_destroy(i915->batch);
@@
-137,7
+140,10
@@
i915_create_context(struct pipe_screen *screen, void *priv)
i915->base.destroy = i915_destroy;
i915->base.destroy = i915_destroy;
- i915->base.clear = i915_clear;
+ if (i915_screen(screen)->debug.use_blitter)
+ i915->base.clear = i915_clear_blitter;
+ else
+ i915->base.clear = i915_clear_render;
i915->base.draw_vbo = i915_draw_vbo;
i915->base.draw_vbo = i915_draw_vbo;
@@
-145,6
+151,10
@@
i915_create_context(struct pipe_screen *screen, void *priv)
util_slab_create(&i915->transfer_pool, sizeof(struct pipe_transfer),
16, UTIL_SLAB_SINGLETHREADED);
util_slab_create(&i915->transfer_pool, sizeof(struct pipe_transfer),
16, UTIL_SLAB_SINGLETHREADED);
+ /* Batch stream debugging is a bit hacked up at the moment:
+ */
+ i915->batch = i915->iws->batchbuffer_create(i915->iws);
+
/*
* Create drawing context and plug our rendering stage into it.
*/
/*
* Create drawing context and plug our rendering stage into it.
*/
@@
-164,15
+174,19
@@
i915_create_context(struct pipe_screen *screen, void *priv)
draw_install_aaline_stage(i915->draw, &i915->base);
draw_install_aapoint_stage(i915->draw, &i915->base);
draw_install_aaline_stage(i915->draw, &i915->base);
draw_install_aapoint_stage(i915->draw, &i915->base);
+ /* augmented draw pipeline clobbers state functions */
+ i915_init_fixup_state_functions(i915);
+
+ /* Create blitter last - calls state creation functions. */
+ i915->blitter = util_blitter_create(&i915->base);
+ assert(i915->blitter);
+
i915->dirty = ~0;
i915->hardware_dirty = ~0;
i915->immediate_dirty = ~0;
i915->dynamic_dirty = ~0;
i915->dirty = ~0;
i915->hardware_dirty = ~0;
i915->immediate_dirty = ~0;
i915->dynamic_dirty = ~0;
+ i915->static_dirty = ~0;
i915->flush_dirty = 0;
i915->flush_dirty = 0;
- /* Batch stream debugging is a bit hacked up at the moment:
- */
- i915->batch = i915->iws->batchbuffer_create(i915->iws);
-
return &i915->base;
}
return &i915->base;
}