diff options
author | Axel Davy <[email protected]> | 2018-12-03 21:24:54 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2018-12-23 08:14:50 +0100 |
commit | 104681c5d528a823a3fdc3f7d9c6f8133c27201c (patch) | |
tree | 910ea76ff04075b1ad4c09f4c5d89dc07a723e9b /src/gallium/state_trackers/nine | |
parent | 42d672fa6a766363e5703f119607f7c7975918aa (diff) |
st/nine: Add src reference to nine_context_range_upload
Just like nine_context_box_upload, nine_context_range_upload
should reference the src, which holds the ram source buffer.
Fixes: https://github.com/iXit/Mesa-3D/issues/327
Signed-off-by: Axel Davy <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r-- | src/gallium/state_trackers/nine/buffer9.h | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/buffer9.h b/src/gallium/state_trackers/nine/buffer9.h index b04a0a721bb..1803d8d6405 100644 --- a/src/gallium/state_trackers/nine/buffer9.h +++ b/src/gallium/state_trackers/nine/buffer9.h @@ -104,7 +104,9 @@ NineBuffer9_Upload( struct NineBuffer9 *This ) struct NineDevice9 *device = This->base.base.device; assert(This->base.pool == D3DPOOL_MANAGED && This->managed.dirty); - nine_context_range_upload(device, &This->managed.pending_upload, This->base.resource, + nine_context_range_upload(device, &This->managed.pending_upload, + (struct NineUnknown *)This, + This->base.resource, This->managed.dirty_box.x, This->managed.dirty_box.width, (char *)This->managed.data + This->managed.dirty_box.x); diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 4872e24f439..02673c1f6ed 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -2423,6 +2423,7 @@ CSMT_ITEM_NO_WAIT(nine_context_gen_mipmap, } CSMT_ITEM_NO_WAIT_WITH_COUNTER(nine_context_range_upload, + ARG_BIND_REF(struct NineUnknown, src_ref), ARG_BIND_RES(struct pipe_resource, res), ARG_VAL(unsigned, offset), ARG_VAL(unsigned, size), @@ -2430,6 +2431,9 @@ CSMT_ITEM_NO_WAIT_WITH_COUNTER(nine_context_range_upload, { struct nine_context *context = &device->context; + /* Binding src_ref avoids release before upload */ + (void)src_ref; + context->pipe->buffer_subdata(context->pipe, res, 0, offset, size, data); } diff --git a/src/gallium/state_trackers/nine/nine_state.h b/src/gallium/state_trackers/nine/nine_state.h index 8de9f84a256..55960007bfb 100644 --- a/src/gallium/state_trackers/nine/nine_state.h +++ b/src/gallium/state_trackers/nine/nine_state.h @@ -560,6 +560,7 @@ nine_context_gen_mipmap(struct NineDevice9 *device, void nine_context_range_upload(struct NineDevice9 *device, unsigned *counter, + struct NineUnknown *src_ref, struct pipe_resource *res, unsigned offset, unsigned size, |