diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_buffer_objects.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c index ff73a37d608..a335c00afde 100644 --- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c @@ -234,7 +234,9 @@ brw_buffer_subdata(struct gl_context *ctx, * up with blitting all the time, at the cost of bandwidth) */ if (offset + size <= intel_obj->gpu_active_start || - intel_obj->gpu_active_end <= offset) { + intel_obj->gpu_active_end <= offset || + offset + size <= intel_obj->valid_data_start || + intel_obj->valid_data_end <= offset) { void *map = brw_bo_map(brw, intel_obj->buffer, MAP_WRITE | MAP_ASYNC); memcpy(map + offset, data, size); brw_bo_unmap(intel_obj->buffer); |