pipe_resource_reference(&This->resource, pResource);
- This->pipe = pParams->device->pipe;
This->transfer = NULL;
This->lock_count = 0;
const D3DBOX *pBox,
DWORD Flags )
{
+ struct pipe_context *pipe;
struct pipe_resource *resource = This->resource;
struct pipe_box box;
unsigned usage;
pLockedVolume->pBits =
NineVolume9_GetSystemMemPointer(This, box.x, box.y, box.z);
} else {
+ pipe = NineDevice9_GetPipe(This->base.device);
pLockedVolume->pBits =
- This->pipe->transfer_map(This->pipe, resource, This->level, usage,
- &box, &This->transfer);
+ pipe->transfer_map(pipe, resource, This->level, usage,
+ &box, &This->transfer);
if (!This->transfer) {
if (Flags & D3DLOCK_DONOTWAIT)
return D3DERR_WASSTILLDRAWING;
HRESULT NINE_WINAPI
NineVolume9_UnlockBox( struct NineVolume9 *This )
{
+ struct pipe_context *pipe;
+
DBG("This=%p lock_count=%u\n", This, This->lock_count);
user_assert(This->lock_count, D3DERR_INVALIDCALL);
if (This->transfer) {
- This->pipe->transfer_unmap(This->pipe, This->transfer);
+ pipe = NineDevice9_GetPipe(This->base.device);
+ pipe->transfer_unmap(pipe, This->transfer);
This->transfer = NULL;
}
--This->lock_count;
u_box_3d(0, 0, 0, This->desc.Width, This->desc.Height, This->desc.Depth,
&box);
+ pipe = NineDevice9_GetPipe(This->base.device);
if (!dst) {
- dst = This->pipe->transfer_map(This->pipe,
- This->resource,
- This->level,
- PIPE_TRANSFER_WRITE |
- PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE,
- &box, &transfer);
+ dst = pipe->transfer_map(pipe,
+ This->resource,
+ This->level,
+ PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE,
+ &box, &transfer);
if (!dst)
return D3D_OK;
}
This->desc.Depth);
if (!This->data)
- pipe_transfer_unmap(This->pipe, transfer);
+ pipe_transfer_unmap(pipe, transfer);
}
return D3D_OK;
unsigned dstx, unsigned dsty, unsigned dstz,
struct pipe_box *pSrcBox )
{
- struct pipe_context *pipe = This->pipe;
+ struct pipe_context *pipe;
struct pipe_transfer *transfer = NULL;
struct pipe_resource *r_dst = This->resource;
struct pipe_box src_box;
dst_box.height = src_box.height;
dst_box.depth = src_box.depth;
+ pipe = NineDevice9_GetPipe(This->base.device);
+
map = pipe->transfer_map(pipe,
r_dst,
This->level,
NineVolume9_UploadSelf( struct NineVolume9 *This,
const struct pipe_box *damaged )
{
- struct pipe_context *pipe = This->pipe;
+ struct pipe_context *pipe;
struct pipe_resource *res = This->resource;
struct pipe_box box;
uint8_t *ptr;
ptr = NineVolume9_GetSystemMemPointer(This, box.x, box.y, box.z);
+ pipe = NineDevice9_GetPipe(This->base.device);
pipe->texture_subdata(pipe, res, This->level, 0, &box,
ptr, This->stride, This->layer_stride);