iris: Drop can_fast_clear_color's format parameter
[mesa.git] / src / gallium / drivers / iris / iris_binder.c
index 5bc0f7648199aeaa7fa9c7a1856a9280a720bdb0..19ee29fe9d7b24c02e271fd9672fd8de0655c3a9 100644 (file)
@@ -98,7 +98,8 @@ binder_realloc(struct iris_context *ice)
     * We do this here so that iris_binder_reserve_3d correctly gets a new
     * larger total_size when making the updated reservation.
     */
-   ice->state.dirty |= IRIS_ALL_DIRTY_BINDINGS;
+   ice->state.dirty |= IRIS_DIRTY_RENDER_BUFFER;
+   ice->state.stage_dirty |= IRIS_ALL_STAGE_DIRTY_BINDINGS;
 }
 
 static uint32_t
@@ -142,7 +143,8 @@ iris_binder_reserve_3d(struct iris_context *ice)
    unsigned total_size;
 
    /* If nothing is dirty, skip all this. */
-   if (!(ice->state.dirty & IRIS_ALL_DIRTY_BINDINGS))
+   if (!(ice->state.dirty & IRIS_DIRTY_RENDER_BUFFER) &&
+       !(ice->state.stage_dirty & IRIS_ALL_STAGE_DIRTY_BINDINGS))
       return;
 
    /* Get the binding table sizes for each stage */
@@ -150,18 +152,15 @@ iris_binder_reserve_3d(struct iris_context *ice)
       if (!shaders[stage])
          continue;
 
-      const struct brw_stage_prog_data *prog_data =
-         (const void *) shaders[stage]->prog_data;
-
       /* Round up the size so our next table has an aligned starting offset */
-      sizes[stage] = align(prog_data->binding_table.size_bytes, BTP_ALIGNMENT);
+      sizes[stage] = align(shaders[stage]->bt.size_bytes, BTP_ALIGNMENT);
    }
 
    /* Make space for the new binding tables...this may take two tries. */
    while (true) {
       total_size = 0;
       for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) {
-         if (ice->state.dirty & (IRIS_DIRTY_BINDINGS_VS << stage))
+         if (ice->state.stage_dirty & (IRIS_STAGE_DIRTY_BINDINGS_VS << stage))
             total_size += sizes[stage];
       }
 
@@ -184,7 +183,7 @@ iris_binder_reserve_3d(struct iris_context *ice)
    uint32_t offset = binder_insert(binder, total_size);
 
    for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) {
-      if (ice->state.dirty & (IRIS_DIRTY_BINDINGS_VS << stage)) {
+      if (ice->state.stage_dirty & (IRIS_STAGE_DIRTY_BINDINGS_VS << stage)) {
          binder->bt_offset[stage] = sizes[stage] > 0 ? offset : 0;
          iris_record_state_size(ice->state.sizes,
                                 binder->bo->gtt_offset + offset, sizes[stage]);
@@ -196,14 +195,14 @@ iris_binder_reserve_3d(struct iris_context *ice)
 void
 iris_binder_reserve_compute(struct iris_context *ice)
 {
-   if (!(ice->state.dirty & IRIS_DIRTY_BINDINGS_CS))
+   if (!(ice->state.stage_dirty & IRIS_STAGE_DIRTY_BINDINGS_CS))
       return;
 
    struct iris_binder *binder = &ice->state.binder;
-   struct brw_stage_prog_data *prog_data =
-      ice->shaders.prog[MESA_SHADER_COMPUTE]->prog_data;
+   struct iris_compiled_shader *shader =
+      ice->shaders.prog[MESA_SHADER_COMPUTE];
 
-   unsigned size = prog_data->binding_table.size_bytes;
+   unsigned size = shader->bt.size_bytes;
 
    if (size == 0)
       return;