summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium/util: fix undefined shift to the last bit in u_bit_scanMarek Olšák2016-04-181-1/+1
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: fix u_bit_scan_consecutive_range for mask == 0xffffffffMarek Olšák2016-04-181-1/+7
| | | | | | | | The second ffs returns 0, yielding count == -1. v2: change 1 to 1u Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/radeon: fix Nine with its slightly shifted viewportsMarek Olšák2016-04-181-15/+21
| | | | | | | just need to do the calculation in floating-point and then round things properly Reviewed-by: Axel Davy <[email protected]>
* vc4: Add support for rendering to cube map surfaces.Eric Anholt2016-04-181-1/+2
| | | | | | | We need to fix up the offset to point at the face of the cube. Fixes piglit fbo-cubemap, copyteximage CUBE, and glean's fbo test. Cc: "11.1 11.2" <[email protected]>
* vc4: Don't flush on read-only access of buffers read by the CL.Eric Anholt2016-04-183-7/+16
| | | | | | Fixes piglit mixed-immediate-and-vbo, and may significantly improve performance of applications that store a 4-byte IB in the same VBO as vertex data.
* vc4: Sanity check that flushes don't happen between state emit and draw.Eric Anholt2016-04-181-0/+7
| | | | | | Catches the cause of failure in arb_vertex_buffer_object-mixed-immediate-and-vbo, I've had this class of failure before, and it probably won't be the last time.
* vc4: Sanity check strides for imported BOs.Eric Anholt2016-04-181-5/+18
| | | | | | | If we're going to sample from or render to them at some particular size, we'd better make sure that they actually are that size. Causes some tests under simulation to generate appropriate error messages instead of failures.
* r600g: Move R600_BIG_ENDIAN to r600_pipe_common.hOded Gabbay2016-04-182-6/+6
| | | | | | | | I need to do this so I could use R600_BIG_ENDIAN in files which include r600_pipe_common.h but not r600_pipe.h Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: fix code indentationOded Gabbay2016-04-182-10/+10
| | | | | Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm: don't use vector selects with llvm 3.7Roland Scheidegger2016-04-181-3/+5
| | | | | | | | | | llvm 3.7 sometimes simply miscompiles vector selects. See https://bugs.freedesktop.org/show_bug.cgi?id=94972 This was fixed in llvm r249669 (https://llvm.org/bugs/show_bug.cgi?id=24532). Reviewed-by: Jose Fonseca <[email protected]>
* gallium/radeon: handle vertex shaders that disable clipping & viewportMarek Olšák2016-04-162-1/+20
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* llvmpipe: (trivial) initialize src1_alpha var to NULLRoland Scheidegger2016-04-151-1/+1
| | | | | | | | | | | The blend code would do a conditional assignment based on it, causing valgrind to complain. Since that variable was actually unused in this case, this doesn't fix anything but the warning. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94955 Cc: "11.1 11.2" <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/swr: confine c++11 flag to swr driverTim Rowley2016-04-151-2/+3
| | | | | | | | On the philosophy that a driver shouldn't change the compile flags for the entire tree, take the clove approach of moving the c++11 flag to the swr driver directory. Reviewed-by: Emil Velikov <[email protected]>
* gallium/swr: allow swr use as a swrast dri driverTim Rowley2016-04-154-7/+36
| | | | | Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* vc4: Fix subimage accesses to LT textures.Eric Anholt2016-04-151-4/+4
| | | | | | | | | | | | | This code started out like the T case, iterating over utile offsets, but I had partially switched it to iterating over pixel offsets. I hadn't caught this before because it's unusual to do piecemeal uploads to small textures. Fixes bad text rendering in QT5 apps, which use a 256x16 glyph cache. Also fixes 6 piglit tests related to glTexSubImage() and glGetTexSubImage(). Cc: "11.1 11.2" <[email protected]>
* radeon/uvd: fix tonga feedback buffer sizeLeo Liu2016-04-141-4/+8
| | | | | | | | This only applies to tonga Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: "11.1 11.2" <[email protected]>
* gallium/radeon: handle failure when mapping staging bufferNicolai Hähnle2016-04-141-0/+4
| | | | | Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: mark ssbo and images descriptor pointers dirty at beginning of CSNicolai Hähnle2016-04-141-0/+2
| | | | | | Without this, we were getting non-deterministic VM faults under high pressure. Reviewed-by: Marek Olšák <[email protected]>
* nvc0: do not break the universe on GK110+Samuel Pitoiset2016-04-141-0/+1
| | | | | | | | I removed that return 0 by mistake. Ooops. Fixes: 6e23fd4 ("nvc0: allow to use compute support on GM200") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0: allow to use compute support on GM200Samuel Pitoiset2016-04-143-2/+5
| | | | | | | | | This works like a charm but please not that NVF0_COMPUTE have to be set because compute support is still not enabled by default on GK110+. This will require more testing to make sure it won't break the 3D state. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/swr: fold the almost identical MakefilesEmil Velikov2016-04-146-312/+184
| | | | | | | | | | | Rather than having two almost identical Makefiles, with various VPATH hacks just fold them, using COMMON_* variables and actually getting things buildable/shipable. v2: whitespace fixes, remove Makefile.sources-arch Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* radeonsi: don't overwrite the scratch offset in shader prologsMarek Olšák2016-04-141-3/+4
| | | | | | Prologs only look at num_input_sgprs. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: fold num_user_sgprs where it is possibleMarek Olšák2016-04-141-16/+4
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: fix SGPRS calculation once moreMarek Olšák2016-04-142-55/+23
| | | | | | | | | | | | | This fixes GS piglit failures after adding SI_PARAM_SHADER_BUFFERS, which bumped NUM_USER_SGPRS and uncovered this bug on SI. If this was fixed in LLVM, these workarounds wouldn't be needed. LLVM would have to look at the calling convention to know how many SGPR inputs are declared, and add VCC and the scratch wave offset (which is enabled even if we spill SGPRs but not VGPRs, oh well). Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: disable hw ETC2 on PolarisMarek Olšák2016-04-141-1/+1
| | | | | | not supported by hw directly, but it's still fully supported by the driver Reviewed-by: Nicolai Hähnle <[email protected]>
* scons: Add a "check" target to run all unit tests.Jose Fonseca2016-04-142-12/+6
| | | | | | | | | Except: - u_cache_test -- too long - translate_test -- unreliable (it's probably testing corner cases that translate module doesn't care about.) Reviewed-by: Roland Scheidegger <[email protected]>
* test/unit: Make translate_test invoke translate_create by default.Jose Fonseca2016-04-141-3/+4
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* test/unit: Make pipe_barrier_test actually check correct bahavior.Jose Fonseca2016-04-141-7/+50
| | | | | | | | So it can run unattended. Also make it silent by default. Reviewed-by: Roland Scheidegger <[email protected]>
* clover: Fix build against LLVM SVN >= r266163Michel Dänzer2016-04-141-0/+14
| | | | | | createInternalizePass now takes a callback instead of a StringSet. Reviewed-by: Francisco Jerez <[email protected]>
* nir/dead_variables: Configurably work with any variable modeJason Ekstrand2016-04-132-2/+2
| | | | | | | The old version of the pass only worked on globals and locals and always left inputs, outputs, uniforms, etc. alone. Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/swr: Make flat shading tris work.George Kyriazis2016-04-132-0/+5
| | | | | | | - Incorporate flatshade flag into the shader generation - Use provoking vertex (vc) in shader when flat shading. Reviewed-by: Bruce Cherniak <[email protected]>
* Revert "freedreno/a4xx: better occlusion/sample counting"Rob Clark2016-04-131-6/+1
| | | | | | | | | | This reverts commit 62fa868728c729152af0d7cecd1d3e47e831cb7d. dEQP-GLES3.functional.occlusion_query.* was unhappy about that change. Still not really sure *what* the other slots in the sample results buffer are. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a4xx: rasterizer_discard supportRob Clark2016-04-131-0/+17
| | | | | | | | | | | | | | | | | This one is slightly annoying, since trying to write RBRC from draw would clobber values set in the tiling/gmem code. We could do command- stream patching for RBRC, as is done on a3xx. Although since it seems to be a rarely used feature, it is easier just to do RMW to set/clear the bit. Fixes dEQP-GLES3.functional.rasterizer_discard.basic.write_depth_triangles and related tests. a3xx still needs the same feature, although there it probably makes more sense to take advantage of the existing cmdstream patching which is required for RBRC for other reasons. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix array textures on a4xxRob Clark2016-04-131-3/+9
| | | | | | | | Seems like a4xx needs offset added to array index for all arrays, whereas a3xx only for cubemap arrays. Fixes a whole swath of dEQP fails (roughly *sampler2darray*). Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix stream-out offset handling for lines/trisRob Clark2016-04-131-1/+1
| | | | | | | | We need to increment offset by # of vertices, not by # of prims. Fixes a bunch of dEQP fails involving prims other than points. For example, dEQP-GLES3.functional.transform_feedback.position.lines_separate Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix handling for stream-out offsetsRob Clark2016-04-131-1/+2
| | | | | | | | | | | | | | | | | | If changed && append, we shouldn't be resetting the internal offset back to zero. This fixes issues w/ sequences like: glBeginTransformFeedback() glDraw() glPauseTransformFeedback() glDraw() glResumeTransformFeedback() glDraw() glEndTransformFeedback() Fixes dEQP-GLES3.functional.transform_feedback.array.separate.points.lowp_vec3 and related tests. Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix prims-emitted queryRob Clark2016-04-133-2/+12
| | | | | | This should only count when TF is not paused. Signed-off-by: Rob Clark <[email protected]>
* freedreno: fix max-line-widthRob Clark2016-04-131-0/+10
| | | | | | | | | | | dEQP noticed that we were advertising completely bogus values. The actual maximum is 127.0f. *But* we have to use an artifically low maximum to work around a bug in the dEQP test, which gets confused when the max line width is too large and lines start going off-screen. Signed-off-by: Rob Clark <[email protected]>
* freedreno: add flag to enable dEQP hacksRob Clark2016-04-132-0/+2
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: hack to avoid getting stuck in a loopRob Clark2016-04-131-1/+11
| | | | | | | There are still some edge cases which result in a neighbor-loop. Which needs to be fixed, but this hack at least makes deqp tests finish. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: use (ss) instead of (sy) for ldlvRob Clark2016-04-131-1/+7
| | | | | | | Fixes a bunch of flat-varying fail on a4xx (where we need to use ldlv to read the un-interpolated varying). Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: cleanup double cmps.s from frontendRob Clark2016-04-131-0/+31
| | | | | | | | | | | | | Since we cannot mov into a predicate register, the frontend uses a 'cmps.s p0.x, cond, 0' as a stand-in for mov to p0.x. It does this since it has no way to know that the source cond instruction (ie. for a kill, br, etc) will only be used to write the predicate reg. Detect this, and re-write the instruction writing p0.x to skip the original cmps.[sfu]. (It is done like this, rather than re-writing the dest of the first cmps.[sfu] in case the first cmps.[sfu] actually has other users.) Signed-off-by: Rob Clark <[email protected]>
* gallivm: Workaround LLVM PR 27332.Jose Fonseca2016-04-131-3/+14
| | | | | | | | | | | | | The credit for finding and isolating this bug goes to Vinson and Roland. The buggy LLVM versions were found by doing opt -instcombine llvm-pr27332.ll > /dev/null where llvm-pr27332.ll is the IR from https://llvm.org/bugs/show_bug.cgi?id=27332#c3 Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/radeon: move a comment to the correct placeMarek Olšák2016-04-131-3/+3
| | | | trivial
* radeonsi: gate PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT by LLVM versionNicolai Hähnle2016-04-131-1/+2
| | | | | | | | | Otherwise we incorrectly claim ARB_ssbo support even with older LLVM versions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94917 Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: add an env variable to force a level of aniso filteringMarek Olšák2016-04-135-9/+31
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* llvmpipe: Test rounding of x.5.Jose Fonseca2016-04-131-1/+2
| | | | | | | Leverage nearbyintif function, which should be available on all C99 implementations. Trivial.
* gallivm: use llvm.nearbyint instead of llvm.round.Roland Scheidegger2016-04-131-98/+1
| | | | | | | | | | | | | | | | We used to use sse roundps intrinsic directly, but switched to use the llvm intrinsics for rounding with e4f01da15d8c6ce3e8c77ff3ff3d2ce2574a3f7b. However, llvm semantics follows standard math lib round function which is specced to do roundNearestAwayFromZero but we really want roundNearestEven (moreoever, using round generates atrocious code since the cpu can't do it directly and it results in scalar calls to libm __roundf). So, use llvm.nearbyint instead, which does exactly the right thing, and even has the advantage of being available with llvm 3.3 too. (I've verified it actually generates a roundps instruction with llvm 3.3.) This fixes https://bugs.freedesktop.org/show_bug.cgi?id=94909 Reviewed-by: Jose Fonseca <[email protected]>
* nv50/ra: `isinf()` is in namespace `std` since C++11.Pierre Moreau2016-04-131-0/+4
| | | | | | | | | | This fixes a compile error while building Nouveau with C++11 enabled (and glibc >= 2.23). This happens if SWR is enabled, as it forces C++11. Signed-off-by: Pierre Moreau <[email protected]> Signed-off-by: Jose Fonseca <[email protected]> https://bugs.freedesktop.org/show_bug.cgi?id=94907
* scons: Allow building with Address Sanitizer.Jose Fonseca2016-04-131-4/+8
| | | | | | | | | | | | | | | | | | | | | | | libasan is never linked to shared objects (which doesn't go well with -z,defs). It must either be linked to the main executable, or (more practically for OpenGL drivers) be pre-loaded via LD_PRELOAD. Otherwise works. I didn't find anything with llvmpipe. I suspect the fact that the JIT compiled code isn't instrumented means there are lots of errors it can't catch. But for non-JIT drivers, the Address/Leak Sanitizers seem like a faster alternative to Valgrind. Usage (Ubuntu 15.10): scons asan=1 libgl-xlib export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/gallium/targets/libgl-xlib LD_PRELOAD=libasan.so.2 any-opengl-application Acked-by: Roland Scheidegger <[email protected]>