From 087fe822063f75d943522d0ef57c08812a910448 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 9 May 2018 17:26:59 -0400
Subject: [PATCH] P4 to Git Change 1552790 by gandryey@gera-w8 on 2018/05/09
17:18:25
SWDEV-79445 - OCL generic changes and code clean-up
- Following CL#1552596. Keep memory validation check for GL acquire command, since it also has GL acquire call in it.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#85 edit
---
rocclr/runtime/platform/command.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/rocclr/runtime/platform/command.cpp b/rocclr/runtime/platform/command.cpp
index 4d5f3ec81e..5fcb80cabe 100644
--- a/rocclr/runtime/platform/command.cpp
+++ b/rocclr/runtime/platform/command.cpp
@@ -440,11 +440,8 @@ cl_int NDRangeKernelCommand::validateMemory() {
}
bool ExtObjectsCommand::validateMemory() {
- // Runtime disables deferred memory allocation for single device.
- // Hence ignore memory validations
- if (queue()->context().devices().size() == 1) {
- return true;
- }
+ // Always process GL objects, even if deferred allocations are disabled,
+ // because processGLResource() calls OGL Acquire().
bool retVal = true;
for (const auto& it : memObjects_) {
device::Memory* mem = it->getDeviceMemory(queue()->device());