mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: correct black box test
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
00bae2c827
commit
dcd0bd4c30
@@ -130,7 +130,7 @@ int main(int argc, char **argv) {
|
||||
abort();
|
||||
}
|
||||
|
||||
void *ptr = clEnqueueMapBuffer(queue, buffer, CL_TRUE, CL_MAP_READ, 0, bufferSize, 0, nullptr, nullptr, &err);
|
||||
void *ptr = clEnqueueMapBuffer(queue, buffer, CL_TRUE, CL_MAP_WRITE, 0, bufferSize, 0, nullptr, nullptr, &err);
|
||||
if (err || ptr == nullptr) {
|
||||
cout << "Error mapping buffer" << endl;
|
||||
abort();
|
||||
@@ -165,12 +165,6 @@ int main(int argc, char **argv) {
|
||||
abort();
|
||||
}
|
||||
|
||||
err = clFinish(queue);
|
||||
if (err) {
|
||||
cout << "Error Finish" << endl;
|
||||
abort();
|
||||
}
|
||||
|
||||
{
|
||||
void *ptr = clEnqueueMapBuffer(queue, buffer, CL_TRUE, CL_MAP_READ, 0, bufferSize, 0, nullptr, nullptr, &err);
|
||||
if (err || ptr == nullptr) {
|
||||
@@ -188,6 +182,12 @@ int main(int argc, char **argv) {
|
||||
cout << "Error unmapping buffer" << endl;
|
||||
abort();
|
||||
}
|
||||
|
||||
err = clFinish(queue);
|
||||
if (err) {
|
||||
cout << "Error Finish" << endl;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
if (validatePrintfOutput) {
|
||||
|
||||
Reference in New Issue
Block a user