mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
fix the reported platform information for math brute force (#1884)
When the math brute force test printed the platform version it always printed information for the first platform in the system, which could be different than the platform for the passed-in device. Fixed by querying the platform from the passed-in device instead.
This commit is contained in:
@@ -769,10 +769,11 @@ test_status InitCL(cl_device_id device)
|
||||
IsTininessDetectedBeforeRounding();
|
||||
|
||||
cl_platform_id platform;
|
||||
int err = clGetPlatformIDs(1, &platform, NULL);
|
||||
int err = clGetDeviceInfo(gDevice, CL_DEVICE_PLATFORM, sizeof(platform),
|
||||
&platform, NULL);
|
||||
if (err)
|
||||
{
|
||||
print_error(err, "clGetPlatformIDs failed");
|
||||
print_error(err, "clGetDeviceInfo for CL_DEVICE_PLATFORM failed");
|
||||
return TEST_FAIL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user