Validate region and origin for all image API calls

Change-Id: I28782d8838cf8f5d800f76c922fcb59235f637a1
This commit is contained in:
Dunajski, Bartosz
2018-03-08 11:11:27 +01:00
committed by sys_ocldev
parent 2fd122398f
commit 08c2379f6e
11 changed files with 258 additions and 137 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -107,7 +107,7 @@ TEST_F(clEnqueueWriteImageTests, returnSuccess) {
ASSERT_EQ(CL_SUCCESS, retVal);
EXPECT_NE(nullptr, image);
const size_t origin[] = {2, 2, 0};
const size_t region[] = {2, 2, 0};
const size_t region[] = {2, 2, 1};
auto retVal = clEnqueueWriteImage(
pCommandQueue,
image,
@@ -139,7 +139,7 @@ TEST_F(clEnqueueWriteImageYUV, returnSuccess) {
ASSERT_EQ(CL_SUCCESS, retVal);
EXPECT_NE(nullptr, image);
const size_t origin[] = {2, 2, 0};
const size_t region[] = {2, 2, 0};
const size_t region[] = {2, 2, 1};
auto retVal = clEnqueueWriteImage(
pCommandQueue,
image,