Quoting kevin.rogo...@intel.com (2017-09-25 11:34:06) > +static > +uint32_t > +intel_batchbuffer_state(const struct i965_logged_batchbuffer *st) > +{ > + struct intel_batchbuffer *batch > + = (struct intel_batchbuffer*) st->driver_data; > + > + assert(batch->bo->gem_handle == st->gem_bo);
Hmm, this needs updating for the batch/state split; and of particular note that the batch->bo is no longer constant. It shouldn't matter overall as the contents/offsets are preserved. I would need to go back and see why you need to know the handle before the submit, but the obvious solution to me would be to record the submission. > + return batch->map_next - batch->map; > +} > + > +static > +void > +intel_active_batchbuffer(struct i965_logged_batchbuffer *st) > +{ > + GET_CURRENT_CONTEXT(ctx); > + struct brw_context *brw = brw_context(ctx); > + > + if(brw != NULL && brw->have_active_batchbuffer) { > + st->driver_data = &brw->batch; > + st->gem_bo = brw->batch.bo->gem_handle; > + st->fd = brw_bufmgr_fd(brw->bufmgr); > + } else { > + st->driver_data = NULL; > + st->gem_bo = -1; Fwiw, invalid handle is 0. -Chris _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev