Fix Windows build
The D3D interop APIs are now declared in the CL headers, so we need to remove our declarations. The CL headers also automatically include the D3D headers, which need to be included in a specific order (11 -> 10 -> 9), hence why the includes needed to be reshuffled. Change-Id: I9bd37ceabec82e8bebd1d9c1a5a672ffc95c41d8
Этот коммит содержится в:
@@ -21,6 +21,13 @@
|
||||
#ifndef CL_COMMON_HPP_
|
||||
#define CL_COMMON_HPP_
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <CL/cl_d3d11.h>
|
||||
#include <CL/cl_d3d10.h>
|
||||
#include <CL/cl_dx9_media_sharing.h>
|
||||
#endif
|
||||
#include <CL/cl_icd.h>
|
||||
|
||||
#include "top.hpp"
|
||||
#include "vdi_common.hpp"
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
#include "platform/runtime.hpp"
|
||||
#include "platform/agent.hpp"
|
||||
#ifdef _WIN32
|
||||
#include <d3d10_1.h>
|
||||
#include "CL/cl_d3d10.h"
|
||||
#include "CL/cl_d3d11.h"
|
||||
#include "cl_d3d9_amd.hpp"
|
||||
#include "cl_d3d10_amd.hpp"
|
||||
#include "cl_d3d11_amd.hpp"
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
|
||||
#include "top.hpp"
|
||||
|
||||
#include <d3d10_1.h>
|
||||
#include <dxgi.h>
|
||||
|
||||
#include "cl_common.hpp"
|
||||
#include "cl_d3d10_amd.hpp"
|
||||
#include "runtime/platform/command.hpp"
|
||||
|
||||
@@ -21,64 +21,13 @@
|
||||
#ifndef CL_D3D10_AMD_HPP_
|
||||
#define CL_D3D10_AMD_HPP_
|
||||
|
||||
#include "CL/cl_d3d10.h"
|
||||
#include "cl_common.hpp"
|
||||
|
||||
#include "platform/context.hpp"
|
||||
#include "platform/memory.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromD3D10KHR(
|
||||
cl_platform_id /*platform*/,
|
||||
cl_d3d10_device_source_khr /*d3d_device_source*/,
|
||||
void * /*d3d_object*/,
|
||||
cl_d3d10_device_set_khr /*d3d_device_set*/,
|
||||
cl_uint /*num_entries*/,
|
||||
cl_device_id * /*devices*/,
|
||||
cl_uint * /*num_devices*/);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D10BufferKHR(
|
||||
cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
ID3D10Buffer * /* buffer */,
|
||||
cl_int * /* errcode_ret */);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D10Texture2DKHR(
|
||||
cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
ID3D10Texture2D * /* resource */,
|
||||
UINT /* subresource */,
|
||||
cl_int * /* errcode_ret */);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D10Texture3DKHR(
|
||||
cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
ID3D10Texture3D * /* resource */,
|
||||
UINT /* subresource */,
|
||||
cl_int * /* errcode_ret */);
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireD3D10ObjectsKHR(
|
||||
cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_objects */,
|
||||
const cl_mem * /* mem_objects */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */);
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseD3D10ObjectsKHR(
|
||||
cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_objects */,
|
||||
const cl_mem * /* mem_objects */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */);
|
||||
|
||||
namespace amd
|
||||
{
|
||||
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
|
||||
#include "top.hpp"
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <dxgi.h>
|
||||
|
||||
#include "cl_common.hpp"
|
||||
#include "cl_d3d11_amd.hpp"
|
||||
#include "runtime/platform/command.hpp"
|
||||
|
||||
|
||||
@@ -21,65 +21,12 @@
|
||||
#ifndef CL_D3D11_AMD_HPP_
|
||||
#define CL_D3D11_AMD_HPP_
|
||||
|
||||
#include "CL/cl_d3d11.h"
|
||||
|
||||
#include "cl_d3d10_amd.hpp"
|
||||
#include "platform/context.hpp"
|
||||
#include "platform/memory.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromD3D11KHR(
|
||||
cl_platform_id /*platform*/,
|
||||
cl_d3d11_device_source_khr /*d3d_device_source*/,
|
||||
void * /*d3d_object*/,
|
||||
cl_d3d11_device_set_khr /*d3d_device_set*/,
|
||||
cl_uint /*num_entries*/,
|
||||
cl_device_id * /*devices*/,
|
||||
cl_uint * /*num_devices*/);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D11BufferKHR(
|
||||
cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
ID3D11Buffer * /* buffer */,
|
||||
cl_int * /* errcode_ret */);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D11Texture2DKHR(
|
||||
cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
ID3D11Texture2D * /* resource */,
|
||||
UINT /* subresource */,
|
||||
cl_int * /* errcode_ret */);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromD3D11Texture3DKHR(
|
||||
cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
ID3D11Texture3D * /* resource */,
|
||||
UINT /* subresource */,
|
||||
cl_int * /* errcode_ret */);
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireD3D11ObjectsKHR(
|
||||
cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_objects */,
|
||||
const cl_mem * /* mem_objects */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */);
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseD3D11ObjectsKHR(
|
||||
cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_objects */,
|
||||
const cl_mem * /* mem_objects */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clGetPlaneFromImageAMD(
|
||||
cl_context /* context */,
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
|
||||
#include "top.hpp"
|
||||
|
||||
#include <d3d9.h>
|
||||
#include "cl_common.hpp"
|
||||
#include "cl_d3d9_amd.hpp"
|
||||
#include "runtime/platform/command.hpp"
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
#ifndef __OPENCL_CL_D3D9_AMD_H
|
||||
#define __OPENCL_CL_D3D9_AMD_H
|
||||
|
||||
#include "CL/cl_dx9_media_sharing.h"
|
||||
#include <d3d9.h>
|
||||
#include "cl_common.hpp"
|
||||
#include "platform/context.hpp"
|
||||
#include "platform/memory.hpp"
|
||||
|
||||
@@ -40,44 +39,6 @@
|
||||
/* cl_amd_d3d9_sharing enumerations */
|
||||
#define CL_CONTEXT_D3D9_DEVICE_KHR 0x4039
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetDeviceIDsFromDX9MediaAdapterKHR(
|
||||
cl_platform_id,
|
||||
cl_uint,
|
||||
cl_dx9_media_adapter_type_khr *,
|
||||
void *,
|
||||
cl_dx9_media_adapter_set_khr,
|
||||
cl_uint,
|
||||
cl_device_id *,
|
||||
cl_uint *);
|
||||
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateFromDX9MediaSurfaceKHR(
|
||||
cl_context,
|
||||
cl_mem_flags,
|
||||
cl_dx9_media_adapter_type_khr,
|
||||
void *,
|
||||
cl_uint,
|
||||
cl_int *);
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueAcquireDX9MediaSurfacesKHR(
|
||||
cl_command_queue,
|
||||
cl_uint,
|
||||
const cl_mem *,
|
||||
cl_uint,
|
||||
const cl_event *,
|
||||
cl_event *);
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReleaseDX9MediaSurfacesKHR(
|
||||
cl_command_queue,
|
||||
cl_uint,
|
||||
const cl_mem *,
|
||||
cl_uint,
|
||||
const cl_event *,
|
||||
cl_event *);
|
||||
|
||||
namespace amd
|
||||
{
|
||||
typedef struct
|
||||
|
||||
Ссылка в новой задаче
Block a user