Skip to Content
GPGPU Programming for Games and Science
book

GPGPU Programming for Games and Science

by David H. Eberly
August 2014
Intermediate to advanced
469 pages
16h 30m
English
A K Peters/CRC Press
Content preview from GPGPU Programming for Games and Science
208 GPGPU Programming for Games and Science
FIGURE 4.12: Copying data between processors.
D3D11 MAPPED SUBRESOURCE s ub ;
context>Map ( out put . b u f f e r , 0 , D3D11
MAP WRITE DISCARD, 0 , &sub ) ;
memcpy(sub .pData , input . data + input . offset , input .numActiveBytes );
context>Unmap( output . buffer , 0);
LISTING 4.55: Updating an ID3D11Buffer object using mapped writes.
The
ID3D11DeviceContext::Map function [39] takes as input the buffer object,
the subresource index zero because buffers have only one subresource, a
D3D11 MAP value [29], and a D3D11 MAP FLAG value [30]; the function then
fills in a
D3D11 MAPPED SUBRESOURCE subresource data structure ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics Gems V (IBM Version)

Graphics Gems V (IBM Version)

Alan W. Paeth
GPU Pro 6

GPU Pro 6

Wolfgang Engel

Publisher Resources

ISBN: 9781466595354