<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>NVIDIA CUDA Library: cudaD3D9ResourceGetSurfaceDimensions</title> <link href="customdoxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.8 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> </div> <div class="contents"> <div class="navpath"><a class="el" href="group__CUDART__D3D9__DEPRECATED.html">Direct3D 9 Interoperability [DEPRECATED]</a> </div> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td valign="top"> <div class="navtab"> <table> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_g77fb48ace0d2da465b6f4bcc00ef750b.html#g77fb48ace0d2da465b6f4bcc00ef750b">cudaD3D9MapFlags</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_g59e2838c98639cdc5acdec99856c5aca.html#g59e2838c98639cdc5acdec99856c5aca">cudaD3D9MapResources</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_gcdebbc14eb83032da31bd75503cddfea.html#gcdebbc14eb83032da31bd75503cddfea">cudaD3D9RegisterFlags</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_ga8dabfab33631bc9d8a41f30bc26221c.html#ga8dabfab33631bc9d8a41f30bc26221c">cudaD3D9RegisterResource</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_g60d2dd299c651866dfd0a0480e752783.html#g60d2dd299c651866dfd0a0480e752783">cudaD3D9ResourceGetMappedArray</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_g52d32c6779befee1742e88dc3036bd68.html#g52d32c6779befee1742e88dc3036bd68">cudaD3D9ResourceGetMappedPitch</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_g44923b51ce411b519c9a3f5a1674071a.html#g44923b51ce411b519c9a3f5a1674071a">cudaD3D9ResourceGetMappedPointer</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_gb592b874549ec1375a570fac7f5e9ab9.html#gb592b874549ec1375a570fac7f5e9ab9">cudaD3D9ResourceGetMappedSize</a></td></tr> <tr><td class="navtab"><a class="qindexHL" href="group__CUDART__D3D9__DEPRECATED_gb280fa315e4728a11f13e4691b19ef61.html#gb280fa315e4728a11f13e4691b19ef61">cudaD3D9ResourceGetSurfaceDimensions</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_gf0c339fe2a9d07ebc02c0469a6f8c296.html#gf0c339fe2a9d07ebc02c0469a6f8c296">cudaD3D9ResourceSetMapFlags</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_g50f637c33fa9ca33777735f769e7d9a6.html#g50f637c33fa9ca33777735f769e7d9a6">cudaD3D9UnmapResources</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D9__DEPRECATED_gcca28bc00d63314d2032c36c0ca1fd4d.html#gcca28bc00d63314d2032c36c0ca1fd4d">cudaD3D9UnregisterResource</a></td></tr> </table> </div> </td> <td valign="top"> <a class="anchor" name="gb280fa315e4728a11f13e4691b19ef61"></a><!-- doxytag: member="cuda_d3d9_interop.h::cudaD3D9ResourceGetSurfaceDimensions" ref="gb280fa315e4728a11f13e4691b19ef61" args="(size_t *pWidth, size_t *pHeight, size_t *pDepth, IDirect3DResource9 *pResource, unsigned int face, unsigned int level)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="group__CUDART__TYPES_gf599e5b8b829ce7db0f5216928f6ecb6.html#gf599e5b8b829ce7db0f5216928f6ecb6">cudaError_t</a> cudaD3D9ResourceGetSurfaceDimensions </td> <td>(</td> <td class="paramtype">size_t * </td> <td class="paramname"> <em>pWidth</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"> <em>pHeight</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"> <em>pDepth</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">IDirect3DResource9 * </td> <td class="paramname"> <em>pResource</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>face</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>level</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000014">Deprecated:</a></b></dt><dd>This function is deprecated as of CUDA 3.0.</dd></dl> Returns in <code>*pWidth</code>, <code>*pHeight</code>, and <code>*pDepth</code> the dimensions of the subresource of the mapped Direct3D resource <code>pResource</code> which corresponds to <code>face</code> and <code>level</code>.<p> Since anti-aliased surfaces may have multiple samples per pixel, it is possible that the dimensions of a resource will be an integer factor larger than the dimensions reported by the Direct3D runtime.<p> The parameters <code>pWidth</code>, <code>pHeight</code>, and <code>pDepth</code> are optional. For 2D surfaces, the value returned in <code>*pDepth</code> will be 0.<p> If <code>pResource</code> is not of type IDirect3DBaseTexture9 or IDirect3DSurface9 or if <code>pResource</code> has not been registered for use with CUDA, then <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273">cudaErrorInvalidResourceHandle</a> is returned.<p> For usage requirements of <code>face</code> and <code>level</code> parameters, see <a class="el" href="group__CUDART__D3D9__DEPRECATED_g44923b51ce411b519c9a3f5a1674071a.html#g44923b51ce411b519c9a3f5a1674071a" title="Get a pointer through which to access a subresource of a Direct3D resource which...">cudaD3D9ResourceGetMappedPointer</a>.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pWidth</em> </td><td>- Returned width of surface </td></tr> <tr><td valign="top"></td><td valign="top"><em>pHeight</em> </td><td>- Returned height of surface </td></tr> <tr><td valign="top"></td><td valign="top"><em>pDepth</em> </td><td>- Returned depth of surface </td></tr> <tr><td valign="top"></td><td valign="top"><em>pResource</em> </td><td>- Registered resource to access </td></tr> <tr><td valign="top"></td><td valign="top"><em>face</em> </td><td>- Face of resource to access </td></tr> <tr><td valign="top"></td><td valign="top"><em>level</em> </td><td>- Level of resource to access</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591">cudaSuccess</a>, <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c">cudaErrorInvalidValue</a>, <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273">cudaErrorInvalidResourceHandle</a>, </dd></dl> <dl class="note" compact><dt><b>Note:</b></dt><dd>Note that this function may also return error codes from previous, asynchronous launches.</dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__CUDART__INTEROP_g09f772ed8c6e8e03f396a8895fc42050.html#g09f772ed8c6e8e03f396a8895fc42050" title="Get an array through which to access a subresource of a mapped graphics resource...">cudaGraphicsSubResourceGetMappedArray</a> </dd></dl> </div> </div><p> </td> </tr> </table> </div> <hr size="1"><address style="text-align: right;"><small> Generated by Doxygen for NVIDIA CUDA Library <a href="http://www.nvidia.com/cuda"><img src="nvidia_logo.jpg" alt="NVIDIA" align="middle" border="0" height="80"></a></small></address> </body> </html>