Sophie

Sophie

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

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: cuGraphicsD3D10RegisterResource</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.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__CUDA__D3D10_g82e98ad151a9190cea9627a67d44c1c7.html#g82e98ad151a9190cea9627a67d44c1c7">cuD3D10CtxCreate</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10_gbe14aa89a02ab377de1c0b611aeb2c1e.html#gbe14aa89a02ab377de1c0b611aeb2c1e">cuD3D10CtxCreateOnDevice</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10_g94cbc58d1e0b1684c63613f3aae9d8b1.html#g94cbc58d1e0b1684c63613f3aae9d8b1">CUd3d10DeviceList</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10_ga961703b75c127b2c61d2e3b3921db4f.html#ga961703b75c127b2c61d2e3b3921db4f">CUd3d10DeviceList_enum</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10_g98e0c9dcac9771d45112053045e0c34f.html#g98e0c9dcac9771d45112053045e0c34f">cuD3D10GetDevice</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10_gdcc33dea972d5b834f45a0acefe5fe77.html#gdcc33dea972d5b834f45a0acefe5fe77">cuD3D10GetDevices</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__D3D10_g5c8842f9517e493e130ec67d1035ba8a.html#g5c8842f9517e493e130ec67d1035ba8a">cuD3D10GetDirect3DDevice</a></td></tr>
          <tr><td class="navtab"><a class="qindexHL" href="group__CUDA__D3D10_g87fb2a189c27c4b63538d23f53b2c8e6.html#g87fb2a189c27c4b63538d23f53b2c8e6">cuGraphicsD3D10RegisterResource</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top">
<a class="anchor" name="g87fb2a189c27c4b63538d23f53b2c8e6"></a><!-- doxytag: member="cudaD3D10.h::cuGraphicsD3D10RegisterResource" ref="g87fb2a189c27c4b63538d23f53b2c8e6" args="(CUgraphicsResource *pCudaResource, ID3D10Resource *pD3DResource, 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> cuGraphicsD3D10RegisterResource           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__CUDA__TYPES_gc0c4e1704647178d9c5ba3be46517dcd.html#gc0c4e1704647178d9c5ba3be46517dcd">CUgraphicsResource</a> *&nbsp;</td>
          <td class="paramname"> <em>pCudaResource</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 and returns a CUDA handle to <code>pD3Dresource</code> in <code>pCudaResource</code>. The handle returned in <code>pCudaResource</code> may be used to map and unmap this resource until it is unregistered. 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__CUDA__GRAPHICS_ga7e5e97b74eaa13dfa6582e853e4c96d.html#ga7e5e97b74eaa13dfa6582e853e4c96d" title="Unregisters a graphics resource for access by CUDA.">cuGraphicsUnregisterResource()</a>.<p>
This call is potentially 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.<ul>
<li>ID3D10Buffer: may be accessed through 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<ul>
<li>CU_GRAPHICS_REGISTER_FLAGS_NONE: Specifies no hints about how this resource will be used.</li><li>CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST: Specifies that CUDA will bind this resource to a surface reference.</li><li>CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER: 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.<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 for this context using <a class="el" href="group__CUDA__D3D10_g82e98ad151a9190cea9627a67d44c1c7.html#g82e98ad151a9190cea9627a67d44c1c7" title="Create a CUDA context for interoperability with Direct3D 10.">cuD3D10CtxCreate</a> then <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa484e9af32c1e9893ff21f0e0191a12d">CUDA_ERROR_INVALID_CONTEXT</a> is returned. If <code>pD3DResource</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>pD3DResource</code> cannot be registered then <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaac5a6ab0245179d297f1fa56ed0097183">CUDA_ERROR_UNKNOWN</a> is returned. If <code>Flags</code> is not one of the above specified value then <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa90696c86fcee1f536a1ec7d25867feeb">CUDA_ERROR_INVALID_VALUE</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>pCudaResource</em>&nbsp;</td><td>- Returned graphics 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__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_g82e98ad151a9190cea9627a67d44c1c7.html#g82e98ad151a9190cea9627a67d44c1c7" title="Create a CUDA context for interoperability with Direct3D 10.">cuD3D10CtxCreate</a>, <a class="el" href="group__CUDA__GRAPHICS_ga7e5e97b74eaa13dfa6582e853e4c96d.html#ga7e5e97b74eaa13dfa6582e853e4c96d" title="Unregisters a graphics resource for access by CUDA.">cuGraphicsUnregisterResource</a>, <a class="el" href="group__CUDA__GRAPHICS_gffcfd8e78d82cc4f6dd987e8bce4edb0.html#gffcfd8e78d82cc4f6dd987e8bce4edb0" title="Map graphics resources for access by CUDA.">cuGraphicsMapResources</a>, <a class="el" href="group__CUDA__GRAPHICS_g61c55e987e54558cce547240d6123078.html#g61c55e987e54558cce547240d6123078" title="Get an array through which to access a subresource of a mapped graphics resource...">cuGraphicsSubResourceGetMappedArray</a>, <a class="el" href="group__CUDA__GRAPHICS_g8a634cf4150d399f0018061580592457.html#g8a634cf4150d399f0018061580592457" title="Get a device pointer through which to access a mapped graphics resource.">cuGraphicsResourceGetMappedPointer</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>