aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* tgsi/ureg: don't emit in/out arrays if drivers don't support ranged declarationsMarek Olšák2015-06-0516-36/+158
| | | | | | Softpipe, llvmpipe, r300g, and radeonsi pass tests. Other drivers need testing. Freedreno and nv30 are definitely broken. Other drivers seem to be alright.
* tgsi/ureg: add support for output array declarationsMarek Olšák2015-06-054-31/+78
|
* tgsi/ureg: add support for GS input array declarationsMarek Olšák2015-06-052-13/+28
|
* tgsi/ureg: merge input and fs_input arraysMarek Olšák2015-06-051-51/+33
|
* tgsi/ureg: rename and simplify ureg_DECL_gs_inputMarek Olšák2015-06-052-19/+19
| | | | | There is nothing special about it and it's used for tessellation shaders too.
* tgsi/ureg: add support for FS input array declarationsMarek Olšák2015-06-053-17/+60
|
* tgsi/scan: get more information about arrays and handle arrays correctly (v2)Marek Olšák2015-06-052-3/+25
| | | | v2: use less memory for the information
* draw: (trivial) fix NULL pointer dereferenceRoland Scheidegger2015-06-051-2/+2
| | | | | | | | | | | This probably got broken when the samplers were converted to be indexed by shader type. Seen when looking at bug 89819 though I'm not sure if that really was what the bug was about... Cc: "10.5 10.6" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Implement stencil exportRoland Scheidegger2015-06-044-15/+21
| | | | | | | | | | | | | Pretty trivial, fixes the issue that we're expected to be able to blit stencil surfaces (as the blit just relies on util blitter code which needs stencil export to do it). 2 piglits skip->pass, 11 fail->pass v2: prettify, keep different stencil ref value handling out of depth/stencil test itself. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallium/util: silence silence unused var warnings for non-debug buildBrian Paul2015-06-011-2/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: silence unused var warnings for non-debug buildBrian Paul2015-06-011-0/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* pipebuffer: silence unused var warnings for non-debug buildBrian Paul2015-06-011-0/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* draw: silence unused var warnings for non-debug buildBrian Paul2015-06-011-0/+4
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Remove stub disassemblerSymbolLookupCB.Jose Fonseca2015-06-011-13/+1
| | | | | | | | | It's incompletete -- it wasn't filling ReferenceType so it was causing garbagge on the disassembly. Furthermore it seems impossible to get the jump information through this interface. The solution for function size problem is to effectively book-keep the machine code start and end address while JIT'ing.
* vc4: Don't bother with safe list traversal in CSE.Eric Anholt2015-05-291-1/+1
| | | | We don't remove or move instructions.
* vc4: Convert from simple_list.h to list.hEric Anholt2015-05-2919-139/+87
| | | | list.h is a nicer and more familiar set of list functions/macros.
* vc4: Make sure we allocate idle BOs from the cache.Eric Anholt2015-05-291-1/+11
| | | | | | | | | | | | | We were returning the most recently freed BO, without checking if it was idle yet. This meant that we generally stalled immediately on the previous frame when generating a new one. Instead, allocate new BOs when the *oldest* BO is still busy, so that the cache scales with how much is needed to keep some frames outstanding, as originally intended. Note that if you don't have some throttling happening, this means that you can accidentally run the system out of memory. The kernel is now applying some throttling on all execs, to hopefully avoid this.
* vc4: Fix return value handling for BO waits.Eric Anholt2015-05-291-12/+15
| | | | | If the wait ever returned -ETIME, we'd abort because the errno was stored in errno and not drmIoctl()'s return value.
* gallivm: make sampling more robust when the sampler setup is bogusRoland Scheidegger2015-05-291-6/+32
| | | | | | | | | Pure integer formats cannot be sampled with linear tex / mip filters. In GL such a setup would make the texture incomplete. We shouldn't rely on the state tracker though to filter that out, just return all zeros instead of dying in the lerp. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: Use the LLVM's C disassembly interface.Jose Fonseca2015-05-291-223/+37
| | | | | | | | | | | It doesn't do everything we want. In particular it doesn't allow to detect jumps or return opcodes. Currently we detect the x86's RET opcode. Even though it's worse for LLVM 3.3, it's an improvement for LLVM 3.7, which was totally busted. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: Disable frame pointer omission on LLVM 3.7.Jose Fonseca2015-05-291-0/+10
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* st/dri: fix postprocessing crash when there's no depth bufferMarek Olšák2015-05-291-5/+4
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89131 Cc: 10.6 10.5 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon/llvm: reset temps_count on deallocationMarek Olšák2015-05-291-0/+1
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeon/llvm: don't use a static array size for radeon_llvm_context::arrays (v2)Marek Olšák2015-05-292-7/+12
| | | | | | v2: - don't use realloc (tgsi_shader_info provides the size) Reviewed-by: Michel Dänzer <[email protected]>
* softpipe: fix offset wrapping calculations (v2)Dave Airlie2015-05-291-78/+68
| | | | | | | | | | | | | | | Roland pointed out my previous attempt was lacking, so I enhanced the texwrap piglit test, and tested them. This fixes the offset calculations in a number of areas by adding the offset first, it also fixes the fastpaths, which I forgot to address in the previous commit. v2: try and avoid divides in most paths, the repeat mirror path really was ugly no matter which way I went, so I left it having the divide. Also fix the gather lod calculation bug. Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallivm: Workaround LLVM PR23628.Jose Fonseca2015-05-281-0/+11
| | | | | | | | | | Temporarily undefine DEBUG macro while including LLVM C++ headers, leveraging the push/pop_macro pragmas, which are supported both by GCC and MSVC. https://bugs.freedesktop.org/show_bug.cgi?id=90621 Trivial.
* vc4: Just stream out fallback IB contents.Eric Anholt2015-05-276-42/+41
| | | | | | | | | | | | | | | The idea I had when I wrote the original shadow code was that you'd see a set_index_buffer to the IB, then a bunch of draws out of it. What's actually happening in openarena is that set_index_buffer occurs at every draw, so we end up making a new shadow BO every time, and converting more of the BO than is actually used in the draw. While I could maybe come up with a better caching scheme, for now just do the simple thing that doesn't result in a new shadow IB allocation per draw. Improves performance of isosurf in drawelements mode by 58.7967% +/- 3.86152% (n=8).
* vc4: Don't try to put our dmabuf-exported BOs into the BO cache.Eric Anholt2015-05-271-0/+1
| | | | | | | We'd sometimes try to reallocate something that X was using as a new pipe_resource, and potentially conflict in our rendering. But even worse, if we reallocated the BO as a shader, the kernel would reject rendering using the shader.
* vc4: Don't forget to make our raster shadow textures non-raster.Eric Anholt2015-05-271-0/+3
| | | | | | Not sure what happened in my testing that made the previous shadow code fix glxgears swapbuffering, but this also fixes lots of CopyArea in X (like dragging xlogo around in metacity).
* vc4: make vc4_begin_query() return a booleanSamuel Pitoiset2015-05-271-1/+2
| | | | | | | | I forgot to make the change in 96f164f6f047833091eb98a73aa80c31dc94f962. This fixes a warning with GCC and probably an error with Clang. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallivm: Do not use NoFramePointerElim with LLVM 3.7.Vinson Lee2015-05-272-0/+4
| | | | | | | | | TargetOptions::NoFramePointerElim was removed in llvm-3.7.0svn r238244 "Remove NoFramePointerElim and NoFramePointerElimOverride from TargetOptions and remove ExecutionEngine's dependence on CodeGen. NFC." Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* clover: Log build options when dumping clc source.EdB2015-05-271-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* xlib: fix X_GLXCreateContextAtrribs/Attribs typoBrian Paul2015-05-261-10/+17
| | | | | | | | | In case the glproto.h file isn't up to date, we provide the #define for X_GLXCreateContextAttribsARB. v2: fix other occurances, improve #ifndef test, per Jose. Reviewed-by: Jose Fonseca <[email protected]>
* radeonsi: use a switch statement in si_delete_shader_selectorMarek Olšák2015-05-261-6/+13
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use a switch statement in si_shader_selector_keyMarek Olšák2015-05-261-9/+16
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix scratch buffer setup for geometry shadersMarek Olšák2015-05-261-2/+9
| | | | | Cc: 10.6 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove unused cases from si_shader_io_get_unique_indexMarek Olšák2015-05-261-14/+3
| | | | | | | These can't occur between VS and GS, because GS is only supported in the core profile. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't count special outputs for the VS export countMarek Olšák2015-05-261-0/+5
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add support for PIPE_CAP_TGSI_TEXCOORDMarek Olšák2015-05-264-15/+13
| | | | | | | | | | | | | Without it, texcoords are mapped to GENERIC[0..7], PointCoord is mapped to GENERIC[8], and user-defined varyings start from GENERIC[9]. Since texcoords can only be used between VS and PS, and PointCoord is PS-only, it's silly to always start from GENERIC[9] in all other shaders (such as LS, HS, ES, GS). This adds support for TEXCOORD and PCOORD semantics. As a result, st/mesa will use GENERIC[0] as a base for user-defined varyings, which should make linking ES and GS as well as tessellation shaders at runtime easier. Reviewed-by: Michel Dänzer <[email protected]>
* tgsi/ureg: enable creating tessellation shaders with ureg_create_shaderMarek Olšák2015-05-261-4/+14
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* tgsi/text: enable parsing tessellation shadersMarek Olšák2015-05-261-0/+4
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: rename TGSI tessellation processor types to match pipe shader namesMarek Olšák2015-05-265-17/+17
| | | | | | I forgot to do this when pushing the interface changes. Reviewed-by: Ilia Mirkin <[email protected]>
* gallium: use const in set_tess_stateMarek Olšák2015-05-262-4/+4
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* clover: Build fix for FreeBSD.Koop Mast2015-05-261-0/+1
| | | | Cc: 10.6 10.5 <[email protected]>
* nv30: falling back to draw path for edgeflag does no goodIlia Mirkin2015-05-251-3/+2
| | | | | | | | | The problem is that the EDGEFLAG has to be toggled at vertex submission time. This can be done from either the draw or the regular paths. Avoid falling back to draw just because there's an edgeflag. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: switch varying hookup logic to know about texcoordsIlia Mirkin2015-05-251-9/+16
| | | | | | | | | | | | Commit 8acaf862dfe switched things over to use TEXCOORD instead of GENERIC, but did not update the nv30 swtnl draw paths. This teaches the draw logic about TEXCOORD. Among other things, this fixes a crash in demos/arbocclude when using swtnl. Curiously enough, the point-sprite piglit works without this. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: allocate vertex buffers in gartIlia Mirkin2015-05-251-6/+10
| | | | | | | | | | These are only used once per draw, so it makes sense to keep them in GART. Also take this opportunity to modernize the buffer mapping API usage. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: only use the DMA1 object (GART) if the bo is not in VRAMIlia Mirkin2015-05-251-3/+3
| | | | | | | | | Instead of always having it in the data, let the bo placement decide it. This fixes glxgears with swtnl forced on. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Cc: "10.5 10.6" <[email protected]>
* nv30/draw: fix indexed draws with swtnl path and a resource index bufferIlia Mirkin2015-05-251-3/+3
| | | | | | | The map = assignment was missing. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
* llvmpipe: (trivial) add parantheses in (!x == y) expressionRoland Scheidegger2015-05-251-1/+1
| | | | | | | Apparently some compilers think we probably wanted to do !(x == y) instead and issue a warning, so just shut it up... No functional change, obviously. Cc: <[email protected]>