KhronosGroup / WebCL-conformance

WebCL conformance tests
20 stars 15 forks source link

Invalid expectation in enqueueCopyBufferRect tests #75

Closed toaarnio closed 10 years ago

toaarnio commented 10 years ago

In cl_commandQueue_enqueueCopyBufferRect.html, the following statement is expected to throw MEM_COPY_OVERLAP:

webCLCommandQueue.enqueueCopyBufferRect(srcBuffer, srcBuffer, srcOrigin, [10, 10, 10], region, srcRowPitch, srcSlicePitch, srcRowPitch, srcSlicePitch);

However, the destination origin [10, 10, 10] lies outside the buffer boundaries, because the pitch arguments are zero and region equals [64, 8, 2]. A conformant implementation will therefore throw INVALID_VALUE instead of MEM_COPY_OVERLAP.

My proposed fix is to replace [10, 10, 10] with, e.g., [0, 1, 0], and region with [2, 2, 1], for example. This ensures that a conformant implementation will throw MEM_COPY_OVERLAP.

toaarnio commented 10 years ago

Fixed by https://github.com/KhronosGroup/WebCL-conformance/commit/5ce41734c34264b8ad64df370937f950dfe81ab2.