mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
Enable building the spirv kernel more than once
Change-Id: Ia93456e7b7afaee07fa633727e943d8db2736f07 Resolves: NEO-2837 Signed-off-by: Koska, Andrzej <andrzej.koska@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
8219cfa000
commit
066743747d
@@ -117,6 +117,20 @@ TEST_F(clCreateProgramWithILKHRTests, GivenCorrectParametersWhenCreatingProgramW
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
TEST_F(clCreateProgramWithILKHRTests, GivenProgramCreatedWithILWhenBuildAfterBuildIsCalledThenReturnSuccess) {
|
||||
const uint32_t spirv[16] = {0x03022307};
|
||||
cl_int err = CL_INVALID_VALUE;
|
||||
cl_program program = clCreateProgramWithIL(pContext, spirv, sizeof(spirv), &err);
|
||||
EXPECT_EQ(CL_SUCCESS, err);
|
||||
EXPECT_NE(nullptr, program);
|
||||
err = clBuildProgram(program, 0, nullptr, "", nullptr, nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, err);
|
||||
err = clBuildProgram(program, 0, nullptr, "", nullptr, nullptr);
|
||||
EXPECT_EQ(CL_SUCCESS, err);
|
||||
retVal = clReleaseProgram(program);
|
||||
EXPECT_EQ(CL_SUCCESS, retVal);
|
||||
}
|
||||
|
||||
TEST_F(clCreateProgramWithILKHRTests, GivenNullIlWhenCreatingProgramWithIlkhrThenNullProgramIsReturned) {
|
||||
cl_program program = clCreateProgramWithILKHR(pContext, nullptr, 0, nullptr);
|
||||
EXPECT_EQ(nullptr, program);
|
||||
|
||||
Reference in New Issue
Block a user