Kenneth Graunke <kenn...@whitecape.org> writes: > When mapping a buffer object with GL_MAP_INVALIDATE_RANGE_BIT and > GL_MAP_FLUSH_EXPLICIT_BIT and encountering a busy BO, we malloc'd > a temporary buffer. Then, on FlushMappedBufferRange, we'd allocate > a second temporary BO, immediately pwrite the data to that (copy #1), > then use the BLT ring to write it into the original buffer (copy #2). > > This is unnecessary. Just use a BO in the first place, like the > non-explicit-flushing case, and set a flag to control when we should > do the linear blit.
> @@ -388,27 +384,20 @@ intel_bufferobj_flush_mapped_range(struct gl_context > *ctx, > { > struct intel_context *intel = intel_context(ctx); > struct intel_buffer_object *intel_obj = intel_buffer_object(obj); > - drm_intel_bo *temp_bo; > > /* Unless we're in the range map using a temporary system buffer, > * there's no work to do. > */ > - if (intel_obj->range_map_buffer == NULL) > + if (!intel_obj->explicit_flush) > return; > > if (length == 0) > return; > > - temp_bo = drm_intel_bo_alloc(intel->bufmgr, "range map flush", length, > 64); > - > - drm_intel_bo_subdata(temp_bo, 0, length, intel_obj->range_map_buffer); > - > intel_emit_linear_blit(intel, > intel_obj->buffer, obj->Offset + offset, > - temp_bo, 0, > + intel_obj->range_map_bo, 0, I think that's supposed to be "intel_obj->range_map_bo, offset" Also wow I think we need more ARB_mbr tests. > length);
pgpUEbl5uaScj.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev