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

« back to all changes in this revision

Viewing changes to cl_khr_d3d11_sharing.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
 
 
5
<refentry>
 
6
    <refentryinfo>
 
7
        <keywordset>
 
8
            <keyword>cl_khr_d3d11_sharing</keyword>
 
9
        </keywordset>
 
10
    </refentryinfo>
 
11
 
 
12
    <refmeta>
 
13
        <refentrytitle>cl_khr_d3d11_sharing</refentrytitle>
 
14
 
 
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="cl_khr_d3d11_sharing">
 
35
        <refname>cl_khr_d3d11_sharing</refname>
 
36
 
 
37
        <refpurpose>
 
38
            Provide interoperability between OpenCL and Direct3D 11.
 
39
        </refpurpose>
 
40
    </refnamediv>
 
41
 
 
42
    <!-- ALTERNATIVE SYNTAX SYNOPSIS (NON-FUNCTION) -->
 
43
 
 
44
    <refsect2 id="synopsis">
 
45
        <title>
 
46
        </title>
 
47
 
 
48
        <informaltable frame="none">
 
49
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
50
                <colspec colname="col1" colnum="1" />
 
51
                <tbody>
 
52
                    <row>
 
53
                        <entry>
 
54
#pragma OPENCL EXTENSION cl_khr_d3d11_sharing : enable
 
55
                        </entry>
 
56
                    </row>
 
57
                </tbody>
 
58
            </tgroup>
 
59
        </informaltable>
 
60
    </refsect2>
 
61
 
 
62
<!-- ================================ DESCRIPTION  -->
 
63
 
 
64
    <refsect1 xmlns:xlink="http://www.w3.org/1999/xlink" id="description"><title>Description</title>
 
65
        <para>
 
66
          The goal of this extension is to provide interoperability between
 
67
          OpenCL and Direct3D 11. This is designed to function analogously
 
68
          to the <citerefentry href="cl_khr_gl_sharing"><refentrytitle>OpenGL
 
69
          interoperability</refentrytitle></citerefentry> as defined in sections 9.7 and 9.8.
 
70
          If this extension is supported by an implementation, the string "cl_khr_d3d11_sharing"
 
71
          will be present in the <constant>CL_PLATFORM_EXTENSIONS</constant>
 
72
          or <constant>CL_DEVICE_EXTENSIONS</constant> string described in
 
73
          the table of allowed values for <varname>param_name</varname> for
 
74
          <citerefentry><refentrytitle>clGetDeviceInfo</refentrytitle></citerefentry>.
 
75
        </para>
 
76
 
 
77
        <para>
 
78
          The interfaces for this extension are provided in the header file
 
79
          <code>cl_d3d11.h</code>.
 
80
        </para>
 
81
 
 
82
        <para>
 
83
            If the <function>cl_khr_d3d11_sharing</function> extension is supported, then the following functions
 
84
            are enabled:
 
85
        </para>
 
86
 
 
87
         <itemizedlist mark="disc">
 
88
            <listitem>
 
89
                <citerefentry><refentrytitle>clGetDeviceIDsFromD3D11KHR</refentrytitle></citerefentry>
 
90
            </listitem>
 
91
 
 
92
            <listitem>
 
93
                <citerefentry><refentrytitle>clCreateFromD3D11BufferKHR</refentrytitle></citerefentry>
 
94
            </listitem>
 
95
 
 
96
            <listitem>
 
97
                <citerefentry><refentrytitle>clCreateFromD3D11Texture2DKHR</refentrytitle></citerefentry>
 
98
            </listitem>
 
99
 
 
100
            <listitem>
 
101
                <citerefentry><refentrytitle>clCreateFromD3D11Texture3DKHR</refentrytitle></citerefentry>
 
102
            </listitem>
 
103
 
 
104
            <listitem>
 
105
                <citerefentry><refentrytitle>clEnqueueAcquireD3D11ObjectsKHR</refentrytitle></citerefentry>
 
106
            </listitem>
 
107
 
 
108
            <listitem>
 
109
                <citerefentry><refentrytitle>clEnqueueReleaseD3D11ObjectsKHR</refentrytitle></citerefentry>
 
110
            </listitem>
 
111
        </itemizedlist>
 
112
 
 
113
        <para>
 
114
          The OpenCL functions enabled by the <function>cl_khr_d3d11_sharing</function> extension
 
115
          allow applications to use Direct3D 11 resources as OpenCL memory objects. This allows
 
116
          efficient sharing of data between OpenCL and Direct3D 11. The OpenCL API may be used
 
117
          to execute kernels that read and/or write memory objects that are also Direct3D 11
 
118
          resources. An OpenCL image object may be created from a Direct3D 11 texture resource. An
 
119
          OpenCL buffer object may be created from a Direct3D 11 buffer resource. OpenCL memory
 
120
          objects may be created from Direct3D 11 objects if and only if the OpenCL context
 
121
          has been created from a Direct3D 11 device.
 
122
        </para>
 
123
 
 
124
<!-- !!!
 
125
The following is from the ext. spec. pp. 98-99 and contains only redundant information that
 
126
is properly documented in the reference pages for the relevant functions. Its appearance
 
127
here has questionable value, and introduces considerable additional labor to maintain.
 
128
 
 
129
        <para>
 
130
            When the <function>cl_khr_d3d11_sharing</function> extension is enabled, this extends the list of allowable
 
131
            values in certain parameters of certain functions, as follows:
 
132
        </para>
 
133
        <itemizedlist mark="disc">
 
134
            <listitem>
 
135
                <constant>CL_D3D11_DEVICE_KHR</constant> and <constant>CL_D3D11_DXGI_ADAPTER_KHR</constant> are accepted
 
136
                as a Direct3D 11 device source in the <varname>d3d_device_source</varname> parameter of
 
137
                <citerefentry><refentrytitle>clGetDeviceIDsFromD3D11KHR</refentrytitle></citerefentry>.
 
138
            </listitem>
 
139
            <listitem>
 
140
                <constant>CL_PREFERRED_DEVICES_FOR_D3D11_KHR</constant> and
 
141
                <constant>CL_ALL_DEVICES_FOR_D3D11_KHR</constant> are accepted
 
142
                as a set of Direct3D 11 devices in the <varname>d3d_device_set</varname> parameter of
 
143
                <citerefentry><refentrytitle>clGetDeviceIDsFromD3D11KHR</refentrytitle></citerefentry>.
 
144
            </listitem>
 
145
            <listitem>
 
146
                <constant>CL_CONTEXT_D3D11_DEVICE_KHR</constant> is accepted
 
147
                as a property name in the <varname>properties</varname> parameter of
 
148
                <citerefentry><refentrytitle>clCreateContext</refentrytitle></citerefentry> and
 
149
                <citerefentry><refentrytitle>clCreateContextFromType</refentrytitle></citerefentry>.
 
150
            </listitem>
 
151
           <listitem>
 
152
                <constant>CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR</constant> is accepted
 
153
                as a property name in the <varname>param_name</varname> parameter of
 
154
                <citerefentry><refentrytitle>clCreateContextInfo</refentrytitle></citerefentry>.
 
155
            </listitem>
 
156
            <listitem>
 
157
                <constant>CL_MEM_D3D11_RESOURCE_KHR</constant> is accepted
 
158
                as the property being queried in the <varname>param_name</varname> parameter of
 
159
                <citerefentry><refentrytitle>clGetMemObjectInfo</refentrytitle></citerefentry>.
 
160
            </listitem>
 
161
            <listitem>
 
162
                <constant>CL_IMAGE_D3D11_SUBRESOURCE_KHR</constant> is accepted
 
163
                as the property being queried in the <varname>param_name</varname> parameter of
 
164
                <citerefentry><refentrytitle>clGetImageInfo</refentrytitle></citerefentry>.
 
165
            </listitem>
 
166
             <listitem>
 
167
                <constant>CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR</constant> and
 
168
                <constant>CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR</constant> are
 
169
                returned in the <varname>param_value</varname> parameter of
 
170
                <citerefentry><refentrytitle>clGetEventInfo</refentrytitle></citerefentry>
 
171
                when param_name is <constant>CL_EVENT_COMMAND_TYPE</constant>.
 
172
            </listitem>
 
173
            <listitem>
 
174
                <constant>CL_INVALID_D3D11_DEVICE_KHR</constant> is
 
175
                returned by
 
176
                <citerefentry><refentrytitle>clCreateContext</refentrytitle></citerefentry> and
 
177
                <citerefentry><refentrytitle>clCreateContextFromType</refentrytitle></citerefentry>
 
178
                if the Direct3D 11 device specified for interoperability is not
 
179
                compatible with the devices against which the context is to be created.
 
180
            </listitem>
 
181
            <listitem>
 
182
                <constant>CL_INVALID_D3D11_RESOURCE_KHR</constant> is
 
183
                returned by
 
184
                <citerefentry><refentrytitle>clCreateFromD3D11BufferKHR</refentrytitle></citerefentry>
 
185
                when <varname>resource</varname> is not a Direct3D 11 buffer object, and by
 
186
                 <citerefentry><refentrytitle>clCreateFromD3D11Texture2DKHR</refentrytitle></citerefentry> and
 
187
                 <citerefentry><refentrytitle>clCreateFromD3D11Texture3DKHR</refentrytitle></citerefentry>
 
188
                when <varname>resource</varname> is not a Direct3D 11 texture object.
 
189
            </listitem>
 
190
            <listitem>
 
191
                <constant>CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR</constant> is
 
192
                returned by
 
193
                <citerefentry><refentrytitle>clEnqueueAcquireD3D11ObjectsKHR</refentrytitle></citerefentry>
 
194
                when any of <varname>mem_objects</varname> are currently acquired by OpenCL.
 
195
            </listitem>
 
196
            <listitem>
 
197
                <constant>CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR</constant> is
 
198
                returned by
 
199
                <citerefentry><refentrytitle>clEnqueueReleaseD3D11ObjectsKHR</refentrytitle></citerefentry>
 
200
                when any of <varname>mem_objects</varname> are not currently acquired by OpenCL.
 
201
            </listitem>
 
202
        </itemizedlist>
 
203
-->
 
204
 
 
205
    </refsect1>
 
206
 
 
207
<!-- ================================ EXAMPLE  -->
 
208
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
209
<!--
 
210
    <refsect2 id="example1">
 
211
        <title>
 
212
            Example
 
213
        </title>
 
214
 
 
215
        <informaltable frame="none">
 
216
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
217
                <colspec colname="col1" colnum="1" />
 
218
                <tbody>
 
219
                    <row>
 
220
                        <entry>
 
221
                            Example goes here - it will be set in "code" type with white space preserved.
 
222
                        </entry>
 
223
                    </row>
 
224
                </tbody>
 
225
            </tgroup>
 
226
        </informaltable>
 
227
    </refsect2>
 
228
-->
 
229
 
 
230
<!-- ================================ SPECIFICATION  -->
 
231
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
232
-->
 
233
    <refsect1 id="specification"><title>Specification</title>
 
234
        <para>
 
235
            <imageobject>
 
236
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
237
            </imageobject>
 
238
 
 
239
            <olink uri="cl_khr_d3d11_sharing">OpenCL Specification</olink>
 
240
        </para>
 
241
    </refsect1>
 
242
 
 
243
<!-- ================================ ALSO SEE -->
 
244
 
 
245
    <refsect1 id="seealso"><title>Also see</title>
 
246
        <para>
 
247
            <citerefentry><refentrytitle>EXTENSION</refentrytitle></citerefentry>,
 
248
            <citerefentry><refentrytitle>clGetDeviceIDsFromD3D11KHR</refentrytitle></citerefentry>,
 
249
            <citerefentry><refentrytitle>clCreateFromD3D11BufferKHR</refentrytitle></citerefentry>,
 
250
            <citerefentry><refentrytitle>clCreateFromD3D11Texture2DKHR</refentrytitle></citerefentry>,
 
251
            <citerefentry><refentrytitle>clCreateFromD3D11Texture3DKHR</refentrytitle></citerefentry>,
 
252
            <citerefentry><refentrytitle>clEnqueueAcquireD3D10ObjectsKHR</refentrytitle></citerefentry>,
 
253
            <citerefentry><refentrytitle>clEnqueueReleaseD3D11ObjectsKHR</refentrytitle></citerefentry>
 
254
        </para>
 
255
    </refsect1>
 
256
 
 
257
<!-- ============================== COPYRIGHT -->
 
258
<!-- Content included from copyright.inc.xsl -->
 
259
 
 
260
    <refsect3 id="Copyright"><title></title>
 
261
        <imageobject>
 
262
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
263
        </imageobject>
 
264
        <para />
 
265
    </refsect3>
 
266
 
 
267
<!-- 24-Oct-2011 -->
 
268
</refentry>
 
269