From cf0a8d99de299656a8d1bc33bcbf5e2bb5f12441 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 14 Jun 2018 16:39:10 -0400
Subject: [PATCH] P4 to Git Change 1568474 by asalmanp@asalmanp-ocl-stg on
2018/06/14 16:29:06
SWDEV-132899 - [OCL][GFX10] OCLGLDepthTex[0] and OCLGLDepthTex[4] subtests of OCLTST/OCLGL are failing on gfx10 Emulator
extending the Depth24_Stencil8 workaround for gfx10 based on gfx10 Image SRDs
ReviewBoardURL = http://ocltc.amd.com/reviews/r/15194/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#67 edit
[ROCm/clr commit: c149902a4db912a13250dea48568250e101c50c3]
---
projects/clr/rocclr/runtime/device/pal/palresource.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/pal/palresource.cpp b/projects/clr/rocclr/runtime/device/pal/palresource.cpp
index 42c03d25cf..63a2e15e99 100644
--- a/projects/clr/rocclr/runtime/device/pal/palresource.cpp
+++ b/projects/clr/rocclr/runtime/device/pal/palresource.cpp
@@ -910,8 +910,13 @@ bool Resource::CreateInterop(CreateParams* params)
//! and GSL decompresses 24bit DEPTH into D24S8 for OGL compatibility
if ((desc().format_.image_channel_order == CL_DEPTH_STENCIL) &&
(desc().format_.image_channel_data_type == CL_UNORM_INT24)) {
- hwState_[1] &= ~0x3c000000;
- hwState_[1] = (hwState_[1] & ~0x3f00000) | 0x1400000;
+ if (dev().settings().gfx10Plus_) {
+ hwState_[1] = (hwState_[1] & ~0x1ff00000) | 0x08d00000;
+ }
+ else {
+ hwState_[1] &= ~0x3c000000;
+ hwState_[1] = (hwState_[1] & ~0x3f00000) | 0x1400000;
+ }
}
hwState_[8] = GetHSAILImageFormatType(desc().format_);
hwState_[9] = GetHSAILImageOrderType(desc().format_);