diff options
author | Axel Davy <[email protected]> | 2016-12-04 10:32:01 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:47:08 +0100 |
commit | 525a1b292a3d65857db06832e175fba840b75ff8 (patch) | |
tree | f7b79701a4fa6d71fd927b23245ab0241a4742b8 /src/gallium | |
parent | 325324c749c2331162e7889efc335bfcfcd27005 (diff) |
st/nine: Add arguments to context's blit and copy_region
The new arguments enable to reference the objects while
the function hasn't run.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 14 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.h | 4 |
3 files changed, 22 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 45fe5b5fcd8..91c4535a144 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -1723,7 +1723,8 @@ NineDevice9_StretchRect( struct NineDevice9 *This, PIPE_BIND_RENDER_TARGET), D3DERR_INVALIDCALL); - nine_context_blit(This, &blit); + nine_context_blit(This, (struct NineUnknown *)dst, + (struct NineUnknown *)src, &blit); } else { assert(blit.dst.box.x >= 0 && blit.dst.box.y >= 0 && blit.src.box.x >= 0 && blit.src.box.y >= 0 && @@ -1733,11 +1734,12 @@ NineDevice9_StretchRect( struct NineDevice9 *This, blit.src.box.y + blit.src.box.height <= src->desc.Height); /* Or drivers might crash ... */ DBG("Using resource_copy_region.\n"); - nine_context_resource_copy_region(This, - blit.dst.resource, blit.dst.level, - &blit.dst.box, - blit.src.resource, blit.src.level, - &blit.src.box); + nine_context_resource_copy_region(This, (struct NineUnknown *)dst, + (struct NineUnknown *)src, + blit.dst.resource, blit.dst.level, + &blit.dst.box, + blit.src.resource, blit.src.level, + &blit.src.box); } /* Communicate the container it needs to update sublevels - if apply */ diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 88fa01f3483..c0bd6f7bccf 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -2652,6 +2652,8 @@ CSMT_ITEM_NO_WAIT(nine_context_draw_indexed_primitive_from_vtxbuf_idxbuf, } CSMT_ITEM_NO_WAIT(nine_context_resource_copy_region, + ARG_BIND_REF(struct NineUnknown, dst), + ARG_BIND_REF(struct NineUnknown, src), ARG_BIND_RES(struct pipe_resource, dst_res), ARG_VAL(unsigned, dst_level), ARG_COPY_REF(struct pipe_box, dst_box), @@ -2661,6 +2663,9 @@ CSMT_ITEM_NO_WAIT(nine_context_resource_copy_region, { struct nine_context *context = &device->context; + (void) dst; + (void) src; + context->pipe->resource_copy_region(context->pipe, dst_res, dst_level, dst_box->x, dst_box->y, dst_box->z, @@ -2669,10 +2674,15 @@ CSMT_ITEM_NO_WAIT(nine_context_resource_copy_region, } CSMT_ITEM_NO_WAIT(nine_context_blit, + ARG_BIND_REF(struct NineUnknown, dst), + ARG_BIND_REF(struct NineUnknown, src), ARG_BIND_BLIT(struct pipe_blit_info, blit)) { struct nine_context *context = &device->context; + (void) dst; + (void) src; + context->pipe->blit(context->pipe, blit); } diff --git a/src/gallium/state_trackers/nine/nine_state.h b/src/gallium/state_trackers/nine/nine_state.h index 68dca40241b..a487d8cafff 100644 --- a/src/gallium/state_trackers/nine/nine_state.h +++ b/src/gallium/state_trackers/nine/nine_state.h @@ -519,6 +519,8 @@ nine_context_draw_indexed_primitive_from_vtxbuf_idxbuf(struct NineDevice9 *devic void nine_context_resource_copy_region(struct NineDevice9 *device, + struct NineUnknown *dst, + struct NineUnknown *src, struct pipe_resource* dst_res, unsigned dst_level, const struct pipe_box *dst_box, @@ -528,6 +530,8 @@ nine_context_resource_copy_region(struct NineDevice9 *device, void nine_context_blit(struct NineDevice9 *device, + struct NineUnknown *dst, + struct NineUnknown *src, struct pipe_blit_info *blit); void |