Sophie

Sophie

distrib > Mageia > 2 > i586 > media > nonfree-release > by-pkgid > f86555c654b1f4a4c7ccf47789979868 > files > 709

nvidia-cuda-toolkit-devel-4.2.9-2.mga2.nonfree.i586.rpm

<!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: cudaGraphicsD3D10RegisterResource</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&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
  <div class="navpath"><a class="el" href="group__CUDART__D3D10.html">Direct3D 10 Interoperability</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__D3D10_g1e9ffdd1c631cab046c7d7b64e187f78.html#g1e9ffdd1c631cab046c7d7b64e187f78">cudaD3D10DeviceList</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D10_gce1b0ffcd12555fcf4abcb6b897014bd.html#gce1b0ffcd12555fcf4abcb6b897014bd">cudaD3D10GetDevice</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D10_g8071f1bbd62b11e28466d5905d65205a.html#g8071f1bbd62b11e28466d5905d65205a">cudaD3D10GetDevices</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D10_gade51543178508e9dbb5a28a46810442.html#gade51543178508e9dbb5a28a46810442">cudaD3D10GetDirect3DDevice</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDART__D3D10_geec2934147774dd7a611df971a548675.html#geec2934147774dd7a611df971a548675">cudaD3D10SetDirect3DDevice</a></td></tr>
          <tr><td class="navtab"><a class="qindexHL" href="group__CUDART__D3D10_g6b09dce4d78b948477dd5c451a2725fa.html#g6b09dce4d78b948477dd5c451a2725fa">cudaGraphicsD3D10RegisterResource</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top">
<a class="anchor" name="g6b09dce4d78b948477dd5c451a2725fa"></a><!-- doxytag: member="cuda_d3d10_interop.h::cudaGraphicsD3D10RegisterResource" ref="g6b09dce4d78b948477dd5c451a2725fa" args="(struct cudaGraphicsResource **resource, ID3D10Resource *pD3DResource, unsigned int flags)" -->
<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> cudaGraphicsD3D10RegisterResource           </td>
          <td>(</td>
          <td class="paramtype">struct cudaGraphicsResource **&nbsp;</td>
          <td class="paramname"> <em>resource</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ID3D10Resource *&nbsp;</td>
          <td class="paramname"> <em>pD3DResource</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>flags</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Registers the Direct3D 10 resource <code>pD3DResource</code> for access by CUDA.<p>
If this call is successful, then the application will be able to map and unmap this resource until it is unregistered through <a class="el" href="group__CUDART__INTEROP_g1d45ac44d1affe17fb356e0b7a0b0560.html#g1d45ac44d1affe17fb356e0b7a0b0560" title="Unregisters a graphics resource for access by CUDA.">cudaGraphicsUnregisterResource()</a>. Also on success, this call will increase the internal reference count on <code>pD3DResource</code>. This reference count will be decremented when this resource is unregistered through <a class="el" href="group__CUDART__INTEROP_g1d45ac44d1affe17fb356e0b7a0b0560.html#g1d45ac44d1affe17fb356e0b7a0b0560" title="Unregisters a graphics resource for access by CUDA.">cudaGraphicsUnregisterResource()</a>.<p>
This call potentially has a high-overhead and should not be called every frame in interactive applications.<p>
The type of <code>pD3DResource</code> must be one of the following.<p>
<ul>
<li>ID3D10Buffer: may be accessed via a device pointer</li><li>ID3D10Texture1D: individual subresources of the texture may be accessed via arrays</li><li>ID3D10Texture2D: individual subresources of the texture may be accessed via arrays</li><li>ID3D10Texture3D: individual subresources of the texture may be accessed via arrays</li></ul>
<p>
The <code>flags</code> argument may be used to specify additional parameters at register time. The valid values for this parameter are<p>
<ul>
<li><a class="el" href="group__CUDART__TYPES_gd17cc29b28205bbe32ac575eba16c277.html#ggd17cc29b28205bbe32ac575eba16c277540ff4c59c6782d5bd5a5c7d1534df19">cudaGraphicsRegisterFlagsNone</a>: Specifies no hints about how this resource will be used.</li><li><a class="el" href="group__CUDART__TYPES_gd17cc29b28205bbe32ac575eba16c277.html#ggd17cc29b28205bbe32ac575eba16c2775e6fe684d912bce0098e86e4463a5e85">cudaGraphicsRegisterFlagsSurfaceLoadStore</a>: Specifies that CUDA will bind this resource to a surface reference.</li><li><a class="el" href="group__CUDART__TYPES_gd17cc29b28205bbe32ac575eba16c277.html#ggd17cc29b28205bbe32ac575eba16c277bdb2f88d1ead2a284634cf3fc63be116">cudaGraphicsRegisterFlagsTextureGather</a>: Specifies that CUDA will perform texture gather operations on this resource.</li></ul>
<p>
Not all Direct3D resources of the above types may be used for interoperability with CUDA. The following are some limitations.<p>
<ul>
<li>The primary rendertarget may not be registered with CUDA.</li><li>Resources allocated as shared may not be registered with CUDA.</li><li>Textures which are not of a format which is 1, 2, or 4 channels of 8, 16, or 32-bit integer or floating-point data cannot be shared.</li><li>Surfaces of depth or stencil formats cannot be shared.</li></ul>
<p>
If Direct3D interoperability is not initialized using <a class="el" href="group__CUDART__D3D10_geec2934147774dd7a611df971a548675.html#geec2934147774dd7a611df971a548675" title="Sets the Direct3D 10 device to use for interoperability with a CUDA device.">cudaD3D10SetDirect3DDevice</a> then <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a">cudaErrorInvalidDevice</a> is returned. If <code>pD3DResource</code> is of incorrect type or is already registered, then <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273">cudaErrorInvalidResourceHandle</a> is returned. If <code>pD3DResource</code> cannot be registered, then <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e00382e491daacef266c7b3e3c1e140a6133c">cudaErrorUnknown</a> is returned.<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>resource</em>&nbsp;</td><td>- Pointer to returned resource handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pD3DResource</em>&nbsp;</td><td>- Direct3D resource to register </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>- Parameters for resource registration</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#gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a">cudaErrorInvalidDevice</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>, <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e00382e491daacef266c7b3e3c1e140a6133c">cudaErrorUnknown</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__D3D10_geec2934147774dd7a611df971a548675.html#geec2934147774dd7a611df971a548675" title="Sets the Direct3D 10 device to use for interoperability with a CUDA device.">cudaD3D10SetDirect3DDevice</a> <a class="el" href="group__CUDART__INTEROP_g1d45ac44d1affe17fb356e0b7a0b0560.html#g1d45ac44d1affe17fb356e0b7a0b0560" title="Unregisters a graphics resource for access by CUDA.">cudaGraphicsUnregisterResource</a>, <a class="el" href="group__CUDART__INTEROP_gb7064fb72e54d89d0666e192b45d35cc.html#gb7064fb72e54d89d0666e192b45d35cc" title="Map graphics resources for access by CUDA.">cudaGraphicsMapResources</a>, <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>, <a class="el" href="group__CUDART__INTEROP_ge7f893864a3d38a630e71a99f5a4e17f.html#ge7f893864a3d38a630e71a99f5a4e17f" title="Get an device pointer through which to access a mapped graphics resource.">cudaGraphicsResourceGetMappedPointer</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 &nbsp;<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>