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

« back to all changes in this revision

Viewing changes to cl_khr_d3d10_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_d3d10_sharing</keyword>
 
9
        </keywordset>
 
10
    </refentryinfo>
 
11
 
 
12
    <refmeta>
 
13
        <refentrytitle>cl_khr_d3d10_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_d3d10_sharing">
 
35
        <refname>cl_khr_d3d10_sharing</refname>
 
36
 
 
37
        <refpurpose>
 
38
            Provide interoperability between OpenCL and Direct3D 10.
 
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_d3d10_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 10. 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. If
 
70
          this extension is supported by an implementation, the string "cl_khr_d3d10_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
          As currently proposed the interfaces for this extension would be provided in
 
79
          <code>cl_d3d10.h</code>.
 
80
        </para>
 
81
 
 
82
        <para>
 
83
          If the <function>cl_khr_d3d10_sharing</function> extension is supported, then the
 
84
          following functions are enabled:
 
85
        </para>
 
86
 
 
87
         <itemizedlist mark="disc">
 
88
            <listitem>
 
89
                <citerefentry><refentrytitle>clGetDeviceIDsFromD3D10KHR</refentrytitle></citerefentry>
 
90
            </listitem>
 
91
 
 
92
            <listitem>
 
93
                <citerefentry><refentrytitle>clCreateFromD3D10BufferKHR</refentrytitle></citerefentry>
 
94
            </listitem>
 
95
 
 
96
            <listitem>
 
97
                <citerefentry><refentrytitle>clCreateFromD3D10Texture2DKHR</refentrytitle></citerefentry>
 
98
            </listitem>
 
99
 
 
100
            <listitem>
 
101
                <citerefentry><refentrytitle>clCreateFromD3D10Texture3DKHR</refentrytitle></citerefentry>
 
102
            </listitem>
 
103
 
 
104
            <listitem>
 
105
                <citerefentry><refentrytitle>clEnqueueAcquireD3D10ObjectsKHR</refentrytitle></citerefentry>
 
106
            </listitem>
 
107
 
 
108
            <listitem>
 
109
                <citerefentry><refentrytitle>clEnqueueReleaseD3D10ObjectsKHR</refentrytitle></citerefentry>
 
110
            </listitem>
 
111
        </itemizedlist>
 
112
 
 
113
        <para>
 
114
          The OpenCL functions enabled by the <function>cl_khr_d3d10_sharing</function> extension
 
115
          allow applications to use Direct3D 10 resources as OpenCL memory objects. This allows
 
116
          efficient sharing of data between OpenCL and Direct3D 10. The OpenCL API may be used
 
117
          to execute kernels that read and/or write memory objects that are also Direct3D 10
 
118
          resources. An OpenCL image object may be created from a Direct3D 10 texture resource. An
 
119
          OpenCL buffer object may be created from a Direct3D 10 buffer resource. OpenCL memory
 
120
          objects may be created from Direct3D 10 objects if and only if the OpenCL context
 
121
          has been created from a Direct3D 10 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_d3d10_sharing</function> extension is enabled, this extends
 
131
            the list of allowable values in certain parameters of certain functions, as follows:
 
132
        </para> <itemizedlist mark="disc">
 
133
            <listitem>
 
134
                <code>CL_CONTEXT_D3D10_DEVICE_KHR</code> is accepted as a
 
135
                property name in the <varname>properties</varname> parameter of
 
136
                <citerefentry><refentrytitle>clCreateContext</refentrytitle></citerefentry> and
 
137
                <citerefentry><refentrytitle>clCreateContextFromType</refentrytitle></citerefentry>.
 
138
            </listitem> <listitem>
 
139
                <code>CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR</code> is
 
140
                accepted as a value in the <varname>param_name</varname> parameter of
 
141
                <citerefentry><refentrytitle>clGetContextInfo</refentrytitle></citerefentry>.
 
142
            </listitem> <listitem>
 
143
                <code>CL_MEM_D3D10_RESOURCE_KHR</code> is accepted as a
 
144
                value in the <varname>param_name</varname> parameter of
 
145
                <citerefentry><refentrytitle>clGetMemObjectInf</refentrytitle></citerefentry>.
 
146
            </listitem> <listitem>
 
147
                <code>CL_IMAGE_D3D10_SUBRESOURCE_KHR</code> is accepted as
 
148
                a value in the <varname>param_name</varname> parameter of
 
149
                <citerefentry><refentrytitle>clGetImageInfo</refentrytitle></citerefentry>.
 
150
            </listitem> <listitem>
 
151
                <code>CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR</code> and
 
152
                <code>CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR</code> are
 
153
                returned in the <varname>param_value</varname> parameter of
 
154
                <citerefentry><refentrytitle>clGetEventInfo</refentrytitle></citerefentry>
 
155
                when <varname>param_name</varname> is <code>CL_EVENT_COMMAND_TYPE</code>.
 
156
            </listitem> <listitem>
 
157
                <code>CL_INVALID_D3D10_DEVICE_KHR</code> is returned by
 
158
                <citerefentry><refentrytitle>clCreateContext</refentrytitle></citerefentry> and
 
159
                <citerefentry><refentrytitle>clCreateContextFromType</refentrytitle></citerefentry>
 
160
                if the Direct3D 10 device specified for interoperability is not compatible with
 
161
                the devices against which the context is to be created.
 
162
            </listitem> <listitem>
 
163
                <code>CL_INVALID_D3D10_RESOURCE_KHR</code> is returned by
 
164
                <citerefentry><refentrytitle>clCreateFromD3D10BufferKHR</refentrytitle></citerefentry>
 
165
                when resource is not a Direct3D 10 buffer object, and by
 
166
                <citerefentry><refentrytitle>clCreateFromD3D10Texture2DKHR</refentrytitle></citerefentry>
 
167
                and
 
168
                <citerefentry><refentrytitle>clCreateFromD3D10Texture3DKHR</refentrytitle></citerefentry>
 
169
                when resource is not a Direct3D 10 texture object.
 
170
            </listitem> <listitem>
 
171
                <code>CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR</code> is returned by
 
172
                <citerefentry><refentrytitle>clEnqueueAcquireD3D10ObjectsKHR</refentrytitle></citerefentry>
 
173
                when any of mem_objects are currently acquired by OpenCL.
 
174
            </listitem> <listitem>
 
175
                <code>CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR</code> is returned by
 
176
                <citerefentry><refentrytitle>clEnqueueReleaseD3D10ObjectsKHR</refentrytitle></citerefentry>
 
177
                when any of mem_objects are not currently acquired by OpenCL.
 
178
            </listitem>
 
179
        </itemizedlist>
 
180
-->
 
181
 
 
182
    </refsect1>
 
183
 
 
184
<!-- ================================ EXAMPLE  -->
 
185
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
 
186
<!--
 
187
    <refsect2 id="example1">
 
188
        <title>
 
189
            Example
 
190
        </title>
 
191
 
 
192
        <informaltable frame="none">
 
193
            <tgroup cols="1" align="left" colsep="0" rowsep="0">
 
194
                <colspec colname="col1" colnum="1" />
 
195
                <tbody>
 
196
                    <row>
 
197
                        <entry>
 
198
                            Example goes here - it will be set in "code" type with white space preserved.
 
199
                        </entry>
 
200
                    </row>
 
201
                </tbody>
 
202
            </tgroup>
 
203
        </informaltable>
 
204
    </refsect2>
 
205
-->
 
206
 
 
207
<!-- ================================ SPECIFICATION  -->
 
208
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
 
209
-->
 
210
    <refsect1 id="specification"><title>Specification</title>
 
211
        <para>
 
212
            <imageobject>
 
213
                <imagedata fileref="pdficon_small1.gif" format="gif" />
 
214
            </imageobject>
 
215
 
 
216
            <olink uri="cl_khr_d3d10_sharing">OpenCL Specification</olink>
 
217
        </para>
 
218
    </refsect1>
 
219
 
 
220
<!-- ================================ ALSO SEE -->
 
221
 
 
222
    <refsect1 id="seealso"><title>Also see</title>
 
223
        <para>
 
224
            <citerefentry><refentrytitle>EXTENSION</refentrytitle></citerefentry>,
 
225
            <citerefentry><refentrytitle>clGetDeviceIDsFromD3D10KHR</refentrytitle></citerefentry>,
 
226
            <citerefentry><refentrytitle>clCreateFromD3D10BufferKHR</refentrytitle></citerefentry>,
 
227
            <citerefentry><refentrytitle>clCreateFromD3D10Texture2DKHR</refentrytitle></citerefentry>,
 
228
            <citerefentry><refentrytitle>clCreateFromD3D10Texture3DKHR</refentrytitle></citerefentry>,
 
229
            <citerefentry><refentrytitle>clEnqueueAcquireD3D10ObjectsKHR</refentrytitle></citerefentry>,
 
230
            <citerefentry><refentrytitle>clEnqueueReleaseD3D10ObjectsKHR</refentrytitle></citerefentry>
 
231
        </para>
 
232
    </refsect1>
 
233
 
 
234
<!-- ============================== COPYRIGHT -->
 
235
<!-- Content included from copyright.inc.xsl -->
 
236
 
 
237
    <refsect3 id="Copyright"><title></title>
 
238
        <imageobject>
 
239
                <imagedata fileref="KhronosLogo.jpg" format="jpg" />
 
240
        </imageobject>
 
241
        <para />
 
242
    </refsect3>
 
243
 
 
244
<!-- 18-Oct-2011 -->
 
245
</refentry>
 
246