contrib/beignet.git
11 years agoutest: Added one image2d test case copy_image.
Zhigang Gong [Wed, 16 Jan 2013 09:29:52 +0000 (17:29 +0800)]
utest: Added one image2d test case copy_image.

This case create two images, and initialize one then copy
the initilaized on to the other one via OCL kernel.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoutest: Added some new helper macros for image2d test cases.
Zhigang Gong [Wed, 16 Jan 2013 09:28:40 +0000 (17:28 +0800)]
utest: Added some new helper macros for image2d test cases.

This is the first commit to prepare to add some image 2d
test cases.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoDon't always set build type to DEBUGO0.
Zhigang Gong [Wed, 16 Jan 2013 07:42:27 +0000 (15:42 +0800)]
Don't always set build type to DEBUGO0.

This line was committed by accident. Now remove it.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoFix the assertion condition check.
Zhigang Gong [Wed, 16 Jan 2013 07:54:05 +0000 (15:54 +0800)]
Fix the assertion condition check.

We have a new sampler arg type, so we have to add it to this
assertion condition check. Otherwise, it triggers an assertion
when met a sampler parameter.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guqanqun <guanqun.lu@intel.com>
11 years agouse TupleDstPolicy for SampleInstruction and TypeWriteInstruction
Lu Guanqun [Tue, 15 Jan 2013 06:22:52 +0000 (14:22 +0800)]
use TupleDstPolicy for SampleInstruction and TypeWriteInstruction

This change also fixes compiler errors where srcNum can't be found in
TupleSrcPolicy.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoadd TupleDstPolicy for instructions
Lu Guanqun [Tue, 15 Jan 2013 06:22:52 +0000 (14:22 +0800)]
add TupleDstPolicy for instructions

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoimplement OCL 1.2 new APIs.
Zhigang Gong [Thu, 21 Feb 2013 08:44:40 +0000 (16:44 +0800)]
implement OCL 1.2 new APIs.

clCreateImage2D and clCreateFromGLTexture2D have been
deprecated from OCL1.2, we need to implement the new
API clCreateImage/clCreateFromGLTexture to replace them.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Homer Hsing <homer.xing@intel.com>
11 years agoImplement TYPED_WRITE instruction.
Zhigang Gong [Wed, 9 Jan 2013 08:05:25 +0000 (16:05 +0800)]
Implement TYPED_WRITE instruction.

This commit implement TypedWrite instruction, covers the IR layer,
LLVM to GEN and the backend including the code gen.

The write_imagei should work now. As TYPED WRITE message only support
SIMD8, we need to call it twice when the execution size is 16 and we
need more data movements.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoAdded missed macros/structs for typed write message.
Zhigang Gong [Wed, 9 Jan 2013 08:04:08 +0000 (16:04 +0800)]
Added missed macros/structs for typed write message.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoImplement SAMPLE instruction.
Zhigang Gong [Wed, 19 Dec 2012 04:51:50 +0000 (12:51 +0800)]
Implement SAMPLE instruction.

This commit includes the following changes:

0. Handle the image2d properly as kernel input arument.

Mark image2d as an address space 4 pointer, then we can easily
get its type in runtime library.
Mark sampler as an address space 5 pointer.

1. Add one instruction in IR for SAMPLE as below:
Instruction SAMPLE(Tuple dst, Tuple src);
dst contains 4 registers for the return vector value.
src contains 4 registers, for surface_id, sampler_id, u_coord and v_coord.

2. Handle read_imagexx intrinsics.
Allocate the above 2 tuples and initialize it.

3. In instruction selection phase:
Implement SampleInstruction. Extract needed registers and allocate a vector
for the destination vector. Allocate one register as message payload.

4. In instruction emit phase:
Imlement emitSampleInstruction to handle the send instruction generation.
We use a0.0 to contain the desc rather than use the imm. And currently, we
use SIMD16 by default. We may need to check current execute size in the
future.

After this commit, we can generate proper code for read_imagei().

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoImplement sampler support.
Zhigang Gong [Sun, 6 Jan 2013 05:16:49 +0000 (13:16 +0800)]
Implement sampler support.

Accept sampler kernel argument and pass the sampler to driver side.
At driver side, gen7 driver will allocate a sampler slot and initlaize
one sampler state according to the cl sampler state. and then pass
back the slot index to the curbe array.

After this commit, read_imagei(image, sampler, coord) could work as
expected.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoFinish the incomplete 2d image support in runtime library.
Zhigang Gong [Thu, 3 Jan 2013 15:50:27 +0000 (23:50 +0800)]
Finish the incomplete 2d image support in runtime library.

We allocate a free binding table index to a 2d surface, and then
pass that bti to kernel through the curbe.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoInsert ocl_common_defines to the cl source file.
Zhigang Gong [Sat, 29 Dec 2012 12:42:07 +0000 (20:42 +0800)]
Insert ocl_common_defines to the cl source file.

Remove the duplicate definitions in the ocl_stdlib.h. As we
may need to refer these two macros, we put it to the ocl_common_defins.h
which could be included by host application.
The two macros are as below:

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoAdd one function generate ARF register.
Zhigang Gong [Sat, 29 Dec 2012 12:39:04 +0000 (20:39 +0800)]
Add one function generate ARF register.

ud1arf to generate ud1 ARF which is for the sampler desc usage.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agoAdded a new common header file for both kernel and host.
Zhigang Gong [Sat, 29 Dec 2012 12:33:31 +0000 (20:33 +0800)]
Added a new common header file for both kernel and host.

This new common header file is for the image support and will
be shared between kernel and host.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Lu Guanqun <guanqun.lu@intel.com>
11 years agobackend: Remove argID in function arguments iteration
Feng, Boqun [Mon, 17 Dec 2012 07:49:04 +0000 (15:49 +0800)]
backend: Remove argID in function arguments iteration

argID is used for checking whether the argument has a byvalue attribute,
and now llvm can do this with the hasByValueAttr function of the
argument, so there is no need to use the old api.

llvm svn revision: r169719

Signed-off-by: Feng, Boqun <boqun.feng@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong>
11 years agoremove all Makefiles
Lu Guanqun [Thu, 10 Jan 2013 01:24:28 +0000 (09:24 +0800)]
remove all Makefiles

There are two motivations for this change:

 - As we're using CMake, we don't need to maintain another build system. More
   code is more burden.
 - We want to delete `ocl_stdlib_str.cpp` completely as it can be
   auto-generated from `ocl_stdlib.h`. But in the current Makefile build system,
   we used it directly in `all_in_one` directory. So the removal of Makefile
   would help us on this.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agofix the sign-compare warning
Lu Guanqun [Thu, 10 Jan 2013 01:23:52 +0000 (09:23 +0800)]
fix the sign-compare warning

/root/cl-intel/src/cl_api.c:1051:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoadd check for memory allocation size
Lu Guanqun [Thu, 10 Jan 2013 01:19:09 +0000 (09:19 +0800)]
add check for memory allocation size

When it exceeds the max allocation size, it should fail and return
CL_INVALID_BUFFER_SIZE.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agocleanup .gitignore files
Lu Guanqun [Thu, 27 Dec 2012 03:10:51 +0000 (11:10 +0800)]
cleanup .gitignore files

The files listed in these .gitignore are never seen.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agosupport OpenCL conversions & type casting function "as_uchar4(float f)"
Homer Hsing [Fri, 4 Jan 2013 01:45:00 +0000 (09:45 +0800)]
support OpenCL conversions & type casting function "as_uchar4(float f)"

11 years agosupport OpenCL conversions & type casting function "convert_type_4"
Homer Hsing [Fri, 4 Jan 2013 01:40:58 +0000 (09:40 +0800)]
support OpenCL conversions & type casting function "convert_type_4"

11 years agodefine macro CLK_{LOCAL,GLOBAL}_MEM_FENCE in ocl_stdlib.h
Homer Hsing [Fri, 4 Jan 2013 01:46:43 +0000 (09:46 +0800)]
define macro CLK_{LOCAL,GLOBAL}_MEM_FENCE in ocl_stdlib.h

11 years agomore test case for vector load/store function
Homer Hsing [Fri, 4 Jan 2013 01:25:01 +0000 (09:25 +0800)]
more test case for vector load/store function

11 years agomore test case for OpenCL 1.1 integer built-in macros
Homer Hsing [Fri, 4 Jan 2013 01:23:18 +0000 (09:23 +0800)]
more test case for OpenCL 1.1 integer built-in macros

11 years agosupport OpenCL 1.1 integer built-in macros
Homer Hsing [Fri, 4 Jan 2013 01:22:28 +0000 (09:22 +0800)]
support OpenCL 1.1 integer built-in macros

11 years agoimplement blocking mode of clEnqueueUnmapMemObject
Homer Hsing [Thu, 27 Dec 2012 06:47:13 +0000 (14:47 +0800)]
implement blocking mode of clEnqueueUnmapMemObject

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoimplement blocking mode of clEnqueueMapBuffer
Homer Hsing [Thu, 27 Dec 2012 06:44:57 +0000 (14:44 +0800)]
implement blocking mode of clEnqueueMapBuffer

  it is the first step only ...

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoImplement clEnqueueWriteBuffer
Homer Hsing [Thu, 27 Dec 2012 06:43:00 +0000 (14:43 +0800)]
Implement clEnqueueWriteBuffer

It is only the first step. support only blocking write.

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoFix extended math function selection logic for int div.
Homer Hsing [Thu, 27 Dec 2012 06:39:44 +0000 (14:39 +0800)]
Fix extended math function selection logic for int div.

If both operand are integer, we should call
  GEN_MATH_FUNCTION_INT_DIV_QUOTIENT,
  not GEN_MATH_FUNCTION_FDIV.

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoinstall header files
Lu Guanqun [Tue, 25 Dec 2012 07:15:18 +0000 (15:15 +0800)]
install header files

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoImport gbm internal header files.
Zhigang Gong [Tue, 26 Feb 2013 09:30:25 +0000 (17:30 +0800)]
Import gbm internal header files.

Prepartion to support cl_khr_gl_sharing extension. I
decide to use egl/gbm/dri2 image extension to implement
it.

The reason why we need to import gbm internal header files
is that gbm doesn't initialize the image extension by default
with x11 platform. As it doesn't know the default display and
the context when create a gbm device. We have to use its internal
structure to initialize the image extension properly after the
gbm device's creation. We are not the only one to do that way,
the EGL drm platform does the same thing.

To avoid dependencies to the whole mesa source package, I have
to copy the related header files here.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Homer Hsing <homer.xing@intel.com>
11 years agoImplement OCL extension initizliation.
Zhigang Gong [Fri, 22 Feb 2013 09:21:07 +0000 (17:21 +0800)]
Implement OCL extension initizliation.

We don't have an extension checking and initialization implemenation.
Now add it. For the mandatory extensions for OCL1.2 as below:
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store
cl_khr_fp64 (for backward compatibility if
double precision is supported)

It seems that we only support the byte addressable store extension.
We still need to write new test case for it to prove whether we really
support it.

For all the other mandatory extensions, we need to implement them if we
want to comply with OCL1.2 specification.

For the optional extensions, currently we only support cl_khr_gl_sharing.
Actually, we are not fully support it. Current implementation is a hack
fashion. I'll change to use upstream mesa to implement it. For now, just
enable this extension.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Homer Hsing <homer.xing@intel.com>
11 years agoFind GBM/EGL library at build time.
Zhigang Gong [Thu, 21 Feb 2013 11:33:55 +0000 (19:33 +0800)]
Find GBM/EGL library at build time.

We will change to use EGL_KHR_gl_texture_2D_image and GBM library
to implement OCL and OGL interoperation. We need to check GBM.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Homer Hsing <homer.xing@intel.com>
11 years agobackend: Add LLVM stable version support
Feng, Boqun [Fri, 1 Mar 2013 05:30:19 +0000 (13:30 +0800)]
backend: Add LLVM stable version support

support current llvm stable version 3.2
modify cmake file to check the version of llvm provided by system or
configured by LLVM_INSTALL_DIR, and add a macro define in the format
LLVM_<MAJOR><MINOR> according the version, this macro can be used for
llvm version-specific code.

Signed-off-by: Feng, Boqun <boqun.feng@intel.com>
Reviewed-by: Homer Hsing <homer.xing@intel.com>
11 years agoKeep consistent naming rule for LLVM_XXX Cmake variables.
Zhigang Gong [Wed, 19 Dec 2012 06:18:23 +0000 (14:18 +0800)]
Keep consistent naming rule for LLVM_XXX Cmake variables.

Also fixed inconsistent indentation in FindLLVM.cmake and
remove some unecessary blank lines. Based on patch from
guanqun.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agofix compilation errors when it can't find correct library dirs
Lu Guanqun [Wed, 19 Dec 2012 03:31:42 +0000 (11:31 +0800)]
fix compilation errors when it can't find correct library dirs

The reason is that we specify `LLVM_LIBRARY_DIRS` in
`backend/src/CMakeLists.txt`, while in `FindLLVM.cmake`, we name it wrong.

11 years agoRefine CMake to check llvm version.
Zhigang Gong [Tue, 18 Dec 2012 08:45:36 +0000 (16:45 +0800)]
Refine CMake to check llvm version.

This branch need llvm 3.3 or newer version. We need to modify the cmake to
check the version. This commit also fixed some minor bugs in the find_packages,
and removed those useless files.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoDon't use display :0.0 manually.
Zhigang Gong [Fri, 22 Feb 2013 10:04:18 +0000 (18:04 +0800)]
Don't use display :0.0 manually.

Pass a NULL DISPLAY, the library will use the DISPLAY environment
which should be what we want it to do.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Homer Hsing <homer.xing@intel.com>
11 years agoCMake fixup.
Zhigang Gong [Tue, 11 Dec 2012 06:29:10 +0000 (14:29 +0800)]
CMake fixup.

Add a FindLLVM to handle the llvm package finding function.
Fixed the broken CMake files in backend.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoupdate headers to OpenCL 1.2 standards
Lu Guanqun [Wed, 26 Dec 2012 08:38:41 +0000 (16:38 +0800)]
update headers to OpenCL 1.2 standards

The header files are downloaded from this link:

    http://www.khronos.org/registry/cl/

And there are several other fixes due to this header update:

 - change cl_mem_type to cl_mem_object_type
 - change CL_INVALID_MEM to CL_INVALID_MEM_OBJECT
 - change CL_INVALID_TEXTURE to CL_INVALID_IMAGE_DESCRIPTOR
 - change CL_MEM_ALLOCATION_FAILURE to CL_MEM_OBJECT_ALLOCATION_FAILURE

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agofix assertion when two kernels exist in cl file
Lu Guanqun [Tue, 25 Dec 2012 05:26:55 +0000 (13:26 +0800)]
fix assertion when two kernels exist in cl file

The root cause is that it fails to increment `currID` when traversing hash map.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agooutput file name and kernel name when cl_kernel_init() fails
Lu Guanqun [Tue, 25 Dec 2012 03:43:44 +0000 (11:43 +0800)]
output file name and kernel name when cl_kernel_init() fails

This would help ease the debugging process a lot.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agosupport vector data load/store for char,short,long
Homer Hsing [Tue, 25 Dec 2012 00:53:39 +0000 (08:53 +0800)]
support vector data load/store for char,short,long

Signed-off-by: Homer Hsing <homer.xing@intel.com>
11 years agoChange to Clang/LLVM ToT(Top of the Tree)
Feng, Boqun [Wed, 28 Nov 2012 08:21:10 +0000 (16:21 +0800)]
Change to Clang/LLVM ToT(Top of the Tree)

Two minor changed in this patch

1.files that use llvm new api.
backend/src/llvm/llvm_{gen_backend,passes}.cpp

2.change backend IR from ptx32 to nvptx.
all test cases in utest passed [SUSSECC], but may give wrong output.
for example, app_mandelbrot makes a wrong picture.
silk's cl_gl_fill passed.

revision of Clang/LLVM components:
llvm r168773
clang r168774
compiler-rt r168700

Signed-off-by: Feng, Boqun <boqun.feng@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong>
11 years agoFixed compilation warnings.
Zhigang Gong [Mon, 17 Dec 2012 07:21:11 +0000 (15:21 +0800)]
Fixed compilation warnings.

__STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are in cflags,
we don't need to put them in source file. Otherwise, it causes
redefine warnings. Reported by guanqun.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoIgnore OpenCL kernel copied from Intel OpenCL SDK
Xing, Homer [Wed, 12 Dec 2012 08:37:28 +0000 (16:37 +0800)]
Ignore OpenCL kernel copied from Intel OpenCL SDK

just modify .gitignore, to ignore OpenCL kernel copied from Intel OpenCL SDK

11 years agosupport OpenCL 1.1 relational builtin functions "all","any"
Homer Hsing [Mon, 10 Dec 2012 01:02:02 +0000 (09:02 +0800)]
support OpenCL 1.1 relational builtin functions "all","any"

11 years agosupport OpenCL 1.1 relational builtin function "signbit"
Homer Hsing [Mon, 10 Dec 2012 00:41:01 +0000 (08:41 +0800)]
support OpenCL 1.1 relational builtin function "signbit"

11 years agosupport some OpenCL 1.1 relational built-in functions
Homer Hsing [Fri, 7 Dec 2012 01:56:21 +0000 (09:56 +0800)]
support some OpenCL 1.1 relational built-in functions

support isfinite, isinf, isnan, isnormal, islessgreater, isordered, isunordered

11 years agoadd missing #define in ocl_stdlib.h: INLINE_OVERLOADABLE and OVERLOADABLE
Homer Hsing [Fri, 7 Dec 2012 01:17:07 +0000 (09:17 +0800)]
add missing #define in ocl_stdlib.h: INLINE_OVERLOADABLE and OVERLOADABLE

use INLINE_OVERLOADABLE in DECL

11 years agosupport some of OpenCL 1.1 relational built-in functions
Homer Hsing [Fri, 7 Dec 2012 01:10:05 +0000 (09:10 +0800)]
support some of OpenCL 1.1 relational built-in functions

support isequal, isnotequal, isgreater, isgreaterequal, isless, islessequal
also fix typo (these typo does not cause bug)

11 years agosupport OpenCL 1.1 kernel_exec preprocessor macro
Homer Hsing [Thu, 6 Dec 2012 08:24:55 +0000 (16:24 +0800)]
support OpenCL 1.1 kernel_exec preprocessor macro

11 years agotest case for __kernel_exec
Homer Hsing [Thu, 6 Dec 2012 08:20:04 +0000 (16:20 +0800)]
test case for __kernel_exec

11 years agosupport OpenCL 1.1 __kernel_exec preprocessor macro
Homer Hsing [Thu, 6 Dec 2012 08:19:32 +0000 (16:19 +0800)]
support OpenCL 1.1 __kernel_exec preprocessor macro

11 years agopass build-options of clBuildProgram to clang compiler
Homer Hsing [Thu, 6 Dec 2012 08:00:13 +0000 (16:00 +0800)]
pass build-options of clBuildProgram to clang compiler

11 years agoadd OpenCL 1.1 preprocessor macros ENDIAN_LITTLE
Homer Hsing [Thu, 6 Dec 2012 06:42:59 +0000 (14:42 +0800)]
add OpenCL 1.1 preprocessor macros ENDIAN_LITTLE

11 years agosupport OpenCL 1.1 other built-in data types
Homer Hsing [Thu, 6 Dec 2012 03:18:51 +0000 (11:18 +0800)]
support OpenCL 1.1 other built-in data types

11 years agoa more general typedef for size_t and ptrdiff_t
Homer Hsing [Thu, 6 Dec 2012 03:14:58 +0000 (11:14 +0800)]
a more general typedef for size_t and ptrdiff_t

11 years agosupport OpenCL 1.1 floating-point macros
Homer Hsing [Thu, 6 Dec 2012 01:33:55 +0000 (09:33 +0800)]
support OpenCL 1.1 floating-point macros

11 years agosupport some OpenCL 1.1 preprocessor directives & macros
Homer Hsing [Thu, 6 Dec 2012 01:18:27 +0000 (09:18 +0800)]
support some OpenCL 1.1 preprocessor directives & macros

11 years agoadd test case for bool const, and vector component addressing
Homer Hsing [Thu, 6 Dec 2012 01:05:44 +0000 (09:05 +0800)]
add test case for bool const, and vector component addressing

11 years agosupport OpenCL 1.1 built-in scalar data types, built-in vector data types
Homer Hsing [Thu, 6 Dec 2012 00:53:31 +0000 (08:53 +0800)]
support OpenCL 1.1 built-in scalar data types, built-in vector data types

11 years agotest OpenCL 1.1 Vector Data Load/Store Functions
Homer Hsing [Thu, 29 Nov 2012 01:41:46 +0000 (09:41 +0800)]
test OpenCL 1.1 Vector Data Load/Store Functions

11 years agotest OpenCL 1.1 Async Copies and Prefetch Functions
Homer Hsing [Thu, 29 Nov 2012 01:40:50 +0000 (09:40 +0800)]
test OpenCL 1.1 Async Copies and Prefetch Functions

11 years agoTest OpenCL 1.1 Geometric Builtin Functions
Homer Hsing [Mon, 26 Nov 2012 07:27:53 +0000 (15:27 +0800)]
Test OpenCL 1.1 Geometric Builtin Functions

11 years agotest OpenCL 1.1 Relational Built-in Functions
Homer Hsing [Mon, 26 Nov 2012 07:20:58 +0000 (15:20 +0800)]
test OpenCL 1.1 Relational Built-in Functions

11 years agoEnable build-in vector data types test in kernels/compiler_data_types.cl
Homer Hsing [Mon, 26 Nov 2012 07:13:07 +0000 (15:13 +0800)]
Enable build-in vector data types test in kernels/compiler_data_types.cl

11 years agotest OpenCL 1.1 Synchronization, explicit memory fence
Homer Hsing [Fri, 23 Nov 2012 00:51:48 +0000 (08:51 +0800)]
test OpenCL 1.1 Synchronization, explicit memory fence

11 years agotest OpenCL 1.1 sampler declaration fields
Homer Hsing [Fri, 23 Nov 2012 00:45:59 +0000 (08:45 +0800)]
test OpenCL 1.1 sampler declaration fields

11 years agoTest case for OpenCL 1.1 Sampler Objects
Homer Hsing [Thu, 22 Nov 2012 08:21:02 +0000 (16:21 +0800)]
Test case for OpenCL 1.1 Sampler Objects

11 years agoTest case for OpenCL 1.1 Atomic Functions
Homer Hsing [Thu, 22 Nov 2012 01:07:36 +0000 (09:07 +0800)]
Test case for OpenCL 1.1 Atomic Functions

11 years agotest case for OpenCL 1.1 function qualifiers
Homer Hsing [Thu, 22 Nov 2012 00:56:02 +0000 (08:56 +0800)]
test case for OpenCL 1.1 function qualifiers

11 years agotest case for OpenCL 1.1 conversion & type casting
Homer Hsing [Thu, 22 Nov 2012 00:50:28 +0000 (08:50 +0800)]
test case for OpenCL 1.1 conversion & type casting

11 years agoTest case for OpenCL 1.1 address space qualifier
Homer Hsing [Thu, 22 Nov 2012 00:42:48 +0000 (08:42 +0800)]
Test case for OpenCL 1.1 address space qualifier

11 years agoTest case for OpenCL 1.1 integer built-in functions
Homer Hsing [Wed, 21 Nov 2012 06:51:39 +0000 (14:51 +0800)]
Test case for OpenCL 1.1 integer built-in functions

11 years agoTest case for OpenCL 1.1 structure attributes
Homer Hsing [Wed, 21 Nov 2012 06:42:31 +0000 (14:42 +0800)]
Test case for OpenCL 1.1 structure attributes

11 years agoTest case for OpenCL 1.1 Preprocessor Directives & Macros
Homer Hsing [Tue, 20 Nov 2012 03:01:31 +0000 (11:01 +0800)]
Test case for OpenCL 1.1 Preprocessor Directives & Macros

11 years agoTest case for OpenCL 1.1 math constants
Homer Hsing [Tue, 20 Nov 2012 02:49:10 +0000 (10:49 +0800)]
Test case for OpenCL 1.1 math constants

11 years agoTest case for OpenCL 1.1 workitem builtin functions
Homer Hsing [Tue, 20 Nov 2012 02:27:42 +0000 (10:27 +0800)]
Test case for OpenCL 1.1 workitem builtin functions

11 years agoTest case for OpenCL 1.1 supported data types
Homer Hsing [Tue, 20 Nov 2012 01:51:03 +0000 (09:51 +0800)]
Test case for OpenCL 1.1 supported data types

11 years agoAdd test case, OpenCL 1.1 Math Built-in Functions
Homer Hsing [Tue, 20 Nov 2012 01:31:17 +0000 (09:31 +0800)]
Add test case, OpenCL 1.1 Math Built-in Functions

11 years agotest creating program objects, build program executable, build options, query program...
Homer Hsing [Mon, 19 Nov 2012 08:17:31 +0000 (16:17 +0800)]
test creating program objects, build program executable, build options, query program objects

11 years agoFix up README.md
Homer Hsing [Fri, 2 Nov 2012 05:06:52 +0000 (13:06 +0800)]
Fix up README.md

miss a line "cd build" in section "How to build"

11 years agonew test case from Nanhai.
Zhigang Gong [Wed, 28 Nov 2012 08:01:26 +0000 (16:01 +0800)]
new test case from Nanhai.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoFirst implementation for extension cl_khr_gl_sharing.
Zhigang Gong [Fri, 16 Nov 2012 07:29:37 +0000 (15:29 +0800)]
First implementation for extension cl_khr_gl_sharing.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoRemove glext.h.
Zhigang Gong [Fri, 16 Nov 2012 07:22:36 +0000 (15:22 +0800)]
Remove glext.h.

It's part of ogl not ocl.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoOnly llvm3.0 and 3.1 have TargetData.h.
Zhigang Gong [Fri, 29 Mar 2013 10:35:12 +0000 (18:35 +0800)]
Only llvm3.0 and 3.1 have TargetData.h.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoFixed a potential Null pointer reference in emitMovForPHI.
Zhigang Gong [Fri, 29 Mar 2013 10:26:31 +0000 (18:26 +0800)]
Fixed a potential Null pointer reference in emitMovForPHI.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
11 years agoUpdated comment on lost copy since it is supported now
Benjamin Segovia [Sat, 17 Nov 2012 02:10:07 +0000 (18:10 -0800)]
Updated comment on lost copy since it is supported now

11 years agoImplemented a work around for LLVM / clang 3.2. They handle swizzle of constant
Benjamin Segovia [Sat, 17 Nov 2012 02:05:59 +0000 (18:05 -0800)]
Implemented a work around for LLVM / clang 3.2. They handle swizzle of constant
vectors in a weird way such that the final LLVM code uses ConstantExpr which are
not supported yet. So, I modified the kernels to make them work.
Still two kernels are not working. They basically use undefined values which are
actually used. I am not supporting such case right now. It would be the
opportunity to simplify all this.

LLVM 3.2 works now. I needed to deactivate fmulall though. The code does not
seem to be correct. Well, I am not sure. May be related to the llvm+clang
version I have.

11 years agoImproved llvm 3.2 support (remove some warnings using nasty macros)
Benjamin Segovia [Fri, 16 Nov 2012 19:24:23 +0000 (11:24 -0800)]
Improved llvm 3.2 support (remove some warnings using nasty macros)

11 years agoFixed lost copy issue when deSSAing the code. Yeah for even more MOV!!
Benjamin Segovia [Fri, 16 Nov 2012 03:59:53 +0000 (19:59 -0800)]
Fixed lost copy issue when deSSAing the code. Yeah for even more MOV!!
global copy propagation is overdue!

11 years agoAdded complete support for barrier (and use of SLM)
Benjamin Segovia [Wed, 14 Nov 2012 04:55:06 +0000 (20:55 -0800)]
Added complete support for barrier (and use of SLM)
Added some tests to assert this functionnality

11 years agoStarted to implement OpenCL barrier() function
Benjamin Segovia [Tue, 13 Nov 2012 04:48:00 +0000 (20:48 -0800)]
Started to implement OpenCL barrier() function

11 years agoStarted the boiler plate for barrier (and fences) instructions
Benjamin Segovia [Sat, 10 Nov 2012 04:50:58 +0000 (20:50 -0800)]
Started the boiler plate for barrier (and fences) instructions
Improved the comment on the instruction selection

11 years agoRemoved MAD instruction in the IR
Benjamin Segovia [Sat, 10 Nov 2012 04:28:17 +0000 (20:28 -0800)]
Removed MAD instruction in the IR

11 years agoAdded support for __local pointer in kernel arguments. This require to add more
Benjamin Segovia [Sat, 10 Nov 2012 04:16:24 +0000 (20:16 -0800)]
Added support for __local pointer in kernel arguments. This require to add more
features in the run-time and proper support in the rest of the compiler

11 years agoUpdated README since LLVM 3.1 is supported and LLVM 3.2 is almost supported
Benjamin Segovia [Fri, 9 Nov 2012 09:26:51 +0000 (01:26 -0800)]
Updated README since LLVM 3.1 is supported and LLVM 3.2 is almost supported

11 years agoImproved the comment on the LLVM pass
Benjamin Segovia [Fri, 9 Nov 2012 09:25:29 +0000 (01:25 -0800)]
Improved the comment on the LLVM pass