mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Conditionally disable DX sharing extensions
Change-Id: Idbc253f072a9400962b7500e75ba6fd86e5e6b59 Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
71950fa7cc
commit
9c716a8d98
@ -9,6 +9,8 @@
|
||||
|
||||
#include "opencl/source/sharings/d3d/enable_d3d.h"
|
||||
|
||||
#include "shared/source/os_interface/driver_info.h"
|
||||
|
||||
#include "opencl/source/api/api.h"
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/context/context.inl"
|
||||
@ -103,7 +105,7 @@ std::unique_ptr<SharingContextBuilder> D3DSharingBuilderFactory<D3D>::createCont
|
||||
};
|
||||
|
||||
std::string D3DSharingBuilderFactory<D3DTypesHelper::D3D9>::getExtensions() {
|
||||
return "cl_intel_dx9_media_sharing cl_khr_dx9_media_sharing ";
|
||||
return extensionEnabled ? "cl_intel_dx9_media_sharing cl_khr_dx9_media_sharing " : "";
|
||||
}
|
||||
|
||||
std::string D3DSharingBuilderFactory<D3DTypesHelper::D3D10>::getExtensions() {
|
||||
@ -167,6 +169,15 @@ void *D3DSharingBuilderFactory<D3DTypesHelper::D3D11>::getExtensionFunctionAddre
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void D3DSharingBuilderFactory<D3DTypesHelper::D3D9>::setExtensionEnabled(DriverInfo *driverInfo) {
|
||||
extensionEnabled = driverInfo->getMediaSharingSupport();
|
||||
}
|
||||
|
||||
void D3DSharingBuilderFactory<D3DTypesHelper::D3D10>::setExtensionEnabled(DriverInfo *driverInfo) {}
|
||||
|
||||
void D3DSharingBuilderFactory<D3DTypesHelper::D3D11>::setExtensionEnabled(DriverInfo *driverInfo) {}
|
||||
|
||||
static SharingFactory::RegisterSharing<D3DSharingBuilderFactory<D3DTypesHelper::D3D9>, D3DSharingFunctions<D3DTypesHelper::D3D9>> D3D9Sharing;
|
||||
static SharingFactory::RegisterSharing<D3DSharingBuilderFactory<D3DTypesHelper::D3D10>, D3DSharingFunctions<D3DTypesHelper::D3D10>> D3D10Sharing;
|
||||
static SharingFactory::RegisterSharing<D3DSharingBuilderFactory<D3DTypesHelper::D3D11>, D3DSharingFunctions<D3DTypesHelper::D3D11>> D3D11Sharing;
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
namespace NEO {
|
||||
class Context;
|
||||
class DriverInfo;
|
||||
|
||||
template <typename D3D>
|
||||
struct D3DCreateContextProperties {
|
||||
@ -37,5 +38,7 @@ class D3DSharingBuilderFactory : public SharingBuilderFactory {
|
||||
std::string getExtensions() override;
|
||||
void fillGlobalDispatchTable() override;
|
||||
void *getExtensionFunctionAddress(const std::string &functionName) override;
|
||||
void setExtensionEnabled(DriverInfo *driverInfo) override;
|
||||
bool extensionEnabled = true;
|
||||
};
|
||||
} // namespace NEO
|
Reference in New Issue
Block a user