* 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
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 */
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];
}
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]);
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;