mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Move built ins to share directory
Change-Id: I740a349a0f15229cd356fffe996932029bf0f98b Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
0e85ccf084
commit
357fdc2e65
@ -161,7 +161,7 @@ target_include_directories(igdrcl_tests PRIVATE
|
||||
|
||||
target_link_libraries(igdrcl_tests gmock-gtest ${IGDRCL_EXTRA_LIBS})
|
||||
|
||||
set(BUILT_IN_KERNEL_DIR "${NEO_SOURCE_DIR}/opencl/source/built_ins")
|
||||
set(BUILT_IN_KERNEL_DIR "${NEO_SOURCE_DIR}/shared/source/built_ins")
|
||||
|
||||
function(neo_copy_test_files target product)
|
||||
set(outputdir "${TargetDir}/${product}")
|
||||
|
@ -5,11 +5,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/compiler_interface/compiler_interface.h"
|
||||
#include "shared/source/device/device.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_in_ops_vme.h"
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/vme_builtin.h"
|
||||
#include "opencl/source/context/context.h"
|
||||
#include "opencl/source/device/cl_device.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
#include "opencl/test/unit_test/aub_tests/fixtures/aub_parent_kernel_fixture.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
#include "opencl/test/unit_test/aub_tests/fixtures/aub_parent_kernel_fixture.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
#include "opencl/test/unit_test/aub_tests/fixtures/aub_parent_kernel_fixture.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
#include "opencl/test/unit_test/aub_tests/fixtures/aub_parent_kernel_fixture.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
@ -15,7 +16,6 @@
|
||||
#include "shared/test/unit_test/utilities/base_object_utils.h"
|
||||
|
||||
#include "opencl/source/built_ins/aux_translation_builtin.h"
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/built_ins/vme_builtin.h"
|
||||
#include "opencl/source/built_ins/vme_dispatch_builder.h"
|
||||
|
@ -5,8 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/sip.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/sip.h"
|
||||
|
||||
#include "opencl/test/unit_test/global_environment.h"
|
||||
#include "opencl/test/unit_test/helpers/test_files.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_device.h"
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/memory_manager/memory_constants.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
#include "opencl/test/unit_test/command_queue/enqueue_copy_buffer_rect_fixture.h"
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
@ -12,7 +13,6 @@
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/command_queue/command_queue.h"
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/memory_manager/memory_constants.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/event/event.h"
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
|
@ -5,12 +5,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/helpers/cache_policy.h"
|
||||
#include "shared/source/memory_manager/allocations_list.h"
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
#include "opencl/test/unit_test/command_queue/enqueue_fixture.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/event/event.h"
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
|
@ -5,10 +5,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/memory_manager/allocations_list.h"
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
#include "opencl/test/unit_test/command_queue/buffer_operations_fixture.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/command_queue/enqueue_copy_image.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/command_queue/enqueue_barrier.h"
|
||||
#include "opencl/source/command_queue/enqueue_marker.h"
|
||||
|
@ -5,11 +5,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/memory_constants.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/sharings/gl/gl_buffer.h"
|
||||
#include "opencl/test/unit_test/command_queue/enqueue_fixture.h"
|
||||
#include "opencl/test/unit_test/fixtures/hello_world_fixture.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
@ -20,7 +21,6 @@
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/unit_test/helpers/ult_hw_helper.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/command_queue/gpgpu_walker.h"
|
||||
#include "opencl/source/event/user_event.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
@ -23,7 +24,6 @@
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/unit_test/utilities/base_object_utils.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/command_queue/gpgpu_walker.h"
|
||||
#include "opencl/source/event/user_event.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/compiler_interface/compiler_interface.h"
|
||||
#include "shared/source/device/device.h"
|
||||
@ -16,7 +17,6 @@
|
||||
#include "shared/test/unit_test/utilities/destructor_counted.h"
|
||||
|
||||
#include "opencl/source/aub/aub_center.h"
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/memory_manager/os_agnostic_memory_manager.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
#include "opencl/source/source_level_debugger/source_level_debugger.h"
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/command_queue/enqueue_kernel.h"
|
||||
#include "opencl/source/device_queue/device_queue.h"
|
||||
#include "opencl/source/scheduler/scheduler_kernel.h"
|
||||
|
@ -7,9 +7,9 @@
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/built_in_fixture.h"
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/device/device.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/test/unit_test/global_environment.h"
|
||||
#include "opencl/test/unit_test/helpers/kernel_binary_helper.h"
|
||||
#include "opencl/test/unit_test/helpers/test_files.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/command_queue/enqueue_kernel.h"
|
||||
#include "opencl/source/command_queue/gpgpu_walker.h"
|
||||
#include "opencl/source/device_queue/device_queue.h"
|
||||
|
@ -5,10 +5,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/event/user_event.h"
|
||||
#include "opencl/test/unit_test/fixtures/device_fixture.h"
|
||||
|
@ -5,8 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/built_ins/sip.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/sip.h"
|
||||
|
||||
#include "opencl/test/unit_test/global_environment.h"
|
||||
#include "opencl/test/unit_test/helpers/test_files.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_device.h"
|
||||
|
@ -5,7 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
||||
#include "opencl/source/kernel/kernel.h"
|
||||
#include "opencl/test/unit_test/fixtures/built_in_fixture.h"
|
||||
|
@ -7,4 +7,4 @@
|
||||
|
||||
#include "opencl/test/unit_test/helpers/kernel_binary_helper.h"
|
||||
|
||||
const std::string KernelBinaryHelper::BUILT_INS("7030307152995455603");
|
||||
const std::string KernelBinaryHelper::BUILT_INS("7206969092167061981");
|
@ -5,13 +5,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/compiler_interface/compiler_interface.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/image/image_surface_state.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/test/unit_test/helpers/debug_manager_state_restore.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/helpers/mipmap.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/mem_obj/mem_obj_helper.h"
|
||||
|
@ -6,7 +6,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/source/helpers/dispatch_info.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
@ -7,9 +7,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/sip.h"
|
||||
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/built_ins/sip.h"
|
||||
#include "opencl/source/program/program.h"
|
||||
|
||||
#include <memory>
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
#include "shared/source/compiler_interface/compiler_interface.h"
|
||||
#include "shared/source/memory_manager/deferred_deleter.h"
|
||||
#include "shared/source/memory_manager/unified_memory_manager.h"
|
||||
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "opencl/source/command_queue/command_queue.h"
|
||||
#include "opencl/source/memory_manager/os_agnostic_memory_manager.h"
|
||||
#include "opencl/source/sharings/sharing.h"
|
||||
|
@ -7,7 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "opencl/source/built_ins/sip.h"
|
||||
#include "shared/source/built_ins/sip.h"
|
||||
|
||||
#include "opencl/test/unit_test/mocks/mock_execution_environment.h"
|
||||
|
||||
#include <memory>
|
||||
|
@ -349,7 +349,7 @@ TEST_F(OfflineCompilerTests, GoodParseBinToCharArray) {
|
||||
familyNameWithType + "[10] = {\n"
|
||||
" 0x40032302, 0x90800756, 0x05340301, 0x66097860, 0x101010ff, 0x40032302, 0x90800756, 0x05340301, \n"
|
||||
" 0x66097860, 0xff000000};\n\n"
|
||||
"#include \"opencl/source/built_ins/registry/built_ins_registry.h\"\n\n"
|
||||
"#include \"shared/source/built_ins/registry/built_ins_registry.h\"\n\n"
|
||||
"namespace NEO {\n"
|
||||
"static RegisterEmbeddedResource registerSchedulerBin(\n"
|
||||
" \"" +
|
||||
|
@ -6,7 +6,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "opencl/source/built_ins/built_ins.h"
|
||||
#include "shared/source/built_ins/built_ins.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/context_fixture.h"
|
||||
#include "opencl/test/unit_test/fixtures/device_fixture.h"
|
||||
#include "opencl/test/unit_test/fixtures/program_fixture.h"
|
||||
|
@ -5,40 +5,37 @@
|
||||
*
|
||||
*/
|
||||
|
||||
__kernel void fullCopy(__global const uint* src, __global uint* dst) {
|
||||
__kernel void fullCopy(__global const uint *src, __global uint *dst) {
|
||||
unsigned int gid = get_global_id(0);
|
||||
uint4 loaded = vload4(gid, src);
|
||||
vstore4(loaded, gid, dst);
|
||||
}
|
||||
|
||||
__kernel void CopyBufferToBufferBytes(
|
||||
const __global uchar* pSrc,
|
||||
__global uchar* pDst,
|
||||
const __global uchar *pSrc,
|
||||
__global uchar *pDst,
|
||||
uint srcOffsetInBytes,
|
||||
uint dstOffsetInBytes,
|
||||
uint bytesToRead )
|
||||
{
|
||||
pSrc += ( srcOffsetInBytes + get_global_id(0) );
|
||||
pDst += ( dstOffsetInBytes + get_global_id(0) );
|
||||
pDst[ 0 ] = pSrc[ 0 ];
|
||||
uint bytesToRead) {
|
||||
pSrc += (srcOffsetInBytes + get_global_id(0));
|
||||
pDst += (dstOffsetInBytes + get_global_id(0));
|
||||
pDst[0] = pSrc[0];
|
||||
}
|
||||
|
||||
__kernel void CopyBufferToBufferLeftLeftover(
|
||||
const __global uchar* pSrc,
|
||||
__global uchar* pDst,
|
||||
const __global uchar *pSrc,
|
||||
__global uchar *pDst,
|
||||
uint srcOffsetInBytes,
|
||||
uint dstOffsetInBytes)
|
||||
{
|
||||
uint dstOffsetInBytes) {
|
||||
unsigned int gid = get_global_id(0);
|
||||
pDst[ gid + dstOffsetInBytes ] = pSrc[ gid + srcOffsetInBytes ];
|
||||
pDst[gid + dstOffsetInBytes] = pSrc[gid + srcOffsetInBytes];
|
||||
}
|
||||
|
||||
__kernel void CopyBufferToBufferMiddle(
|
||||
const __global uint* pSrc,
|
||||
__global uint* pDst,
|
||||
const __global uint *pSrc,
|
||||
__global uint *pDst,
|
||||
uint srcOffsetInBytes,
|
||||
uint dstOffsetInBytes)
|
||||
{
|
||||
uint dstOffsetInBytes) {
|
||||
unsigned int gid = get_global_id(0);
|
||||
pDst += dstOffsetInBytes >> 2;
|
||||
pSrc += srcOffsetInBytes >> 2;
|
||||
@ -47,55 +44,49 @@ __kernel void CopyBufferToBufferMiddle(
|
||||
}
|
||||
|
||||
__kernel void CopyBufferToBufferRightLeftover(
|
||||
const __global uchar* pSrc,
|
||||
__global uchar* pDst,
|
||||
const __global uchar *pSrc,
|
||||
__global uchar *pDst,
|
||||
uint srcOffsetInBytes,
|
||||
uint dstOffsetInBytes)
|
||||
{
|
||||
uint dstOffsetInBytes) {
|
||||
unsigned int gid = get_global_id(0);
|
||||
pDst[ gid + dstOffsetInBytes ] = pSrc[ gid + srcOffsetInBytes ];
|
||||
pDst[gid + dstOffsetInBytes] = pSrc[gid + srcOffsetInBytes];
|
||||
}
|
||||
|
||||
|
||||
// assumption is local work size = pattern size
|
||||
__kernel void FillBufferBytes(
|
||||
__global uchar* pDst,
|
||||
__global uchar *pDst,
|
||||
uint dstOffsetInBytes,
|
||||
const __global uchar* pPattern )
|
||||
{
|
||||
const __global uchar *pPattern) {
|
||||
uint dstIndex = get_global_id(0) + dstOffsetInBytes;
|
||||
uint srcIndex = get_local_id(0);
|
||||
pDst[dstIndex] = pPattern[srcIndex];
|
||||
}
|
||||
|
||||
__kernel void FillBufferLeftLeftover(
|
||||
__global uchar* pDst,
|
||||
__global uchar *pDst,
|
||||
uint dstOffsetInBytes,
|
||||
const __global uchar* pPattern,
|
||||
const uint patternSizeInEls )
|
||||
{
|
||||
const __global uchar *pPattern,
|
||||
const uint patternSizeInEls) {
|
||||
uint gid = get_global_id(0);
|
||||
pDst[ gid + dstOffsetInBytes ] = pPattern[ gid & (patternSizeInEls - 1) ];
|
||||
pDst[gid + dstOffsetInBytes] = pPattern[gid & (patternSizeInEls - 1)];
|
||||
}
|
||||
|
||||
__kernel void FillBufferMiddle(
|
||||
__global uchar* pDst,
|
||||
__global uchar *pDst,
|
||||
uint dstOffsetInBytes,
|
||||
const __global uint* pPattern,
|
||||
const uint patternSizeInEls )
|
||||
{
|
||||
const __global uint *pPattern,
|
||||
const uint patternSizeInEls) {
|
||||
uint gid = get_global_id(0);
|
||||
((__global uint*)(pDst + dstOffsetInBytes))[gid] = pPattern[ gid & (patternSizeInEls - 1) ];
|
||||
((__global uint *)(pDst + dstOffsetInBytes))[gid] = pPattern[gid & (patternSizeInEls - 1)];
|
||||
}
|
||||
|
||||
__kernel void FillBufferRightLeftover(
|
||||
__global uchar* pDst,
|
||||
__global uchar *pDst,
|
||||
uint dstOffsetInBytes,
|
||||
const __global uchar* pPattern,
|
||||
const uint patternSizeInEls )
|
||||
{
|
||||
const __global uchar *pPattern,
|
||||
const uint patternSizeInEls) {
|
||||
uint gid = get_global_id(0);
|
||||
pDst[ gid + dstOffsetInBytes ] = pPattern[ gid & (patternSizeInEls - 1) ];
|
||||
pDst[gid + dstOffsetInBytes] = pPattern[gid & (patternSizeInEls - 1)];
|
||||
}
|
||||
|
||||
__kernel void FillImage1d(
|
||||
@ -179,42 +170,40 @@ __kernel void CopyImageToImage3d(
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
__kernel void CopyBufferRectBytes2d(
|
||||
__global const char* src,
|
||||
__global char* dst,
|
||||
__global const char *src,
|
||||
__global char *dst,
|
||||
uint4 SrcOrigin,
|
||||
uint4 DstOrigin,
|
||||
uint2 SrcPitch,
|
||||
uint2 DstPitch )
|
||||
uint2 DstPitch)
|
||||
|
||||
{
|
||||
int x = get_global_id(0);
|
||||
int y = get_global_id(1);
|
||||
|
||||
uint LSrcOffset = x + SrcOrigin.x + ( ( y + SrcOrigin.y ) * SrcPitch.x );
|
||||
uint LDstOffset = x + DstOrigin.x + ( ( y + DstOrigin.y ) * DstPitch.x );
|
||||
|
||||
*( dst + LDstOffset ) = *( src + LSrcOffset );
|
||||
uint LSrcOffset = x + SrcOrigin.x + ((y + SrcOrigin.y) * SrcPitch.x);
|
||||
uint LDstOffset = x + DstOrigin.x + ((y + DstOrigin.y) * DstPitch.x);
|
||||
|
||||
*(dst + LDstOffset) = *(src + LSrcOffset);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
__kernel void CopyBufferRectBytes3d(
|
||||
__global const char* src,
|
||||
__global char* dst,
|
||||
uint4 SrcOrigin,
|
||||
uint4 DstOrigin,
|
||||
uint2 SrcPitch,
|
||||
uint2 DstPitch )
|
||||
|
||||
{
|
||||
int x = get_global_id(0);
|
||||
int y = get_global_id(1);
|
||||
int z = get_global_id(2);
|
||||
|
||||
uint LSrcOffset = x + SrcOrigin.x + ( ( y + SrcOrigin.y ) * SrcPitch.x ) + ( ( z + SrcOrigin.z ) * SrcPitch.y );
|
||||
uint LDstOffset = x + DstOrigin.x + ( ( y + DstOrigin.y ) * DstPitch.x ) + ( ( z + DstOrigin.z ) * DstPitch.y );
|
||||
|
||||
*( dst + LDstOffset ) = *( src + LSrcOffset );
|
||||
|
||||
__global const char *src,
|
||||
__global char *dst,
|
||||
uint4 SrcOrigin,
|
||||
uint4 DstOrigin,
|
||||
uint2 SrcPitch,
|
||||
uint2 DstPitch)
|
||||
|
||||
{
|
||||
int x = get_global_id(0);
|
||||
int y = get_global_id(1);
|
||||
int z = get_global_id(2);
|
||||
|
||||
uint LSrcOffset = x + SrcOrigin.x + ((y + SrcOrigin.y) * SrcPitch.x) + ((z + SrcOrigin.z) * SrcPitch.y);
|
||||
uint LDstOffset = x + DstOrigin.x + ((y + DstOrigin.y) * DstPitch.x) + ((z + DstOrigin.z) * DstPitch.y);
|
||||
|
||||
*(dst + LDstOffset) = *(src + LSrcOffset);
|
||||
}
|
||||
|
||||
#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
|
||||
@ -248,14 +237,13 @@ __kernel void CopyBufferToImage3d2Bytes(__global uchar *src,
|
||||
|
||||
uint4 c = (uint4)(0, 0, 0, 1);
|
||||
|
||||
if(( ulong )(src + srcOffset) & 0x00000001){
|
||||
ushort upper = *((__global uchar*)(src + LOffset + x * 2 + 1));
|
||||
ushort lower = *((__global uchar*)(src + LOffset + x * 2));
|
||||
if ((ulong)(src + srcOffset) & 0x00000001) {
|
||||
ushort upper = *((__global uchar *)(src + LOffset + x * 2 + 1));
|
||||
ushort lower = *((__global uchar *)(src + LOffset + x * 2));
|
||||
ushort combined = (upper << 8) | lower;
|
||||
c.x = (uint)combined;
|
||||
}
|
||||
else{
|
||||
c.x = (uint)(*(__global ushort*)(src + LOffset + x * 2));
|
||||
} else {
|
||||
c.x = (uint)(*(__global ushort *)(src + LOffset + x * 2));
|
||||
}
|
||||
write_imageui(output, dstCoord, c);
|
||||
}
|
||||
@ -274,16 +262,15 @@ __kernel void CopyBufferToImage3d4Bytes(__global uchar *src,
|
||||
|
||||
uint4 c = (uint4)(0, 0, 0, 1);
|
||||
|
||||
if(( ulong )(src + srcOffset) & 0x00000003){
|
||||
uint upper2 = *((__global uchar*)(src + LOffset + x * 4 + 3));
|
||||
uint upper = *((__global uchar*)(src + LOffset + x * 4 + 2));
|
||||
uint lower2 = *((__global uchar*)(src + LOffset + x * 4 + 1));
|
||||
uint lower = *((__global uchar*)(src + LOffset + x * 4));
|
||||
if ((ulong)(src + srcOffset) & 0x00000003) {
|
||||
uint upper2 = *((__global uchar *)(src + LOffset + x * 4 + 3));
|
||||
uint upper = *((__global uchar *)(src + LOffset + x * 4 + 2));
|
||||
uint lower2 = *((__global uchar *)(src + LOffset + x * 4 + 1));
|
||||
uint lower = *((__global uchar *)(src + LOffset + x * 4));
|
||||
uint combined = (upper2 << 24) | (upper << 16) | (lower2 << 8) | lower;
|
||||
c.x = combined;
|
||||
}
|
||||
else{
|
||||
c.x = (*(__global uint*)(src + LOffset + x * 4));
|
||||
} else {
|
||||
c.x = (*(__global uint *)(src + LOffset + x * 4));
|
||||
}
|
||||
write_imageui(output, dstCoord, c);
|
||||
}
|
||||
@ -300,24 +287,23 @@ __kernel void CopyBufferToImage3d8Bytes(__global uchar *src,
|
||||
int4 dstCoord = (int4)(x, y, z, 0) + dstOffset;
|
||||
uint LOffset = srcOffset + (y * Pitch.x) + (z * Pitch.y);
|
||||
|
||||
uint2 c = (uint2)(0, 0);//*((__global uint2*)(src + LOffset + x * 8));
|
||||
uint2 c = (uint2)(0, 0); //*((__global uint2*)(src + LOffset + x * 8));
|
||||
|
||||
if(( ulong )(src + srcOffset) & 0x00000007){
|
||||
uint upper2 = *((__global uchar*)(src + LOffset + x * 8 + 3));
|
||||
uint upper = *((__global uchar*)(src + LOffset + x * 8 + 2));
|
||||
uint lower2 = *((__global uchar*)(src + LOffset + x * 8 + 1));
|
||||
uint lower = *((__global uchar*)(src + LOffset + x * 8));
|
||||
if ((ulong)(src + srcOffset) & 0x00000007) {
|
||||
uint upper2 = *((__global uchar *)(src + LOffset + x * 8 + 3));
|
||||
uint upper = *((__global uchar *)(src + LOffset + x * 8 + 2));
|
||||
uint lower2 = *((__global uchar *)(src + LOffset + x * 8 + 1));
|
||||
uint lower = *((__global uchar *)(src + LOffset + x * 8));
|
||||
uint combined = (upper2 << 24) | (upper << 16) | (lower2 << 8) | lower;
|
||||
c.x = combined;
|
||||
upper2 = *((__global uchar*)(src + LOffset + x * 8 + 7));
|
||||
upper = *((__global uchar*)(src + LOffset + x * 8 + 6));
|
||||
lower2 = *((__global uchar*)(src + LOffset + x * 8 + 5));
|
||||
lower = *((__global uchar*)(src + LOffset + x * 8 + 4));
|
||||
upper2 = *((__global uchar *)(src + LOffset + x * 8 + 7));
|
||||
upper = *((__global uchar *)(src + LOffset + x * 8 + 6));
|
||||
lower2 = *((__global uchar *)(src + LOffset + x * 8 + 5));
|
||||
lower = *((__global uchar *)(src + LOffset + x * 8 + 4));
|
||||
combined = ((uint)upper2 << 24) | ((uint)upper << 16) | ((uint)lower2 << 8) | lower;
|
||||
c.y = combined;
|
||||
}
|
||||
else{
|
||||
c = *((__global uint2*)(src + LOffset + x * 8));
|
||||
} else {
|
||||
c = *((__global uint2 *)(src + LOffset + x * 8));
|
||||
}
|
||||
|
||||
write_imageui(output, dstCoord, (uint4)(c.x, c.y, 0, 1));
|
||||
@ -337,33 +323,32 @@ __kernel void CopyBufferToImage3d16Bytes(__global uchar *src,
|
||||
|
||||
uint4 c = (uint4)(0, 0, 0, 0);
|
||||
|
||||
if(( ulong )(src + srcOffset) & 0x0000000f){
|
||||
uint upper2 = *((__global uchar*)(src + LOffset + x * 16 + 3));
|
||||
uint upper = *((__global uchar*)(src + LOffset + x * 16 + 2));
|
||||
uint lower2 = *((__global uchar*)(src + LOffset + x * 16 + 1));
|
||||
uint lower = *((__global uchar*)(src + LOffset + x * 16));
|
||||
if ((ulong)(src + srcOffset) & 0x0000000f) {
|
||||
uint upper2 = *((__global uchar *)(src + LOffset + x * 16 + 3));
|
||||
uint upper = *((__global uchar *)(src + LOffset + x * 16 + 2));
|
||||
uint lower2 = *((__global uchar *)(src + LOffset + x * 16 + 1));
|
||||
uint lower = *((__global uchar *)(src + LOffset + x * 16));
|
||||
uint combined = (upper2 << 24) | (upper << 16) | (lower2 << 8) | lower;
|
||||
c.x = combined;
|
||||
upper2 = *((__global uchar*)(src + LOffset + x * 16 + 7));
|
||||
upper = *((__global uchar*)(src + LOffset + x * 16 + 6));
|
||||
lower2 = *((__global uchar*)(src + LOffset + x * 16 + 5));
|
||||
lower = *((__global uchar*)(src + LOffset + x * 16 + 4));
|
||||
upper2 = *((__global uchar *)(src + LOffset + x * 16 + 7));
|
||||
upper = *((__global uchar *)(src + LOffset + x * 16 + 6));
|
||||
lower2 = *((__global uchar *)(src + LOffset + x * 16 + 5));
|
||||
lower = *((__global uchar *)(src + LOffset + x * 16 + 4));
|
||||
combined = (upper2 << 24) | (upper << 16) | (lower2 << 8) | lower;
|
||||
c.y = combined;
|
||||
upper2 = *((__global uchar*)(src + LOffset + x * 16 + 11));
|
||||
upper = *((__global uchar*)(src + LOffset + x * 16 + 10));
|
||||
lower2 = *((__global uchar*)(src + LOffset + x * 16 + 9));
|
||||
lower = *((__global uchar*)(src + LOffset + x * 16 + 8));
|
||||
upper2 = *((__global uchar *)(src + LOffset + x * 16 + 11));
|
||||
upper = *((__global uchar *)(src + LOffset + x * 16 + 10));
|
||||
lower2 = *((__global uchar *)(src + LOffset + x * 16 + 9));
|
||||
lower = *((__global uchar *)(src + LOffset + x * 16 + 8));
|
||||
combined = (upper2 << 24) | (upper << 16) | (lower2 << 8) | lower;
|
||||
c.z = combined;
|
||||
upper2 = *((__global uchar*)(src + LOffset + x * 16 + 15));
|
||||
upper = *((__global uchar*)(src + LOffset + x * 16 + 14));
|
||||
lower2 = *((__global uchar*)(src + LOffset + x * 16 + 13));
|
||||
lower = *((__global uchar*)(src + LOffset + x * 16 + 12));
|
||||
upper2 = *((__global uchar *)(src + LOffset + x * 16 + 15));
|
||||
upper = *((__global uchar *)(src + LOffset + x * 16 + 14));
|
||||
lower2 = *((__global uchar *)(src + LOffset + x * 16 + 13));
|
||||
lower = *((__global uchar *)(src + LOffset + x * 16 + 12));
|
||||
combined = (upper2 << 24) | (upper << 16) | (lower2 << 8) | lower;
|
||||
c.w = combined;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
c = *((__global uint4 *)(src + LOffset + x * 16));
|
||||
}
|
||||
|
||||
@ -397,15 +382,14 @@ __kernel void CopyImage3dToBuffer2Bytes(__read_only image3d_t input,
|
||||
|
||||
const int4 srcCoord = (int4)(x, y, z, 0) + srcOffset;
|
||||
uint DstOffset = dstOffset + (y * Pitch.x) + (z * Pitch.y);
|
||||
|
||||
|
||||
uint4 c = read_imageui(input, srcCoord);
|
||||
|
||||
if(( ulong )(dst + dstOffset) & 0x00000001){
|
||||
*((__global uchar*)(dst + DstOffset + x * 2 + 1)) = convert_uchar_sat((c.x >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 2)) = convert_uchar_sat(c.x & 0xff);
|
||||
}
|
||||
else{
|
||||
*((__global ushort*)(dst + DstOffset + x * 2)) = convert_ushort_sat(c.x);
|
||||
if ((ulong)(dst + dstOffset) & 0x00000001) {
|
||||
*((__global uchar *)(dst + DstOffset + x * 2 + 1)) = convert_uchar_sat((c.x >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 2)) = convert_uchar_sat(c.x & 0xff);
|
||||
} else {
|
||||
*((__global ushort *)(dst + DstOffset + x * 2)) = convert_ushort_sat(c.x);
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,14 +407,13 @@ __kernel void CopyImage3dToBuffer4Bytes(__read_only image3d_t input,
|
||||
|
||||
uint4 c = read_imageui(input, srcCoord);
|
||||
|
||||
if(( ulong )(dst + dstOffset) & 0x00000003){
|
||||
*((__global uchar*)(dst + DstOffset + x * 4 + 3)) = convert_uchar_sat((c.x >> 24 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 4 + 2)) = convert_uchar_sat((c.x >> 16 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 4 + 1)) = convert_uchar_sat((c.x >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 4)) = convert_uchar_sat(c.x & 0xff);
|
||||
}
|
||||
else{
|
||||
*((__global uint*)(dst + DstOffset + x * 4)) = c.x;
|
||||
if ((ulong)(dst + dstOffset) & 0x00000003) {
|
||||
*((__global uchar *)(dst + DstOffset + x * 4 + 3)) = convert_uchar_sat((c.x >> 24) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 4 + 2)) = convert_uchar_sat((c.x >> 16) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 4 + 1)) = convert_uchar_sat((c.x >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 4)) = convert_uchar_sat(c.x & 0xff);
|
||||
} else {
|
||||
*((__global uint *)(dst + DstOffset + x * 4)) = c.x;
|
||||
}
|
||||
}
|
||||
|
||||
@ -448,19 +431,18 @@ __kernel void CopyImage3dToBuffer8Bytes(__read_only image3d_t input,
|
||||
|
||||
uint4 c = read_imageui(input, srcCoord);
|
||||
|
||||
if(( ulong )(dst + dstOffset) & 0x00000007){
|
||||
*((__global uchar*)(dst + DstOffset + x * 8 + 3)) = convert_uchar_sat((c.x >> 24 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 8 + 2)) = convert_uchar_sat((c.x >> 16 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 8 + 1)) = convert_uchar_sat((c.x >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 8)) = convert_uchar_sat(c.x & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 8 + 7)) = convert_uchar_sat((c.y >> 24 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 8 + 6)) = convert_uchar_sat((c.y >> 16 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 8 + 5)) = convert_uchar_sat((c.y >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 8 + 4)) = convert_uchar_sat(c.y & 0xff);
|
||||
}
|
||||
else{
|
||||
uint2 d = (uint2)(c.x,c.y);
|
||||
*((__global uint2*)(dst + DstOffset + x * 8)) = d;
|
||||
if ((ulong)(dst + dstOffset) & 0x00000007) {
|
||||
*((__global uchar *)(dst + DstOffset + x * 8 + 3)) = convert_uchar_sat((c.x >> 24) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 8 + 2)) = convert_uchar_sat((c.x >> 16) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 8 + 1)) = convert_uchar_sat((c.x >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 8)) = convert_uchar_sat(c.x & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 8 + 7)) = convert_uchar_sat((c.y >> 24) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 8 + 6)) = convert_uchar_sat((c.y >> 16) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 8 + 5)) = convert_uchar_sat((c.y >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 8 + 4)) = convert_uchar_sat(c.y & 0xff);
|
||||
} else {
|
||||
uint2 d = (uint2)(c.x, c.y);
|
||||
*((__global uint2 *)(dst + DstOffset + x * 8)) = d;
|
||||
}
|
||||
}
|
||||
|
||||
@ -478,25 +460,24 @@ __kernel void CopyImage3dToBuffer16Bytes(__read_only image3d_t input,
|
||||
|
||||
const uint4 c = read_imageui(input, srcCoord);
|
||||
|
||||
if(( ulong )(dst + dstOffset) & 0x0000000f){
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 3)) = convert_uchar_sat((c.x >> 24 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 2)) = convert_uchar_sat((c.x >> 16 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 1)) = convert_uchar_sat((c.x >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16)) = convert_uchar_sat(c.x & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 7)) = convert_uchar_sat((c.y >> 24 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 6)) = convert_uchar_sat((c.y >> 16 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 5)) = convert_uchar_sat((c.y >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 4)) = convert_uchar_sat(c.y & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 11)) = convert_uchar_sat((c.z >> 24 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 10)) = convert_uchar_sat((c.z >> 16 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 9)) = convert_uchar_sat((c.z >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 8)) = convert_uchar_sat(c.z & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 15)) = convert_uchar_sat((c.w >> 24 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 14)) = convert_uchar_sat((c.w >> 16 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 13)) = convert_uchar_sat((c.w >> 8 ) & 0xff);
|
||||
*((__global uchar*)(dst + DstOffset + x * 16 + 12)) = convert_uchar_sat(c.w & 0xff);
|
||||
}
|
||||
else{
|
||||
*(__global uint4*)(dst + DstOffset + x * 16) = c;
|
||||
if ((ulong)(dst + dstOffset) & 0x0000000f) {
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 3)) = convert_uchar_sat((c.x >> 24) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 2)) = convert_uchar_sat((c.x >> 16) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 1)) = convert_uchar_sat((c.x >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16)) = convert_uchar_sat(c.x & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 7)) = convert_uchar_sat((c.y >> 24) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 6)) = convert_uchar_sat((c.y >> 16) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 5)) = convert_uchar_sat((c.y >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 4)) = convert_uchar_sat(c.y & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 11)) = convert_uchar_sat((c.z >> 24) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 10)) = convert_uchar_sat((c.z >> 16) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 9)) = convert_uchar_sat((c.z >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 8)) = convert_uchar_sat(c.z & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 15)) = convert_uchar_sat((c.w >> 24) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 14)) = convert_uchar_sat((c.w >> 16) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 13)) = convert_uchar_sat((c.w >> 8) & 0xff);
|
||||
*((__global uchar *)(dst + DstOffset + x * 16 + 12)) = convert_uchar_sat(c.w & 0xff);
|
||||
} else {
|
||||
*(__global uint4 *)(dst + DstOffset + x * 16) = c;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user