summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* vc4: Convert uniforms lowering to work with multiple blocks.Eric Anholt2016-07-121-29/+44
| | | | | | | | | We still decide which uniform to lower based on how many instructions-that-need-lowering use that uniform, but now we emit a new temporary uniform load in each of the basic blocks containing an instruction being lowered. This commit is best reviewed with diff -b.
* vc4: Convert vc4_opt_peephole_sf to work with control flow.Eric Anholt2016-07-121-4/+18
| | | | | | We need to apply the peephole pass to each of the blocks in the program. We don't do dataflow analysis for SF across blocks, but we also don't generate code that would need us to do so.
* vc4: Create a basic block structure and move the instructions into it.Eric Anholt2016-07-126-20/+122
| | | | | | | The optimization passes and scheduling aren't actually ready for multiple blocks with control flow yet (as seen by the "cur_block" references in them instead of iterating over blocks), but this creates the structures necessary for converting them.
* vc4: Add a "qir_for_each_inst_inorder" macro and use it in many places.Eric Anholt2016-07-1212-14/+17
| | | | | | | | We have the prior list_foreach() all over the code, but I need to move where instructions live as part of adding support for control flow. Start by just converting to a helper iterator macro. (The simpler "qir_for_each_inst()" will be used for the for-each-inst-in-a-block iterator macro later)
* vc4: Also enable phi elimination.Eric Anholt2016-07-121-0/+1
| | | | | | | | This avoids a bunch of code gen regressions when enabling loops in vc4. Prior to that, the GLSL that would have generated these optimizable phi nodes was being lowered to csels between either (undef, a) or (a, a), and those were being dealt with by nir_opt_undef and nir_opt_algebraic.
* vc4: fix memory leakEric Engestrom2016-07-121-1/+1
| | | | | | | | The allocation has succeeded by that point, so it needs to be freed. CovID: 1358929 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vc4: Close our screen's fd on screen close.Eric Anholt2016-07-121-0/+3
| | | | | We're passed in a freshly dup()ed fd on screen create, so we should close it on exit. Debugged by Hugh Cole-Baker.
* swr: [rasterizer core] correct MSAA behavior for conservative rasterizationTim Rowley2016-07-123-11/+31
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] conservative rast backend changesTim Rowley2016-07-128-221/+538
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer] buckets cleanupTim Rowley2016-07-124-12/+43
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] make all api functions call GetContextTim Rowley2016-07-121-14/+14
| | | | | | | | Small api cleanup. Make all api functions call GetContext instead of locally casting handle. Makes debugging easier by providing a single point to track context changes. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer] add support for llvm-3.9Tim Rowley2016-07-122-15/+28
| | | | | | v2: use signed compare, remove unneeded vmask Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer jitter] fix llvm-3.7 compileTim Rowley2016-07-121-0/+5
| | | | | | | d3d97f8 broke llvm-3.7, which has a mismatched API for setDataLayout/getDataLayout. Signed-off-by: Tim Rowley <[email protected]>
* st/omx/dec: convert decoder video buffer to progressiveLeo Liu2016-07-122-3/+68
| | | | | | | | | | | | | | | | | | | | | | with encode tunneling The idea of encode tunneling is to use video buffer directly for encoder, but currently the encoder doesn’t support interlaced surface, the OMX decoder set progressive surface before on that purpose. Since now we are polling the driver for interlacing information for decoder, we got the interlaced as preferred as other APIs(VDPAU, VA-API), thus breaking the transcode with tunneling. The solution is when with tunnel detected, re-allocate progressive target buffers, and then converting the interlaced decoder results to there. This has been tested with transcode results bit to bit matching as before with surface from progressive to progressive. Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]> Tested-by: Julien Isorce <[email protected]>
* vl/compositor: set layer of y or uv to renderLeo Liu2016-07-122-0/+42
| | | | | | Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]> Tested-by: Julien Isorce <[email protected]>
* vl/compositor: add weave to yuv shaderLeo Liu2016-07-122-0/+43
| | | | | | | | This shader will make interlaced yuv to progressive yuv. Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]> Tested-by: Julien Isorce <[email protected]>
* vl/compositor: move weave shader out from rgb weavingLeo Liu2016-07-122-76/+83
| | | | | | | | We'll use weave shader in the later patch. Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]> Tested-by: Julien Isorce <[email protected]>
* clover/api: Implement clLinkProgram per-device binary presence validation rule.Francisco Jerez2016-07-111-2/+31
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Add clLinkProgram (CL 1.2).Serge Martin2016-07-111-4/+27
| | | | | | | | | [ Francisco Jerez: Use validate_build_common for error checking, simplify control flow slightly and handle additional exception types. ] Reviewed-by: Francisco Jerez <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Trivial cleanups for api/program.cpp.Francisco Jerez2016-07-111-9/+8
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/core: Remove compiler.hpp.Francisco Jerez2016-07-114-37/+3
| | | | | | | | header_map was the only definition left in compiler.hpp, move it into program.hpp which is its only user in clover/core. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Get rid of compile_program_llvm().Francisco Jerez2016-07-112-18/+0
| | | | | | | Superseded by compile_program() and link_program(). Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Provide separate program methods for compilation and linking.Francisco Jerez2016-07-113-12/+42
| | | | | | | | [ Serge Martin: Fix inverted opts and log build ctor args. Keep the log related to the build. Fix indentation ] Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Unify program::build_* into a single method returning a struct.Francisco Jerez2016-07-114-50/+39
| | | | | | | | | | | | This gets rid of the program::build_* query methods and replaces them with the program::build() method that returns a single data structure containing all parameters for the last build done on the given target device (including build logs, options and the binary itself). [ Serge Martin: Fix inverted opts and log build ctor args ] Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Change program::build opts argument to std::string.Serge Martin2016-07-112-3/+3
| | | | | Reviewed-by: Francisco Jerez <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Define error subclass to signal build option parse failure.Francisco Jerez2016-07-113-3/+11
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Move back to using build_error to signal compilation failure.Francisco Jerez2016-07-115-17/+17
| | | | | | | | | | | | | | This partially reverts 7e0180d57d330bd8d3047e841086712376b2a1cc. Having two different exception subclasses for compilation and linking makes it more difficult to share or move code between the two codepaths, because the exact same function under the same error condition would need to throw one exception or the other depending on what top-level API is being implemented with it. There is little benefit anyway because clCompileProgram() and clLinkProgram() can tell whether they are linking or compiling a program. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover: Override ret_object.Serge Martin2016-07-111-0/+11
| | | | | | | | Return an API object from an intrusive reference to a Clover object, incrementing the reference count of the object. Reviewed-by: Francisco Jerez <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/tgsi: Add stub link_program() function.Francisco Jerez2016-07-112-0/+9
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/tgsi: Move compiler entry point declaration into tgsi directory and ↵Francisco Jerez2016-07-115-7/+42
| | | | | | | namespace. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Implement the -create-library linker option.Francisco Jerez2016-07-112-24/+44
| | | | | | | | [ Serge Martin: disable internalize pass when building a library. Otherwise some functions may be inlined and removed ] Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Implement linkage of multiple clover modules.Francisco Jerez2016-07-112-3/+35
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Split compilation and linking.Francisco Jerez2016-07-113-15/+91
| | | | | | | | | | | | Split the work previously done by compile_program_llvm() into compile_program() (which simply runs the front-end and serializes the resulting LLVM IR) and link_program() (which takes care of everything else down to binary codegen). [ Serge Martin: allow LLVM IR dump after compilation ] Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Implement library bitcode codegen.Francisco Jerez2016-07-112-1/+31
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Trivial assorted cleanups for invocation.cpp.Francisco Jerez2016-07-111-50/+7
| | | | | | | Drop a few include and using directives which are no longer necessary. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Split native codegen into separate file.Francisco Jerez2016-07-114-119/+175
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Split bitcode codegen into separate file.Francisco Jerez2016-07-114-35/+84
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Split shared codegen support code into separate file.Francisco Jerez2016-07-114-157/+261
| | | | | | | | This is the common part of the code used to generate a clover::module from LLVM bitcode, shared between the native and LLVM paths. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Define function for bitcode print-out.Francisco Jerez2016-07-111-7/+10
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Split native codegen and assembly print-out into separate ↵Francisco Jerez2016-07-111-18/+20
| | | | | | | functions. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Clean up bitcode codegen.Francisco Jerez2016-07-111-16/+20
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Use metadata introspection utils for kernel enumeration.Francisco Jerez2016-07-111-31/+3
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Use metadata introspection utils for kernel argument set-up.Francisco Jerez2016-07-111-92/+5
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Add simplified utility functions for metadata introspection.Francisco Jerez2016-07-112-0/+133
| | | | | | | v2: Fix for latest LLVM from SVN. Reviewed-by: Serge Martin <[email protected]> (v1) Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Clean up codestyle of get_kernel_args().Francisco Jerez2016-07-111-120/+103
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Fold compile_native() call into build_module_native().Francisco Jerez2016-07-111-6/+4
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Factor out duplicated construction of clover::module.Francisco Jerez2016-07-111-47/+41
| | | | | Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Clean up compile_native().Francisco Jerez2016-07-113-63/+74
| | | | | | | | | | | | | This switches compile_native() to the C++ API (which the rest of this file makes use of anyway so there is little benefit from using the C API), what should get rid of an amount of boilerplate and fix a leak of the TargetMachine object in the error path. v2: Additional fixes for LLVM 3.6. v3: Update for the latest LLVM SVN changes. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Clean up ELF parsing.Francisco Jerez2016-07-111-55/+52
| | | | | | | | | | | | | | This function was doing three separate things: - Initializing and releasing the ELF parsing state (the latter can be better done using RAII). - Searching for the symbol table in the ELF file. - Extraction of kernel symbol offsets from the symbol table. Split each one into a separate function for clarity and clean up the result slightly. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>
* clover/llvm: Move a bunch of utility functions into separate file.Francisco Jerez2016-07-113-61/+101
| | | | | | | | Some of these will be useful from a different compilation unit in the same subtree so put them in a publicly accessible header file. Reviewed-by: Serge Martin <[email protected]> Tested-by: Jan Vesely <[email protected]>