aboutsummaryrefslogtreecommitdiff
path: root/src/core/GLES_COMPUTE/IGCKernel.cpp
diff options
context:
space:
mode:
authorJoel Liang <joel.liang@arm.com>2018-01-08 15:20:48 +0800
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:33 +0000
commitabd03cfc7ba96462bc5a1ca6f4faa9ca22792158 (patch)
treefef70cbe7b3e2ee18f69e880a0586189bd00a37b /src/core/GLES_COMPUTE/IGCKernel.cpp
parent088cc7ff4623b268275f38c1ffb6d373584335ed (diff)
downloadComputeLibrary-abd03cfc7ba96462bc5a1ca6f4faa9ca22792158.tar.gz
APPBROWSER-298: Remove the old shader common code
Remove token pasting operator support for GLES shader Remove cs_shdaers/helpers.h (The old GLES shader common code) Remove class BufferParam. We don't need to pass the buffer_data_type_shift to GLES shader. Change-Id: Ic4fa6b2fb7647b8f69759f6077ae4a5b483cc04d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115448 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Frank Lei <frank.lei@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/GLES_COMPUTE/IGCKernel.cpp')
-rw-r--r--src/core/GLES_COMPUTE/IGCKernel.cpp28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/core/GLES_COMPUTE/IGCKernel.cpp b/src/core/GLES_COMPUTE/IGCKernel.cpp
index df9c798e42..6666c0f3ae 100644
--- a/src/core/GLES_COMPUTE/IGCKernel.cpp
+++ b/src/core/GLES_COMPUTE/IGCKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017, 2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -79,7 +79,7 @@ unsigned int IGCKernel::num_arguments_per_tensor() const
}
template <unsigned int dimension_size>
-void IGCKernel::add_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const BufferParam &param, const Window &window)
+void IGCKernel::add_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
{
ARM_COMPUTE_ERROR_ON(tensor == nullptr);
@@ -103,7 +103,6 @@ void IGCKernel::add_tensor_argument(unsigned int &idx, const IGCTensor *tensor,
}
_kernel.set_argument(idx++, offset_first_element);
- _kernel.set_argument(idx++, param.buffer_data_type_shift);
// Rounding up the tensor attributes structure in compute shader to a multiple of a vec4
unsigned int idx_end = ceil_to_multiple(idx, 4);
@@ -113,7 +112,7 @@ void IGCKernel::add_tensor_argument(unsigned int &idx, const IGCTensor *tensor,
}
idx = idx_end;
- ARM_COMPUTE_GL_CHECK(glBindBufferBase(GL_SHADER_STORAGE_BUFFER, param.binding_point, tensor->gc_buffer()));
+ ARM_COMPUTE_GL_CHECK(glBindBufferBase(GL_SHADER_STORAGE_BUFFER, binding_point, tensor->gc_buffer()));
ARM_COMPUTE_ERROR_ON_MSG(idx_start + num_arguments_per_tensor<dimension_size>() != idx,
"add_%dD_tensor_argument() is supposed to add exactly %d arguments to the kernel", dimension_size, num_arguments_per_tensor<dimension_size>());
@@ -122,32 +121,17 @@ void IGCKernel::add_tensor_argument(unsigned int &idx, const IGCTensor *tensor,
void IGCKernel::add_1D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
{
- add_tensor_argument<1>(idx, tensor, BufferParam(binding_point, 0), window);
-}
-
-void IGCKernel::add_1D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const BufferParam &param, const Window &window)
-{
- add_tensor_argument<1>(idx, tensor, param, window);
+ add_tensor_argument<1>(idx, tensor, binding_point, window);
}
void IGCKernel::add_2D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
{
- add_tensor_argument<2>(idx, tensor, BufferParam(binding_point, 0), window);
-}
-
-void IGCKernel::add_2D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const BufferParam &param, const Window &window)
-{
- add_tensor_argument<2>(idx, tensor, param, window);
+ add_tensor_argument<2>(idx, tensor, binding_point, window);
}
void IGCKernel::add_3D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window)
{
- add_tensor_argument<3>(idx, tensor, BufferParam(binding_point, 0), window);
-}
-
-void IGCKernel::add_3D_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const BufferParam &param, const Window &window)
-{
- add_tensor_argument<3>(idx, tensor, param, window);
+ add_tensor_argument<3>(idx, tensor, binding_point, window);
}
unsigned int IGCKernel::num_arguments_per_1D_tensor() const