From 3ff36af595041df79354b182892278e1f7ebb5f2 Mon Sep 17 00:00:00 2001 From: Brian Sumner Date: Thu, 16 Feb 2017 07:33:10 -0800 Subject: [PATCH] Proposed fix for bug 16239 --- test_conformance/half/cl_utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_conformance/half/cl_utils.c b/test_conformance/half/cl_utils.c index 4a6123b7..81a21158 100644 --- a/test_conformance/half/cl_utils.c +++ b/test_conformance/half/cl_utils.c @@ -451,7 +451,9 @@ size_t getBufferSize(cl_device_id device_id) s_result = 64*1024; goto exit; } - log_info("Const buffer size is %llx (%llu)\n", result, result); + if (result > BUFFER_SIZE) + result = BUFFER_SIZE; + log_info("Using const buffer size 0x%lx (%ld)\n", (unsigned long)result, (unsigned long)result); err = clGetDeviceInfo (device_id, CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(maxGlobalSize), (void *)&maxGlobalSize,