diff options
Diffstat (limited to 'src/gallium/state_trackers/d3d1x')
-rw-r--r-- | src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h index 07612bd5f9a..8c387e3a2bc 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h @@ -1506,15 +1506,16 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> return E_INVALIDARG; if(map_type & D3D10_MAP_FLAG_DO_NOT_WAIT) usage |= PIPE_TRANSFER_DONTBLOCK; - struct pipe_transfer* transfer = pipe->get_transfer(pipe, resource->resource, level, usage, &box); - if(!transfer) { + struct pipe_transfer* transfer; + void *map = pipe->transfer_map(pipe, resource->resource, level, usage, &box, &transfer); + if(!map) { if(map_type & D3D10_MAP_FLAG_DO_NOT_WAIT) return DXGI_ERROR_WAS_STILL_DRAWING; else return E_FAIL; } resource->transfers[subresource] = transfer; - mapped_resource->pData = pipe->transfer_map(pipe, transfer); + mapped_resource->pData = map; mapped_resource->RowPitch = transfer->stride; mapped_resource->DepthPitch = transfer->layer_stride; return S_OK; @@ -1530,7 +1531,6 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> if(i != resource->transfers.end()) { pipe->transfer_unmap(pipe, i->second); - pipe->transfer_destroy(pipe, i->second); resource->transfers.erase(i); } } |