From c384997fbdf1f7a92e15ca00bd23c53b7be8fa2f Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 23 Feb 2015 19:59:07 -0500
Subject: [PATCH] P4 to Git Change 1124329 by gandryey@gera-w8 on 2015/02/23
19:50:45
ECR #304775 - Enable CL-GL depth extension
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#303 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#116 edit
[ROCm/clr commit: 2b6c49020af1c26355b772795c24095ba70c6a6f]
---
projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp | 4 +---
projects/clr/rocclr/runtime/platform/memory.cpp | 3 ++-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
index 50f2fd1447..7e6e6341b9 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -338,9 +338,6 @@ Settings::create(
rectLinearDMA_ = true;
- if (oclVersion_ >= OpenCL20) {
- //enableExtension(ClKhrGLDepthImages);
- }
if (AMD_THREAD_TRACE_ENABLE) {
threadTraceEnable_ = true;
}
@@ -431,6 +428,7 @@ Settings::create(
// Enable some OpenCL 2.0 extensions
if (oclVersion_ >= OpenCL20) {
+ enableExtension(ClKhrGLDepthImages);
enableExtension(ClKhrSubGroups);
enableExtension(ClKhrDepthImages);
diff --git a/projects/clr/rocclr/runtime/platform/memory.cpp b/projects/clr/rocclr/runtime/platform/memory.cpp
index 8e35fe9764..7f4af7b21c 100644
--- a/projects/clr/rocclr/runtime/platform/memory.cpp
+++ b/projects/clr/rocclr/runtime/platform/memory.cpp
@@ -999,7 +999,8 @@ Image::numSupportedFormats(const Context& context, cl_mem_object_type image_type
if (devices[i]->settings().supportDepthsRGB_) {
supportDepthsRGB = true;
}
- if (devices[i]->settings().checkExtension(ClKhrGLDepthImages)) {
+ if (devices[i]->settings().checkExtension(ClKhrGLDepthImages) &&
+ (context.info().flags_ & Context::GLDeviceKhr)) {
supportDepthStencil = true;
}
}