If we hit the linear blit path, we'd come up with a pitch of 0, then
divide by zero.
Fixes vbo-subdata-zero, made for bug #28931 (warsow).
struct intel_context *intel = intel_context(ctx);
struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
+ if (size == 0)
+ return;
+
assert(intel_obj);
if (intel_obj->region)
if (intel_obj->range_map_buffer == NULL)
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);