diff options
author | zhenglin <zhenglin.li@arm.com> | 2017-12-01 18:56:59 +0800 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:42:00 +0000 |
commit | f8b41e984577bb822e5984584aaf7c0b69394d51 (patch) | |
tree | 9b7b15be06f6f49740d7d399ae334e14cde1cb92 /src/core/GLES_COMPUTE | |
parent | 5497bf623c13be2ae80e6133bd50720aaa404c7a (diff) | |
download | ComputeLibrary-f8b41e984577bb822e5984584aaf7c0b69394d51.tar.gz |
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 <joel.liang@arm.com>
Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/GLES_COMPUTE')
-rwxr-xr-x[-rw-r--r--] | src/core/GLES_COMPUTE/cs_shaders/fill_border.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs b/src/core/GLES_COMPUTE/cs_shaders/fill_border.cs index 01a39866c7..a3f84ee692 100644..100755 --- 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) { |