mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Remove OCL2.1 restriction on clCreateProgramWithILKHR
Change-Id: Ie0951465e226fb13b49d4f01f9a81b9c562a13e9 Signed-off-by: Adam Cetnerowski <adam.cetnerowski@intel.com>
This commit is contained in:
@ -158,11 +158,6 @@ T *Program::createFromIL(Context *ctx,
|
||||
cl_int &errcodeRet) {
|
||||
errcodeRet = CL_SUCCESS;
|
||||
|
||||
if (ctx->getDevice(0)->areOcl21FeaturesEnabled() == false) {
|
||||
errcodeRet = CL_INVALID_VALUE;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ((il == nullptr) || (length == 0)) {
|
||||
errcodeRet = CL_INVALID_BINARY;
|
||||
return nullptr;
|
||||
|
@ -88,14 +88,9 @@ TEST_F(clCreateProgramWithILTests, GivenContextWithDevicesThatDontSupportILWhenC
|
||||
cl_int err = CL_SUCCESS;
|
||||
const uint32_t spirv[16] = {0x03022307};
|
||||
cl_program prog = clCreateProgramWithIL(pContext, spirv, sizeof(spirv), &err);
|
||||
if (pContext->getDevice(0)->areOcl21FeaturesEnabled()) {
|
||||
EXPECT_EQ(CL_SUCCESS, err);
|
||||
EXPECT_NE(nullptr, prog);
|
||||
clReleaseProgram(prog);
|
||||
} else {
|
||||
EXPECT_EQ(CL_INVALID_VALUE, err);
|
||||
EXPECT_EQ(nullptr, prog);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(clCreateProgramWithILTests, GivenIncorrectIlSizeWhenCreatingProgramWithIlThenInvalidBinaryErrorIsReturned) {
|
||||
|
Reference in New Issue
Block a user