[Mesa-dev] [PATCH 80/84] st/nine: Add arguments to context's blit and copy_region
Axel Davy
axel.davy at ens.fr
Wed Dec 7 22:55:53 UTC 2016
The new arguments enable to reference the objects while
the function hasn't run.
Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
src/gallium/state_trackers/nine/device9.c | 14 ++++++++------
src/gallium/state_trackers/nine/nine_state.c | 10 ++++++++++
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 bb3ad9b..91f09de 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 f0eb23d..3c3a2ac 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -2656,6 +2656,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),
@@ -2665,6 +2667,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,
@@ -2673,10 +2678,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 68dca40..a487d8c 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
--
2.10.2
More information about the mesa-dev
mailing list