Fix code format errors

This commit is contained in:
Grzegorz Wawiorko
2020-07-06 13:05:22 +02:00
committed by Alastair Murray
parent c85527cec7
commit 44a240367e
16 changed files with 218 additions and 112 deletions

View File

@@ -30,34 +30,43 @@ TEST_SPIRV_FUNC(op_type_opaque_simple)
clProgramWrapper prog;
if (gCoreILProgram) {
if (gCoreILProgram)
{
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
SPIRV_CHECK_ERROR(
err, "Failed to create program with clCreateProgramWithIL");
}
else {
else
{
cl_platform_id platform;
err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL);
SPIRV_CHECK_ERROR(err, "Failed to get platform info with clGetDeviceInfo");
err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM,
sizeof(cl_platform_id), &platform, NULL);
SPIRV_CHECK_ERROR(err,
"Failed to get platform info with clGetDeviceInfo");
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)clGetExtensionFunctionAddressForPlatform(platform, "clCreateProgramWithILKHR");
clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)
clGetExtensionFunctionAddressForPlatform(
platform, "clCreateProgramWithILKHR");
if (clCreateProgramWithILKHR == NULL)
{
log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
log_error(
"ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
return -1;
}
prog = clCreateProgramWithILKHR(context, buffer, file_bytes, &err);
SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithILKHR");
SPIRV_CHECK_ERROR(
err, "Failed to create program with clCreateProgramWithILKHR");
}
err = clCompileProgram(prog, 1, &deviceID,
NULL, // options
0, // num headers
0, // num headers
NULL, // input headers
NULL, // header include names
NULL, // callback
NULL // User data
);
NULL // User data
);
SPIRV_CHECK_ERROR(err, "Failed to compile spv program");
return 0;
}