From f8b41e984577bb822e5984584aaf7c0b69394d51 Mon Sep 17 00:00:00 2001 From: zhenglin Date: Fri, 1 Dec 2017 18:56:59 +0800 Subject: APPBROWSER-294: Fix the validation failure issue of DepthConcatLayer Change-Id: I3ee0943eb9177badc17e6419984a50c21152c2c0 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111462 Reviewed-by: Joel Liang Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Anthony Barbier --- src/core/GLES_COMPUTE/cs_shaders/fill_border.cs | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) mode change 100644 => 100755 src/core/GLES_COMPUTE/cs_shaders/fill_border.cs (limited to 'src/core/GLES_COMPUTE/cs_shaders/fill_border.cs') diff --git a/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs b/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs old mode 100644 new mode 100755 index 01a39866c7..a3f84ee692 --- a/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs +++ b/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs @@ -70,9 +70,9 @@ void main() { // Handle left border float left_val = LOAD4(buf, offset(buf, 0, gidH)); - for(int i = -BORDER_SIZE_LEFT; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_LEFT; ++i) { - STORE4(buf, offset(buf, i, gidH), left_val); + STORE4(buf, offset(buf, -(i + 1), gidH), left_val); } // Handle right border float right_val = LOAD4(buf, offset(buf, int(width) - 1, gidH)); @@ -92,9 +92,9 @@ void main() // Handle top border float top_val = LOAD4(buf, offset(buf, val_idx, 0)); - for(int i = -BORDER_SIZE_TOP; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_TOP; ++i) { - STORE4(buf, offset(buf, gidW, i), top_val); + STORE4(buf, offset(buf, gidW, -(i + 1)), top_val); } // Handle bottom border float bottom_val = LOAD4(buf, offset(buf, val_idx, int(height) - 1)); @@ -150,9 +150,9 @@ void main() if(gidH >= 0) { // Handle left border - for(int i = -BORDER_SIZE_LEFT; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_LEFT; ++i) { - STORE1(buf, offset(buf, i, gidH), constant_value); + STORE1(buf, offset(buf, -(i + 1), gidH), constant_value); } // Handle right border for(int i = 0; i < BORDER_SIZE_RIGHT; ++i) @@ -163,9 +163,9 @@ void main() else { // Handle top border - for(int i = -BORDER_SIZE_TOP; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_TOP; ++i) { - STORE1(buf, offset(buf, gidW, i), constant_value); + STORE1(buf, offset(buf, gidW, -(i + 1)), constant_value); } // Handle bottom border for(int i = 0; i < BORDER_SIZE_BOTTOM; ++i) @@ -247,11 +247,11 @@ void main() // Handle left border uint left_val; LOAD1(left_val, buf, offset_fp16(buf, 0, gidH) >> uint(2)); - for(int i = -BORDER_SIZE_LEFT; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_LEFT; ++i) { - uint offset = offset_fp16(buf, i, gidH) >> 2; - int pos = i + BORDER_SIZE_LEFT; - if(i == -1) + uint offset = offset_fp16(buf, -(i + 1), gidH) >> 2; + int pos = BORDER_SIZE_LEFT - i - 1; + if(i == 0) { if(pos % 2 == 0) { @@ -312,9 +312,9 @@ void main() // Handle top border uint top_val; LOAD1(top_val, buf, offset_fp16(buf, val_idx, 0) >> uint(2)); - for(int i = -BORDER_SIZE_TOP; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_TOP; ++i) { - uint offset = offset_fp16(buf, gidW, i) >> 2; + uint offset = offset_fp16(buf, gidW, -(i + 1)) >> 2; if(gid0 % 2 == 0) { @@ -479,12 +479,12 @@ void main() if(gidH >= 0) { // Handle left border - for(int i = -BORDER_SIZE_LEFT; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_LEFT; ++i) { - uint offset = offset_fp16(buf, i, gidH) >> 2; - int pos = i + BORDER_SIZE_LEFT; + uint offset = offset_fp16(buf, -(i + 1), gidH) >> 2; + int pos = BORDER_SIZE_LEFT - i - 1; - if(i == -1) + if(i == 0) { if(pos % 2 == 0) { @@ -528,9 +528,9 @@ void main() else { // Handle top border - for(int i = -BORDER_SIZE_TOP; i < 0; ++i) + for(int i = 0; i < BORDER_SIZE_TOP; ++i) { - uint offset = offset_fp16(buf, gidW, i) >> 2; + uint offset = offset_fp16(buf, gidW, -(i + 1)) >> 2; if(gid0 % 2 == 0) { -- cgit v1.2.1