Set CAPTURE flag in fillExecObject

Resolves: NEO-5026

Change-Id: I132d5f1c02edf8e595d31e08029fb32ccbd6d307
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-10-26 11:01:33 +01:00
committed by sys_ocldev
parent e4adb7efbf
commit f9a97cbb22
3 changed files with 16 additions and 1 deletions

View File

@ -190,7 +190,7 @@ function(neo_copy_test_files_with_revision target product revision_id)
DEPENDS ${NEO_SOURCE_DIR}/opencl/test/unit_test/test_files
)
add_dependencies(${target} copy_compiler_files)
set_target_properties(${target} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}}")
set_target_properties(${target} PROPERTIES FOLDER "${PLATFORM_SPECIFIC_TEST_TARGETS_FOLDER}/${product}/${revision_id}")
endfunction()
add_dependencies(unit_tests

View File

@ -430,3 +430,15 @@ TEST(DrmBufferObject, whenMarkForCapturedCalledThenIsMarkedForCaptureReturnsTrue
bo.markForCapture();
EXPECT_TRUE(bo.isMarkedForCapture());
}
TEST_F(DrmBufferObjectTest, givenBoMarkedForCaptureWhenFillingExecObjectThenCaptureFlagIsSet) {
drm_i915_gem_exec_object2 execObject;
memset(&execObject, 0, sizeof(execObject));
bo->markForCapture();
bo->setAddress(0x45000);
bo->setSize(0x1000);
bo->fillExecObject(execObject, osContext.get(), 0, 1);
EXPECT_TRUE(execObject.flags & EXEC_OBJECT_CAPTURE);
}