diff --git a/unified-runtime/include/ur_api.h b/unified-runtime/include/ur_api.h index 6afa2c0e3fd2a..cc2e717acd921 100644 --- a/unified-runtime/include/ur_api.h +++ b/unified-runtime/include/ur_api.h @@ -7943,7 +7943,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferWrite( /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_SIZE -/// + `region.width == 0 || region.height == 0 || region.width == 0` +/// + `region.width == 0 || region.height == 0 || region.depth == 0` /// + `bufferRowPitch != 0 && bufferRowPitch < region.width` /// + `hostRowPitch != 0 && hostRowPitch < region.width` /// + `bufferSlicePitch != 0 && bufferSlicePitch < region.height * @@ -8029,7 +8029,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferReadRect( /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_SIZE -/// + `region.width == 0 || region.height == 0 || region.width == 0` +/// + `region.width == 0 || region.height == 0 || region.depth == 0` /// + `bufferRowPitch != 0 && bufferRowPitch < region.width` /// + `hostRowPitch != 0 && hostRowPitch < region.width` /// + `bufferSlicePitch != 0 && bufferSlicePitch < region.height * diff --git a/unified-runtime/scripts/core/enqueue.yml b/unified-runtime/scripts/core/enqueue.yml index cc2597962d338..25db36bb8f303 100644 --- a/unified-runtime/scripts/core/enqueue.yml +++ b/unified-runtime/scripts/core/enqueue.yml @@ -328,7 +328,7 @@ returns: - "An event in `phEventWaitList` has $X_EVENT_STATUS_ERROR." - $X_RESULT_ERROR_INVALID_MEM_OBJECT - $X_RESULT_ERROR_INVALID_SIZE: - - "`region.width == 0 || region.height == 0 || region.width == 0`" + - "`region.width == 0 || region.height == 0 || region.depth == 0`" - "`bufferRowPitch != 0 && bufferRowPitch < region.width`" - "`hostRowPitch != 0 && hostRowPitch < region.width`" - "`bufferSlicePitch != 0 && bufferSlicePitch < region.height * (bufferRowPitch != 0 ? bufferRowPitch : region.width)`" @@ -406,7 +406,7 @@ returns: - "An event in `phEventWaitList` has $X_EVENT_STATUS_ERROR." - $X_RESULT_ERROR_INVALID_MEM_OBJECT - $X_RESULT_ERROR_INVALID_SIZE: - - "`region.width == 0 || region.height == 0 || region.width == 0`" + - "`region.width == 0 || region.height == 0 || region.depth == 0`" - "`bufferRowPitch != 0 && bufferRowPitch < region.width`" - "`hostRowPitch != 0 && hostRowPitch < region.width`" - "`bufferSlicePitch != 0 && bufferSlicePitch < region.height * (bufferRowPitch != 0 ? bufferRowPitch : region.width)`" diff --git a/unified-runtime/source/loader/layers/validation/ur_valddi.cpp b/unified-runtime/source/loader/layers/validation/ur_valddi.cpp index 73be8d39d9ce3..87023c800e234 100644 --- a/unified-runtime/source/loader/layers/validation/ur_valddi.cpp +++ b/unified-runtime/source/loader/layers/validation/ur_valddi.cpp @@ -4907,7 +4907,7 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueMemBufferReadRect( if (phEventWaitList != NULL && numEventsInWaitList == 0) return UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST; - if (region.width == 0 || region.height == 0 || region.width == 0) + if (region.width == 0 || region.height == 0 || region.depth == 0) return UR_RESULT_ERROR_INVALID_SIZE; if (bufferRowPitch != 0 && bufferRowPitch < region.width) @@ -5037,7 +5037,7 @@ __urdlllocal ur_result_t UR_APICALL urEnqueueMemBufferWriteRect( if (phEventWaitList != NULL && numEventsInWaitList == 0) return UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST; - if (region.width == 0 || region.height == 0 || region.width == 0) + if (region.width == 0 || region.height == 0 || region.depth == 0) return UR_RESULT_ERROR_INVALID_SIZE; if (bufferRowPitch != 0 && bufferRowPitch < region.width) diff --git a/unified-runtime/source/loader/ur_libapi.cpp b/unified-runtime/source/loader/ur_libapi.cpp index 67596679fbd9d..83d1fb4a42519 100644 --- a/unified-runtime/source/loader/ur_libapi.cpp +++ b/unified-runtime/source/loader/ur_libapi.cpp @@ -5412,7 +5412,7 @@ ur_result_t UR_APICALL urEnqueueMemBufferWrite( /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_SIZE -/// + `region.width == 0 || region.height == 0 || region.width == 0` +/// + `region.width == 0 || region.height == 0 || region.depth == 0` /// + `bufferRowPitch != 0 && bufferRowPitch < region.width` /// + `hostRowPitch != 0 && hostRowPitch < region.width` /// + `bufferSlicePitch != 0 && bufferSlicePitch < region.height * @@ -5510,7 +5510,7 @@ ur_result_t UR_APICALL urEnqueueMemBufferReadRect( /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_SIZE -/// + `region.width == 0 || region.height == 0 || region.width == 0` +/// + `region.width == 0 || region.height == 0 || region.depth == 0` /// + `bufferRowPitch != 0 && bufferRowPitch < region.width` /// + `hostRowPitch != 0 && hostRowPitch < region.width` /// + `bufferSlicePitch != 0 && bufferSlicePitch < region.height * diff --git a/unified-runtime/source/ur_api.cpp b/unified-runtime/source/ur_api.cpp index 316ddf54cfbe7..655e9374d244f 100644 --- a/unified-runtime/source/ur_api.cpp +++ b/unified-runtime/source/ur_api.cpp @@ -4732,7 +4732,7 @@ ur_result_t UR_APICALL urEnqueueMemBufferWrite( /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_SIZE -/// + `region.width == 0 || region.height == 0 || region.width == 0` +/// + `region.width == 0 || region.height == 0 || region.depth == 0` /// + `bufferRowPitch != 0 && bufferRowPitch < region.width` /// + `hostRowPitch != 0 && hostRowPitch < region.width` /// + `bufferSlicePitch != 0 && bufferSlicePitch < region.height * @@ -4821,7 +4821,7 @@ ur_result_t UR_APICALL urEnqueueMemBufferReadRect( /// + An event in `phEventWaitList` has ::UR_EVENT_STATUS_ERROR. /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_SIZE -/// + `region.width == 0 || region.height == 0 || region.width == 0` +/// + `region.width == 0 || region.height == 0 || region.depth == 0` /// + `bufferRowPitch != 0 && bufferRowPitch < region.width` /// + `hostRowPitch != 0 && hostRowPitch < region.width` /// + `bufferSlicePitch != 0 && bufferSlicePitch < region.height * diff --git a/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferCopyRect.cpp b/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferCopyRect.cpp index 6e74f20700d06..bfce4fb71fd27 100644 --- a/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferCopyRect.cpp +++ b/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferCopyRect.cpp @@ -240,7 +240,7 @@ TEST_P(urEnqueueMemBufferCopyRectTest, InvalidNullPtrEventWaitList) { TEST_P(urEnqueueMemBufferCopyRectTest, InvalidSize) { UUR_KNOWN_FAILURE_ON(uur::NativeCPU{}); - // region.width == 0 || region.height == 0 || region.width == 0 + // region.width == 0 || region.height == 0 || region.depth == 0 src_region.width = 0; ASSERT_EQ_RESULT(urEnqueueMemBufferCopyRect( queue, src_buffer, dst_buffer, src_origin, dst_origin, diff --git a/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferReadRect.cpp b/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferReadRect.cpp index 91008bc3b9e45..d112868dfdbae 100644 --- a/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferReadRect.cpp +++ b/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferReadRect.cpp @@ -197,7 +197,7 @@ TEST_P(urEnqueueMemBufferReadRectTest, InvalidSize) { std::vector dst(count); - // region.width == 0 || region.height == 0 || region.width == 0 + // region.width == 0 || region.height == 0 || region.depth == 0 region.width = 0; ASSERT_EQ_RESULT(urEnqueueMemBufferReadRect( queue, buffer, true, buffer_offset, host_offset, region, diff --git a/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferWriteRect.cpp b/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferWriteRect.cpp index 9647b8089111d..a7c5a7cd7ec7a 100644 --- a/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferWriteRect.cpp +++ b/unified-runtime/test/conformance/enqueue/urEnqueueMemBufferWriteRect.cpp @@ -210,7 +210,7 @@ TEST_P(urEnqueueMemBufferWriteRectTest, InvalidSize) { std::vector src(count); std::fill(src.begin(), src.end(), 1); - // region.width == 0 || region.height == 0 || region.width == 0 + // region.width == 0 || region.height == 0 || region.depth == 0 region.width = 0; ASSERT_EQ_RESULT(urEnqueueMemBufferWriteRect( queue, buffer, true, buffer_offset, host_offset, region,