From abd03cfc7ba96462bc5a1ca6f4faa9ca22792158 Mon Sep 17 00:00:00 2001 From: Joel Liang Date: Mon, 8 Jan 2018 15:20:48 +0800 Subject: 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 Reviewed-by: Frank Lei Reviewed-by: Anthony Barbier --- src/core/GLES_COMPUTE/IGCKernel.cpp | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'src/core/GLES_COMPUTE/IGCKernel.cpp') 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 -void IGCKernel::add_tensor_argument(unsigned int &idx, const IGCTensor *tensor, const BufferParam ¶m, 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() != idx, "add_%dD_tensor_argument() is supposed to add exactly %d arguments to the kernel", dimension_size, num_arguments_per_tensor()); @@ -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 ¶m, 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 ¶m, 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 ¶m, 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 -- cgit v1.2.1