i965: Move curb_read_length/total_scratch to brw_stage_prog_data.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_context.h
index 24bf023230bc7f359fd36047c1b819850e0e2e44..d1ec2ea447ea189df93a3fe610b51b95fcd0f75c 100644 (file)
@@ -229,7 +229,7 @@ struct brw_state_flags {
    /**
     * State update flags signalled as the result of brw_tracked_state updates
     */
-   GLuint brw;
+   uint64_t brw;
    /**
     * State update flags that used to be signalled by brw_state_cache.c
     * searches.
@@ -282,6 +282,18 @@ typedef enum {
    } while (false)
 
 
+/**
+ * Set all of the bits in a field of brw_state_flags.
+ */
+#define SET_DIRTY64_ALL(FIELD) \
+   do { \
+      /* ~0ULL == 0xffffffffffffffff, so make sure field is <= 64 bits */ \
+      STATIC_ASSERT(sizeof(brw->state.pipeline_dirty[0].FIELD) == 8); \
+      for (int pipeline = 0; pipeline < BRW_NUM_PIPELINES; pipeline++) \
+         brw->state.pipeline_dirty[pipeline].FIELD = ~(0ULL); \
+   } while (false)
+
+
 /**
  * Check one of the bits in a field of brw_state_flags.
  */
@@ -347,6 +359,9 @@ struct brw_stage_prog_data {
    GLuint nr_params;       /**< number of float params/constants */
    GLuint nr_pull_params;
 
+   unsigned curb_read_length;
+   unsigned total_scratch;
+
    /**
     * Register where the thread expects to find input data from the URB
     * (typically uniforms, followed by vertex or fragment attributes).
@@ -374,13 +389,11 @@ struct brw_stage_prog_data {
 struct brw_wm_prog_data {
    struct brw_stage_prog_data base;
 
-   GLuint curb_read_length;
    GLuint num_varying_inputs;
 
    GLuint dispatch_grf_start_reg_16;
    GLuint reg_blocks;
    GLuint reg_blocks_16;
-   GLuint total_scratch;
 
    struct {
       /** @{
@@ -580,10 +593,8 @@ struct brw_vec4_prog_data {
    struct brw_stage_prog_data base;
    struct brw_vue_map vue_map;
 
-   GLuint curb_read_length;
    GLuint urb_read_length;
    GLuint total_grf;
-   GLuint total_scratch;
 
    /* Used for calculating urb partitions.  In the VS, this is the size of the
     * URB entry used for both input and output to the thread.  In the GS, this
@@ -1356,8 +1367,8 @@ struct brw_context
       int entries_per_oa_snapshot;
    } perfmon;
 
-   int num_atoms;
-   const struct brw_tracked_state **atoms;
+   int num_atoms[BRW_NUM_PIPELINES];
+   const struct brw_tracked_state **atoms[BRW_NUM_PIPELINES];
 
    /* If (INTEL_DEBUG & DEBUG_BATCH) */
    struct {