Lines Matching refs:rsc

257       struct fd_resource *rsc = (struct fd_resource *)entry->key;
259 assert(rsc->track->batch_mask & (1 << batch->idx));
260 rsc->track->batch_mask &= ~(1 << batch->idx);
261 if (rsc->track->write_batch == batch)
262 fd_batch_reference_locked(&rsc->track->write_batch, NULL);
424 flush_write_batch(struct fd_resource *rsc) assert_dt
427 fd_batch_reference_locked(&b, rsc->track->write_batch);
437 fd_batch_add_resource(struct fd_batch *batch, struct fd_resource *rsc)
440 if (likely(fd_batch_references_resource(batch, rsc))) {
441 assert(_mesa_set_search_pre_hashed(batch->resources, rsc->hash, rsc));
445 assert(!_mesa_set_search(batch->resources, rsc));
447 _mesa_set_add_pre_hashed(batch->resources, rsc->hash, rsc);
448 rsc->track->batch_mask |= (1 << batch->idx);
452 fd_batch_resource_write(struct fd_batch *batch, struct fd_resource *rsc)
456 DBG("%p: write %p", batch, rsc);
461 rsc->valid = true;
463 if (rsc->track->write_batch == batch)
466 fd_batch_write_prep(batch, rsc);
468 if (rsc->stencil)
469 fd_batch_resource_write(batch, rsc->stencil);
471 /* note, invalidate write batch, to avoid further writes to rsc
475 if (unlikely(rsc->track->batch_mask & ~(1 << batch->idx))) {
479 if (rsc->track->write_batch)
480 flush_write_batch(rsc);
482 foreach_batch (dep, cache, rsc->track->batch_mask) {
496 fd_batch_reference_locked(&rsc->track->write_batch, batch);
498 fd_batch_add_resource(batch, rsc);
502 fd_batch_resource_read_slowpath(struct fd_batch *batch, struct fd_resource *rsc)
506 if (rsc->stencil)
507 fd_batch_resource_read(batch, rsc->stencil);
509 DBG("%p: read %p", batch, rsc);
515 if (unlikely(rsc->track->write_batch && rsc->track->write_batch != batch))
516 flush_write_batch(rsc);
518 fd_batch_add_resource(batch, rsc);