aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover
Commit message (Collapse)AuthorAgeFilesLines
* gallium: fix type of flags in pipe_context::flush()Chia-I Wu2013-05-041-1/+1
| | | | | | | | | | | | | | | | It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Marek Olšák <[email protected]> [olv: document the parameter now that the type is unsigned]
* mesa: Restore 78-column wrapping of license text in C++-style comments.Kenneth Graunke2013-04-2341-164/+164
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript2 where 'vimscript2' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/^ *$/ !fmt -w 78 -p '// ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-2341-41/+41
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* clover: Fix usage of incorrect object as destination in ↵Francisco Jerez2013-04-131-1/+1
| | | | | | clEnqueueCopyBufferToImage. Signed-off-by: Francisco Jerez <[email protected]>
* clover: Define platform class and merge with device_registry.Francisco Jerez2013-04-138-68/+155
| | | | | | | | | | | | | Null platform IDs are OK according to the spec, but some applications have been reported to get paranoid and assume that our NULL platform is unusable. As it doesn't hurt to have device enumeration separate from the rest of the device code (quite the opposite, it makes the code cleaner), make the API use an actual platform object that keeps track of the available devices instead of the former NULL pointer. Reported-and-reviewed-by: Tom Stellard <[email protected]> Signed-off-by: Francisco Jerez <[email protected]>
* clover: Add missing fields to the module serializer.Francisco Jerez2013-04-131-0/+2
| | | | Signed-off-by: Francisco Jerez <[email protected]>
* gallium: PIPE_COMPUTE_CAP_IR_TARGET - allow drivers to specify a processor v2Tom Stellard2013-04-051-5/+13
| | | | | | | | | | | | This target string now contains four values instead of three. The old processor field (which was really being interpreted as arch) has been split into two fields: processor and arch. This allows drivers to pass a more a more detailed description of the hardware to compiler frontends. v2: - Adapt to libclc changes Reviewed-by: Francisco Jerez <[email protected]>
* clover: Fix build with LLVM 3.3Mike Lothian2013-04-011-1/+2
|
* clover: add dynamic_cast results checking down in clSetKernelArgument() code ↵Dmitry Cherkassov2013-03-241-0/+12
| | | | | | | path. Signed-off-by: Dmitry Cherkassov <[email protected]> Signed-off-by: Francisco Jerez <[email protected]>
* mesa: Replace MESA_VERSION with PACKAGE_VERSION.Matt Turner2013-03-123-4/+3
| | | | | | One fewer place to have to update. Reviewed-by: Eric Anholt <[email protected]>
* clover: Fix build with LLVM 3.3 v2Tom Stellard2013-02-281-8/+39
| | | | | | | | v2: - Fix order that the clang libraries are passed to the linker to avoid missing symbol errors. Acked-by: Francisco Jerez <[email protected]>
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* targets/pipe-loader: Convert to automakeMatt Turner2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++ linking (controlled by the nodist_EXTRA idiom) is needed unconditionally for: nouveau (uses C++ in the driver) r300 (since LLVM is always required) radeonsi (since LLVM is always required) swrast (if builting LLVM pipe) and conditionally (depends whether LLVM is enabled) for i915 r600 vmwgfx and never needed for swrast (softpipe). Unfortunately, automake seems to *always* link with C++ if nodist_EXTRA is specified, even inside a false conditional. Not sure if this is a bug, but it does seem to be weird behavior. v2: Johannes Obermayr <[email protected]> - Fix some undefined symbols. v3: Johannes Obermayr <[email protected]> - Install pipe_* to $(libdir)/gallium-pipe. v4: Johannes Obermayr <[email protected]> - Build it only once on --enable-gallium-gbm / --enable-opencl.
* clover: Adapt libclc's INCLUDEDIR and LIBEXECDIR to make use of the new ↵Johannes Obermayr2013-01-082-3/+4
| | | | | | | | | introduced libclc.pc. Tom Stellard: -Keep --with-libclc-path and mark it deprecated. Reviewed-by: Tom Stellard <[email protected]>
* clover: Fix build after the addition of enum pipe_flush_flagsTom Stellard2013-01-041-1/+1
| | | | Broken since commit 598cc1f74d7ae924e84dee801b456ab7b0b22f84
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-041-1/+1
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* clover: Fix build since removal of pipe_surface::usageTom Stellard2012-12-131-1/+0
| | | | by commit 25409c6da8163d9acb386511aef0c11577c7aadb
* clover: Add support for compiler flagsTom Stellard2012-12-135-12/+71
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Don't erase build info of devices not being builtTom Stellard2012-12-131-2/+2
| | | | | | | | | Every call to _cl_program::build() was erasing the binaries and logs for every device associated with the program. This is incorrect because it is possible to build a program for only a subset of devices and so any device not being build should not have this information erased. Reviewed-by: Francisco Jerez <[email protected]>
* clover: Install CL headers.Johannes Obermayr2012-12-101-0/+10
| | | | Note: This is a candidate for the stable branches.
* clover: Fix build with clang 3.2Tom Stellard2012-11-161-1/+6
|
* clover: No need for clover::is_zero() to be a functor.Francisco Jerez2012-10-195-10/+8
| | | | | | | | | Simplify is_zero() somewhat, and as a side effect work around a gcc compiler bug that causes build failure. https://bugs.freedesktop.org/show_bug.cgi?id=56140 Reported-by: Dmitry Cherkassov <[email protected]>
* clover: Fix build with LLVM 3.2Tom Stellard2012-10-111-1/+10
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* gallium: unify transfer functionsMarek Olšák2012-10-111-8/+3
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* clover: Fix build with libclang v3.2Tom Stellard2012-09-251-0/+5
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Query device for CL_DEVICE_MAX_MEM_ALLOC_SIZE v2Tom Stellard2012-09-253-1/+9
| | | | | | | | v2: - Use driver reported values and don't correct them to the OpenCL required minimum. Reviewed-by: Francisco Jerez <[email protected]>
* clover: Handle multiple kernels in the same program v2Blaž Tomažič2012-09-251-33/+33
| | | | | | | | v2: Tom Stellard - Use pc parameter of launch_grid() Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* clover: Silence narrowing conversion warnings in resource.cpp.Francisco Jerez2012-09-241-3/+3
|
* clover: Handle NULL value for clEnqueueNDRangeKernel local_work_sizeTom Stellard2012-09-241-7/+6
| | | | [ Francisco Jerez: Slight simplification. ]
* clover: Initialize height and depth to 1 for transfersTom Stellard2012-09-211-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Accept CL_MEM_READ_WRITE flagBlaž Tomažič2012-08-241-4/+4
| | | | | | | Fix API functions for memory objects to accept CL_MEM_READ_WRITE flag. Signed-off-by: Blaž Tomažič <[email protected]> [ Francisco Jerez: Drop incorrect change in clCreateSubBuffer. ]
* clover: Handle NULL devs argument in clBuildProgramTom Stellard2012-07-011-5/+10
| | | | | If devs is NULL, then the kernel should be compiled for all devices associated with the program.
* clover: Define non-templated copy constructor for clover::ref_ptr.Francisco Jerez2012-07-011-2/+1
| | | | | | | | | The templated copy constructor doesn't prevent the compiler from emitting a default copy constructor, which leads to inconsistent memory handling and was reported to cause segfaults when doing event manipulation. Reported-by: Tom Stellard <[email protected]>
* clover: Add a function internalizer pass before LTO v2Tom Stellard2012-06-291-10/+49
| | | | | | | | | The function internalizer pass marks non-kernel functions as internal, which enables optimizations like function inlining and global dead-code elimination. v2: - Pass vector arguments by const reference
* clover: Add --with-clang-libdir option and verify CLANG_RESOURCE_DIRTom Stellard2012-06-221-1/+1
| | | | | | | | | | | | | | $CLANG_RESOURCE_DIR is the directory that contains all resources needed by clang to compile programs. When clover uses clang to compile kernels it needs to specify a resource dir, so that clang can find its internal headers (e.g. stddef.h). clang defines $CLANG_RESOURCE_DIR as $CLANG_LIBDIR/clang/$CLANG_VERSION This patch adds the --with-clang-libdir option in order to accommodate clang intalls to non-standard locations, and it also adds a check to the configure script to verify that $CLANG_RESOURCE_DIR/include contains the necessary header files.
* clover: Add function for building a clover::module for non-TGSI targets v6Tom Stellard2012-06-013-14/+158
| | | | | | | | | | | | | | | | | | | | | | | | v2: -Separate IR type and LLVM triple -Do the OpenCL C->LLVM IR and linking steps for all PIPE_SHADER_IR types. v3: - Coding style fixes - Removed compatibility code for LLVM < 3.1 - Split build_module_llvm() into three functions: compile(), link(), and build_module_llvm() v4: - Use struct pipe_compute_program v5: - Don't malloc memory for struct pipe_llvm_program v6: - Fix serialization of llvm bytecode Reviewed-by: Francisco Jerez <[email protected]>
* clover: Remove target argument from compile_program_tgsi()Tom Stellard2012-06-013-5/+3
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* clover: Add constructors to some of the module classes v3Tom Stellard2012-06-011-0/+13
| | | | | | | | | | | | This is for the llvm code that can't use extended initializers. v2: - Use const references for vector arguments - Move constructor defs before data members - Initialize all values in the default constructors v3: - Fix typo
* clover: Add necessary flags to libclllvm_la_CXXFLAGSTom Stellard2012-06-011-1/+5
| | | | | | | $(LLVM_CFLAGS) for LLVM defines -DLIBCLC_PATH for libclc path -DCLANG_RESOURCE_DIR for clang includes $(DEFINES) for -DHAVE_LLVM
* clover: Add a function for retrieving a device's preferred ir v3Tom Stellard2012-06-012-8/+11
| | | | | | | | | | | | | | | | | | | A device now has two function for getting information about the IR it needs to return. ir_format() => returns the preferred IR ir_target() => returns the triple for the target that is understood by clang/llvm. v2: - renamed ir_target() to ir_format() - renamed llvm_triple() to ir_target() v3: - Remove unnecessary include - Do proper conversion from std::vector<char> to std::string Reviewed-by: Francisco Jerez <[email protected]>
* gallium/auxiliary/pipe-loader: Fix usage of anonymous union.Francisco Jerez2012-05-161-1/+1
| | | | | | | | | Anonymous unions aren't part of the C99 standard. Fixes build on GCC versions older than 4.6. https://bugs.freedesktop.org/show_bug.cgi?id=50001 Reported-by: Michael Lange <[email protected]>
* Add .gitignore files for recently-added gallium projectsPaul Berry2012-05-151-0/+1
| | | | | | | This patch adds .gitignore files to ignore the makefiles generated by the gallium pipe loader and the clover OpenCL state tracker. Reviewed-by: Francisco Jerez <[email protected]>
* clover: Fix build on i386.Francisco Jerez2012-05-121-1/+2
|
* clover: Check the total work-group size provided to clEnqueueNDRangeKernel.Francisco Jerez2012-05-121-10/+17
|
* clover, gallium: add PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCKChristoph Bumiller2012-05-123-1/+9
| | | | | | | This is not necessarily the product of MAX_BLOCK_SIZE[i]. Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* clover: Implement CL_MEM_COPY_HOST_PTR.Francisco Jerez2012-05-114-7/+20
|
* clover: Import OpenCL state tracker.Francisco Jerez2012-05-1141-0/+7965