Sophie

Sophie

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

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: cuD3D10RegisterResource</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__CUDA__D3D10__DEPRECATED.html">Direct3D 10 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__CUDA__D3D10__DEPRECATED_gadfb6cf4500c6e670056ddcfbb3daa2d.html#gadfb6cf4500c6e670056ddcfbb3daa2d">CUD3D10map_flags</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g6304e800937b7ed86e0059997975f9a1.html#g6304e800937b7ed86e0059997975f9a1">CUD3D10map_flags_enum</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g3f1c5c5c1e8c0b02af277075d260fa72.html#g3f1c5c5c1e8c0b02af277075d260fa72">cuD3D10MapResources</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g74cc755019d0d3516318b39f2723ec04.html#g74cc755019d0d3516318b39f2723ec04">CUD3D10register_flags</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g31c44b7a24c369df28fedded0a866e87.html#g31c44b7a24c369df28fedded0a866e87">CUD3D10register_flags_enum</a></td></tr>
          <tr><td class="navtab"><a class="qindexHL" href="group__CUDA__D3D10__DEPRECATED_g7a46ea2fdda68d85e09499c750c872d0.html#g7a46ea2fdda68d85e09499c750c872d0">cuD3D10RegisterResource</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_gd9c2f1803809bfa616127ee88df54478.html#gd9c2f1803809bfa616127ee88df54478">cuD3D10ResourceGetMappedArray</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_gc760eb925462d7ed911a804ac801d437.html#gc760eb925462d7ed911a804ac801d437">cuD3D10ResourceGetMappedPitch</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g8b6ea4e4b561d6497f0210d9bbc1a7fc.html#g8b6ea4e4b561d6497f0210d9bbc1a7fc">cuD3D10ResourceGetMappedPointer</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g37f0928f531e12f642084c0ff6ed15f5.html#g37f0928f531e12f642084c0ff6ed15f5">cuD3D10ResourceGetMappedSize</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_gca78cef7510dc3375215878b185eb30f.html#gca78cef7510dc3375215878b185eb30f">cuD3D10ResourceGetSurfaceDimensions</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g21ee183ac71b99048ff8e9ce9bfc1f4b.html#g21ee183ac71b99048ff8e9ce9bfc1f4b">cuD3D10ResourceSetMapFlags</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_ga3b5e7426130a24a8aa2900a766d3a45.html#ga3b5e7426130a24a8aa2900a766d3a45">cuD3D10UnmapResources</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10__DEPRECATED_g820664c48e2dbac37979a21c21d6561d.html#g820664c48e2dbac37979a21c21d6561d">cuD3D10UnregisterResource</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top">
<a class="anchor" name="g7a46ea2fdda68d85e09499c750c872d0"></a><!-- doxytag: member="cudaD3D10.h::cuD3D10RegisterResource" ref="g7a46ea2fdda68d85e09499c750c872d0" args="(ID3D10Resource *pResource, unsigned int Flags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CUDA__TYPES_g09da14df1a751dcbfeccb9cf0073d64c.html#g09da14df1a751dcbfeccb9cf0073d64c">CUresult</a> cuD3D10RegisterResource           </td>
          <td>(</td>
          <td class="paramtype">ID3D10Resource *&nbsp;</td>
          <td class="paramname"> <em>pResource</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>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000080">Deprecated:</a></b></dt><dd>This function is deprecated as of Cuda 3.0.</dd></dl>
Registers the Direct3D resource <code>pResource</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__CUDA__D3D10__DEPRECATED_g820664c48e2dbac37979a21c21d6561d.html#g820664c48e2dbac37979a21c21d6561d" title="Unregister a Direct3D resource.">cuD3D10UnregisterResource()</a>. Also on success, this call will increase the internal reference count on <code>pResource</code>. This reference count will be decremented when this resource is unregistered through <a class="el" href="group__CUDA__D3D10__DEPRECATED_g820664c48e2dbac37979a21c21d6561d.html#g820664c48e2dbac37979a21c21d6561d" title="Unregister a Direct3D resource.">cuD3D10UnregisterResource()</a>.<p>
This call is potentially high-overhead and should not be called every frame in interactive applications.<p>
The type of <code>pResource</code> must be one of the following.<p>
<ul>
<li>ID3D10Buffer: Cannot be used with <code>Flags</code> set to CU_D3D10_REGISTER_FLAGS_ARRAY.</li><li>ID3D10Texture1D: No restrictions.</li><li>ID3D10Texture2D: No restrictions.</li><li>ID3D10Texture3D: No restrictions.</li></ul>
<p>
The <code>Flags</code> argument specifies the mechanism through which CUDA will access the Direct3D resource. The following values are allowed.<p>
<ul>
<li>CU_D3D10_REGISTER_FLAGS_NONE: Specifies that CUDA will access this resource through a <a class="el" href="group__CUDA__TYPES_g5e264ce2ad6a38761e7e04921ef771de.html#g5e264ce2ad6a38761e7e04921ef771de">CUdeviceptr</a>. The pointer, size, and (for textures), pitch for each subresource of this allocation may be queried through <a class="el" href="group__CUDA__D3D10__DEPRECATED_g8b6ea4e4b561d6497f0210d9bbc1a7fc.html#g8b6ea4e4b561d6497f0210d9bbc1a7fc" title="Get a pointer through which to access a subresource of a Direct3D resource which...">cuD3D10ResourceGetMappedPointer()</a>, <a class="el" href="group__CUDA__D3D10__DEPRECATED_g37f0928f531e12f642084c0ff6ed15f5.html#g37f0928f531e12f642084c0ff6ed15f5" title="Get the size of a subresource of a Direct3D resource which has been mapped for access...">cuD3D10ResourceGetMappedSize()</a>, and <a class="el" href="group__CUDA__D3D10__DEPRECATED_gc760eb925462d7ed911a804ac801d437.html#gc760eb925462d7ed911a804ac801d437" title="Get the pitch of a subresource of a Direct3D resource which has been mapped for access...">cuD3D10ResourceGetMappedPitch()</a> respectively. This option is valid for all resource types.</li><li>CU_D3D10_REGISTER_FLAGS_ARRAY: Specifies that CUDA will access this resource through a <a class="el" href="group__CUDA__TYPES_gd550651524a56766b60f10f0e7628042.html#gd550651524a56766b60f10f0e7628042">CUarray</a> queried on a sub-resource basis through <a class="el" href="group__CUDA__D3D10__DEPRECATED_gd9c2f1803809bfa616127ee88df54478.html#gd9c2f1803809bfa616127ee88df54478" title="Get an array through which to access a subresource of a Direct3D resource which has...">cuD3D10ResourceGetMappedArray()</a>. This option is only valid for resources of type ID3D10Texture1D, ID3D10Texture2D, and ID3D10Texture3D.</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 on this context then <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa484e9af32c1e9893ff21f0e0191a12d">CUDA_ERROR_INVALID_CONTEXT</a> is returned. If <code>pResource</code> is of incorrect type or is already registered, then <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa0fd2e63260c6317ba943af0f7e4b8d21">CUDA_ERROR_INVALID_HANDLE</a> is returned. If <code>pResource</code> cannot be registered, then <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaac5a6ab0245179d297f1fa56ed0097183">CUDA_ERROR_UNKNOWN</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>pResource</em>&nbsp;</td><td>- 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__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa0eed720f8a87cd1c5fd1c453bc7a03d">CUDA_SUCCESS</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaacf52f132faf29b473cdda6061f0f44a">CUDA_ERROR_DEINITIALIZED</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa8feb999f0af99b4a25ab26b3866f4df8">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa484e9af32c1e9893ff21f0e0191a12d">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa90696c86fcee1f536a1ec7d25867feeb">CUDA_ERROR_INVALID_VALUE</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa0fd2e63260c6317ba943af0f7e4b8d21">CUDA_ERROR_INVALID_HANDLE</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa264c50688ed110e8476b591befe60c02">CUDA_ERROR_OUT_OF_MEMORY</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaac5a6ab0245179d297f1fa56ed0097183">CUDA_ERROR_UNKNOWN</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__CUDA__D3D10_g87fb2a189c27c4b63538d23f53b2c8e6.html#g87fb2a189c27c4b63538d23f53b2c8e6" title="Register a Direct3D 10 resource for access by CUDA.">cuGraphicsD3D10RegisterResource</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>