~ubuntu-branches/ubuntu/trusty/khronos-opencl-man/trusty

« back to all changes in this revision

Viewing changes to clCreateFromD3D11BufferKHR.xml

  • Committer: Package Import Robot
  • Author(s): Mathieu Malaterre
  • Date: 2013-05-21 18:06:15 UTC
  • Revision ID: package-import@ubuntu.com-20130521180615-6e0s2n3pai95ip2f
Tags: upstream-1.0~svn21772
ImportĀ upstreamĀ versionĀ 1.0~svn21772

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
 
3
              "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" [
 
4
<!ENTITY sharingD3D11Inc SYSTEM "sharingD3D11Inc.xml">
 
5
<!ENTITY accessMappedInc SYSTEM "accessMappedInc.xml">
 
6
]>
 
7
 
 
8
<refentry>
 
9
    <refentryinfo>
 
10
        <keywordset><keyword>clCreateFromD3D11BufferKHR</keyword></keywordset>
 
11
    </refentryinfo>
 
12
 
 
13
    <refmeta>
 
14
        <refentrytitle>clCreateFromD3D11BufferKHR</refentrytitle>
 
15
        <refmiscinfo>
 
16
            <copyright>
 
17
                <year>2007-2011</year>
 
18
                <holder>The Khronos Group Inc.
 
19
 Permission is hereby granted, free of charge, to any person obtaining a
 
20
copy of this software and/or associated documentation files (the
 
21
"Materials"), to deal in the Materials without restriction, including
 
22
without limitation the rights to use, copy, modify, merge, publish,
 
23
distribute, sublicense, and/or sell copies of the Materials, and to
 
24
permit persons to whom the Materials are furnished to do so, subject to
 
25
the condition that this copyright notice and permission notice shall be included
 
26
in all copies or substantial portions of the Materials.</holder>
 
27
            </copyright>
 
28
        </refmiscinfo>
 
29
        <manvolnum>3</manvolnum>
 
30
    </refmeta>
 
31
 
 
32
<!-- ================================ SYNOPSIS -->
 
33
 
 
34
    <refnamediv id="clCreateFromD3D11BufferKHR">
 
35
        <refname>clCreateFromD3D11BufferKHR</refname>
 
36
        <refpurpose>Creates an OpenCL buffer object from a Direct3D 11 buffer.</refpurpose>
 
37
    </refnamediv>
 
38
 
 
39
    <refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
 
40
        <funcsynopsis>
 
41
            <funcprototype>
 
42
                <funcdef>
 
43
                    <link xlink:href="abstractDataTypes.html">cl_mem</link>
 
44
                    <function>clCreateFromD3D11BufferKHR</function>
 
45
                </funcdef>
 
46
                <paramdef><link xlink:href="abstractDataTypes.html">cl_context</link><parameter>context</parameter></paramdef>
 
47
                <paramdef><link xlink:href="enums.html#cl_mem_flags">cl_mem_flags</link><parameter>flags</parameter></paramdef>
 
48
                <paramdef>ID3D11Buffer<parameter>*resource</parameter></paramdef>
 
49
                <paramdef>
 
50
                    <link xlink:href="scalarDataTypes.html">cl_int</link>
 
51
                    <parameter>*errcode_ret</parameter>
 
52
                </paramdef>
 
53
           </funcprototype>
 
54
        </funcsynopsis>
 
55
    </refsynopsisdiv>
 
56
 
 
57
<!-- ================================ PARAMETERS -->
 
58
 
 
59
    <refsect1 id="parameters"><title>Parameters</title>
 
60
        <variablelist>
 
61
        <varlistentry>
 
62
            <term><varname>context</varname></term>
 
63
            <listitem>
 
64
                <para>
 
65
                    A valid OpenCL context created from a Direct3D 11 device.
 
66
                </para>
 
67
            </listitem>
 
68
        </varlistentry>
 
69
 
 
70
        <varlistentry>
 
71
            <term><varname>flags</varname></term>
 
72
            <listitem>
 
73
                <para>
 
74
                    A bit-field that is used to specify usage information.
 
75
                    May be <constant>CL_MEM_READ_ONLY</constant>, <constant>CL_MEM_WRITE_ONLY</constant>, or
 
76
                    <constant>CL_MEM_READ_WRITE</constant>. (See the table for
 
77
                    <citerefentry><refentrytitle>clCreateBuffer</refentrytitle></citerefentry>
 
78
                    for more information.)
 
79
                </para>
 
80
            </listitem>
 
81
        </varlistentry>
 
82
 
 
83
        <varlistentry>
 
84
            <term><varname>resource</varname></term>
 
85
            <listitem>
 
86
                <para>
 
87
                    A pointer to the Direct3D 11 buffer to share.
 
88
                </para>
 
89
            </listitem>
 
90
        </varlistentry>
 
91
 
 
92
        <varlistentry>
 
93
            <term><varname>errcode_ret</varname></term>
 
94
            <listitem>
 
95
                <para>
 
96
                    An appropriate error code. If <varname>errcode_ret</varname> is NULL, no error code is returned.
 
97
                </para>
 
98
            </listitem>
 
99
        </varlistentry>
 
100
        </variablelist>
 
101
    </refsect1>
 
102
 
 
103
<!-- ================================ NOTES  -->
 
104
 
 
105
    <refsect1 id="notes"><title>Notes</title>
 
106
        <para>
 
107
          The size of the returned OpenCL buffer object is the same as the size
 
108
          of <varname>resource</varname>.  This call will increment the internal Direct3D
 
109
          reference count on <varname>resource</varname>. The internal Direct3D reference count
 
110
          on resource will be decremented when the OpenCL reference count on the returned OpenCL
 
111
          memory object drops to zero.
 
112
        </para>
 
113
 
 
114
        &sharingD3D11Inc;
 
115
 
 
116
        &accessMappedInc;
 
117
 
 
118
    </refsect1>
 
119
 
 
120
<!-- ================================ ERRORS  -->
 
121
 
 
122
    <refsect1 id="errors"><title>Errors</title>
 
123
        <para>
 
124
          Returns <errorname>CL_SUCCESS</errorname> returns a valid non-zero OpenCL buffer
 
125
          object and <varname>errcode_ret</varname> is set to <errorname>CL_SUCCESS</errorname>
 
126
          if the buffer object is created successfully. Otherwise, it returns a NULL value with
 
127
          one of the following error values returned in <varname>errcode_ret</varname>:
 
128
        </para>
 
129
 
 
130
        <itemizedlist mark="disc">
 
131
            <listitem>
 
132
              <errorname>CL_INVALID_CONTEXT</errorname> if <varname>context</varname> is not
 
133
              a valid context.
 
134
            </listitem>
 
135
 
 
136
            <listitem>
 
137
              <errorname>CL_INVALID_VALUE</errorname> if values specified in
 
138
              <varname>flags</varname> are not valid.
 
139
            </listitem>
 
140
 
 
141
            <listitem>
 
142
              <!-- ext. spec p. 99, section 9.11.4; and p. 104, section 9.11.7.3 -->
 
143
              <errorname>CL_INVALID_D3D11_RESOURCE_KHR</errorname> if <varname>resource</varname>
 
144
              is not a Direct3D 11 buffer resource, if <varname>resource</varname> was created with
 
145
              the <constant>D3D11_USAGE</constant> flag <constant>D3D11_USAGE_IMMUTABLE</constant>,
 
146
              if a <type>cl_mem</type> from <varname>resource</varname> has already
 
147
              been created using <function>clCreateFromD3D11BufferKHR</function>, or if
 
148
              <varname>context</varname> was not created against the same Direct3D 11 device
 
149
              from which <varname>resource</varname> was created.
 
150
            </listitem>
 
151
 
 
152
            <listitem>
 
153
              <errorname>CL_OUT_OF_HOST_MEMORY</errorname> if there is a failure to allocate
 
154
              resources required by the OpenCL implementation on the host.
 
155
            </listitem>
 
156
        </itemizedlist>
 
157
    </refsect1>
 
158
 
 
159
<!-- ================================ EXAMPLE  -->
 
160
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
161
<!--
 
162
    <refsect2 id="example1">
 
163
        <title>
 
164
            Example
 
165
        </title>
 
166
 
 
167
        <informaltable frame="none">
 
168
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
169
                <colspec colname="col1" colnum="1" />
 
170
                <tbody>
 
171
                    <row>
 
172
                        <entry>
 
173
                            Example goes here - it will be set in "code" type with white space preserved.
 
174
                        </entry>
 
175
                    </row>
 
176
                </tbody>
 
177
            </tgroup>
 
178
        </informaltable>
 
179
    </refsect2>
 
180
-->
 
181
 
 
182
<!-- ================================ SPECIFICATION  -->
 
183
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
184
-->
 
185
 
 
186
    <refsect1 id="specification"><title>Specification</title>
 
187
        <para><imageobject><imagedata fileref="pdficon_small1.gif" format="gif" /></imageobject>
 
188
            <olink uri="clCreateFromD3D11BufferKHR">OpenCL Specification</olink>
 
189
        </para>
 
190
    </refsect1>
 
191
 
 
192
<!-- ================================ ALSO SEE  -->
 
193
 
 
194
    <refsect1 id="seealso"><title>Also see</title>
 
195
        <para>
 
196
            <citerefentry><refentrytitle>cl_khr_d3d11_sharing</refentrytitle></citerefentry>,
 
197
            <citerefentry><refentrytitle>clGetDeviceIDsFromD3D11KHR</refentrytitle></citerefentry>,
 
198
            <citerefentry><refentrytitle>clCreateFromD3D11Texture2DKHR</refentrytitle></citerefentry>,
 
199
            <citerefentry><refentrytitle>clCreateFromD3D11Texture3DKHR</refentrytitle></citerefentry>,
 
200
            <citerefentry><refentrytitle>clEnqueueAcquireD3D11ObjectsKHR</refentrytitle></citerefentry>,
 
201
            <citerefentry><refentrytitle>clEnqueueReleaseD3D11ObjectsKHR</refentrytitle></citerefentry>
 
202
        </para>
 
203
    </refsect1>
 
204
 
 
205
<!-- ============================== COPYRIGHT -->
 
206
<!-- Content included from copyright.inc.xsl -->
 
207
 
 
208
    <refsect3 id="Copyright"><title></title>
 
209
        <imageobject>
 
210
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
211
        </imageobject>
 
212
        <para />
 
213
    </refsect3>
 
214
 
 
215
<!-- 24-Oct-2011 -->
 
216
</refentry>
 
217