summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 11d438be3da..44a35d1a840 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -448,6 +448,11 @@ brwCreateContext(int api,
brw->state.dirty.mesa = ~0;
brw->state.dirty.brw = ~0;
+ /* Make sure that brw->state.dirty.brw has enough bits to hold all possible
+ * dirty flags.
+ */
+ STATIC_ASSERT(BRW_NUM_STATE_BITS <= 8 * sizeof(brw->state.dirty.brw));
+
brw->emit_state_always = 0;
brw->batch.need_workaround_flush = true;
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 4067645a6d3..419cf174092 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -155,6 +155,7 @@ enum brw_state_id {
BRW_STATE_UNIFORM_BUFFER,
BRW_STATE_META_IN_PROGRESS,
BRW_STATE_INTERPOLATION_MAP,
+ BRW_NUM_STATE_BITS
};
#define BRW_NEW_URB_FENCE (1 << BRW_STATE_URB_FENCE)