diff --git a/unified-runtime/include/ur_api.h b/unified-runtime/include/ur_api.h index 814cdd58413fd..8fff10c03e10a 100644 --- a/unified-runtime/include/ur_api.h +++ b/unified-runtime/include/ur_api.h @@ -7858,7 +7858,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 * @@ -7944,7 +7944,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/adapters/hip/enqueue.cpp b/unified-runtime/source/adapters/hip/enqueue.cpp index 849369de4bb90..4454d7a38a5d2 100644 --- a/unified-runtime/source/adapters/hip/enqueue.cpp +++ b/unified-runtime/source/adapters/hip/enqueue.cpp @@ -506,7 +506,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferReadRect( UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST); UR_ASSERT(!(phEventWaitList != NULL && numEventsInWaitList == 0), UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST); - UR_ASSERT(!(region.width == 0 || region.height == 0 || region.width == 0), + UR_ASSERT(!(region.width == 0 || region.height == 0 || region.depth == 0), UR_RESULT_ERROR_INVALID_SIZE); UR_ASSERT(!(bufferRowPitch != 0 && bufferRowPitch < region.width), UR_RESULT_ERROR_INVALID_SIZE); diff --git a/unified-runtime/source/loader/layers/validation/ur_valddi.cpp b/unified-runtime/source/loader/layers/validation/ur_valddi.cpp index 5fad2472419ff..b4c65f9509799 100644 --- a/unified-runtime/source/loader/layers/validation/ur_valddi.cpp +++ b/unified-runtime/source/loader/layers/validation/ur_valddi.cpp @@ -4807,7 +4807,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) @@ -4932,7 +4932,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 8019681b288d8..bd0cc88c83664 100644 --- a/unified-runtime/source/loader/ur_libapi.cpp +++ b/unified-runtime/source/loader/ur_libapi.cpp @@ -5347,7 +5347,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 * @@ -5445,7 +5445,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 2bc2da22f256a..08345a3adcc90 100644 --- a/unified-runtime/source/ur_api.cpp +++ b/unified-runtime/source/ur_api.cpp @@ -4678,7 +4678,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 * @@ -4767,7 +4767,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,