From aab00a26bcc550967e94f51ff1bdb664d58c05a4 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 17 Jan 2019 18:33:10 -0500
Subject: [PATCH] P4 to Git Change 1732177 by gandryey@gera-w8 on 2019/01/17
18:08:26
SWDEV-174282 - [AMF] WIN10 Converter fails when scale YUY2 image with certain output width
- When OCL creates an image view use the pitch value from the original surface
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#185 edit
---
rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index 51fa4b323b..8d9021981b 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -1007,6 +1007,10 @@ CALGSLDevice::resAllocView(gslMemObject res, gslResource3D size, size_t offset,
{
return 0; //offset doesn't match alignment requirements.
}
+ if (attribs.bytePitch == (uint64)-1)
+ {
+ attribs.bytePitch = resPitch * elementSize;
+ }
// alias has same location as the base resource.
attribs.type = res->getAttribs().type;