diff options
author | Jakob Bornecrantz <[email protected]> | 2009-09-09 00:38:04 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2009-09-09 00:43:36 +0100 |
commit | e589a37f7b72da4f5eb8cbb46443d7baf710b37c (patch) | |
tree | 101fd89d276eb12d107fdfb910e92108a089074b /src/gallium/winsys | |
parent | d1121328402dc2e9480ca69bcfd9e3aac5f024a4 (diff) |
i915g: Add buffer write callback
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c b/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c index e932f71e42c..0030f915a36 100644 --- a/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c +++ b/src/gallium/winsys/drm/intel/gem/intel_drm_buffer.c @@ -110,6 +110,18 @@ intel_drm_buffer_unmap(struct intel_winsys *iws, drm_intel_bo_unmap(intel_bo(buffer)); } +static int +intel_drm_buffer_write(struct intel_winsys *iws, + struct intel_buffer *buffer, + const void *data, + size_t size, + size_t offset) +{ + struct intel_drm_buffer *buf = intel_drm_buffer(buffer); + + return drm_intel_bo_subdata(buf->bo, offset, size, (void*)data); +} + static void intel_drm_buffer_destroy(struct intel_winsys *iws, struct intel_buffer *buffer) @@ -131,5 +143,6 @@ intel_drm_winsys_init_buffer_functions(struct intel_drm_winsys *idws) idws->base.buffer_set_fence_reg = intel_drm_buffer_set_fence_reg; idws->base.buffer_map = intel_drm_buffer_map; idws->base.buffer_unmap = intel_drm_buffer_unmap; + idws->base.buffer_write = intel_drm_buffer_write; idws->base.buffer_destroy = intel_drm_buffer_destroy; } |