improve clCreateContext conformance
authorHomer Hsing <homer.xing@intel.com>
Wed, 10 Jul 2013 05:22:01 +0000 (13:22 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Fri, 12 Jul 2013 01:19:05 +0000 (09:19 +0800)
commit8c496635b1ec8a2612e15b30d64d9180a2497a55
tree0c1f40806065fe27f6f81081878b7b2b6b0ccd92
parent4483825ea14e85dc1f7d23a47deea472f82ce10e
improve clCreateContext conformance

OpenCL specification says "clCreateContext" function returns
CL_INVALID_PROPERTY if the same property name appears more than once.

But "clCreateContext" did not follow that.

This patch uses a local temp integer to track whether a property name has
appeared. If so, returns CL_INVALID_PROPERTY.

This patch makes Piglit test case "clCreateContext" pass.

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Song, Ruiling <ruiling.song@intel.com>
src/cl_context.c