mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
spirv_new: print build log in get_program_with_il (#2274)
Print the build log when building the program in `get_program_with_il` fails, to make it easier to investigate spirv_new test failures. Factor out a global helper function `OutputBuildLog` for printing the build log for a single device. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
ea934a7648
commit
46dcf18a18
@@ -172,7 +172,12 @@ int get_program_with_il(clProgramWrapper &prog, const cl_device_id deviceID,
|
||||
}
|
||||
|
||||
err = clBuildProgram(prog, 1, &deviceID, NULL, NULL, NULL);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to build program");
|
||||
if (err != CL_SUCCESS)
|
||||
{
|
||||
cl_int outputErr = OutputBuildLog(prog, deviceID);
|
||||
SPIRV_CHECK_ERROR(outputErr, "OutputBuildLog failed");
|
||||
return err;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user