summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_state_derived.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2007-08-09 18:07:42 +0100
committerKeith Whitwell <[email protected]>2007-08-09 18:09:09 +0100
commit7c9a1357beabd6d0df88142d31cd5d77a012e85a (patch)
treec9b098a7c3de4bf44858de4d72cbead8d59bafcf /src/mesa/pipe/i915simple/i915_state_derived.c
parentb3efc75f1a3496cbd0b93b5eff497a92fa31dc3b (diff)
Add more i915 state packets.
These correspond to the dynamic indirect state, though they are currently just pushed straight to the batch buffer.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state_derived.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_state_derived.c44
1 files changed, 4 insertions, 40 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state_derived.c b/src/mesa/pipe/i915simple/i915_state_derived.c
index 32b8b6c808d..7d03ed5567b 100644
--- a/src/mesa/pipe/i915simple/i915_state_derived.c
+++ b/src/mesa/pipe/i915simple/i915_state_derived.c
@@ -134,40 +134,6 @@ static void calculate_vertex_layout( struct i915_context *i915 )
}
-/**
- * Recompute cliprect from scissor bounds, scissor enable and surface size.
- */
-static void
-compute_cliprect(struct i915_context *sp)
-{
- GLint surfWidth, surfHeight;
-
- if (sp->framebuffer.num_cbufs > 0) {
- surfWidth = sp->framebuffer.cbufs[0]->width;
- surfHeight = sp->framebuffer.cbufs[0]->height;
- }
- else {
- /* no surface? */
- surfWidth = sp->scissor.maxx;
- surfHeight = sp->scissor.maxy;
- }
-
- if (sp->setup.scissor) {
- /* clip to scissor rect */
- sp->cliprect.minx = MAX2(sp->scissor.minx, 0);
- sp->cliprect.miny = MAX2(sp->scissor.miny, 0);
- sp->cliprect.maxx = MIN2(sp->scissor.maxx, surfWidth);
- sp->cliprect.maxy = MIN2(sp->scissor.maxy, surfHeight);
- }
- else {
- /* clip to surface bounds */
- sp->cliprect.minx = 0;
- sp->cliprect.miny = 0;
- sp->cliprect.maxx = surfWidth;
- sp->cliprect.maxy = surfHeight;
- }
-}
-
/* Hopefully this will remain quite simple, otherwise need to pull in
* something like the state tracker mechanism.
@@ -177,18 +143,16 @@ void i915_update_derived( struct i915_context *i915 )
if (i915->dirty & (I915_NEW_SETUP | I915_NEW_FS))
calculate_vertex_layout( i915 );
- if (i915->dirty & (I915_NEW_SCISSOR |
- I915_NEW_STENCIL |
- I915_NEW_FRAMEBUFFER))
- compute_cliprect(i915);
-
if (i915->dirty)
i915_update_immediate( i915 );
+ if (i915->dirty)
+ i915_update_dynamic( i915 );
+
/* HW emit currently references framebuffer state directly:
*/
if (i915->dirty & I915_NEW_FRAMEBUFFER)
- i915->hardware_dirty = 1;
+ i915->hardware_dirty |= I915_HW_STATIC;
i915->dirty = 0;
}