summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* pipe-loader: remove HAVE_PIPE_LOADER_foo function prototype guardsEmil Velikov2015-11-211-8/+0
| | | | | | | | | | They serve little to no purpose, as we don't need any additional dependencies (headers and/or symbols). On the other hand dropping them will allow us to use GALLIUM_PIPE_LOADER_DEFINES in only one single place - the pipe-loader. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* ttn: add TEX2 supportIlia Mirkin2015-11-201-3/+11
| | | | | | | | | This fixes CubeArrayShadow tests (where the shadow comes in via a second arg to the TEX2 instruction). Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Cc: [email protected]
* gallium/hud: add support for batch queriesNicolai Hähnle2015-11-203-46/+261
| | | | | | | v2 + v3: be more defensive about allocations Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
* gallium/hud: remove unused field in query_infoNicolai Hähnle2015-11-201-1/+0
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
* gallivm: use sampler index 0 for texel fetchesRoland Scheidegger2015-11-201-1/+6
| | | | | | | | | | | | | texel fetches don't use any samplers. Previously we just set the same number for both texture and sampler unit (as per "ordinary" gl style sampling where the numbers are always the same) however this would trigger some assertions checking that the sampler index isn't over PIPE_MAX_SAMPLERS limit elsewhere with d3d10, so just set to 0. (Fixing the assertion instead isn't really an option, the sampler isn't really used but might still pass an out-of-bound pointer around and even copy some things from it.) Reviewed-by: Jose Fonseca <[email protected]>
* auxiliary/vl/dri2: coding style fixesEmil Velikov2015-11-202-22/+34
| | | | | | | Rewrap long(ish) lines, add space between struct foo and *. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: hide internal functionsEmil Velikov2015-11-202-34/+20
| | | | | | | | Analogous to previous commit. While we're here prefix all functions identically -> vl_dri2_foo Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: hide internal functionsEmil Velikov2015-11-202-5/+5
| | | | | | | | As of last commit everyone is using the vl_screen dispatch, thus we can hide this function from the headers and make it static. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/dri2: setup the dispatchEmil Velikov2015-11-202-8/+15
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: use a label for the error pathEmil Velikov2015-11-201-6/+10
| | | | | | | ... just like every other place in gallium. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl/drm: setup the dispatchEmil Velikov2015-11-201-0/+6
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: add dispatch tableEmil Velikov2015-11-201-0/+17
| | | | | | | | As mentioned previously, it will allow us to use different vl backend in a generic way from either video state-tracker. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* auxiliary/vl: rename vl_screen_create to vl_dri2_screen_createEmil Velikov2015-11-202-4/+4
| | | | | | | | | | | In a preparation of having proper multi-platform/backend handling in VL. With follow up commits we'll introduce a dispatch within vl_screen similar to the one in pipe_screen. This way any VL state-tracker can operate seamlessly, considering the backend/platform is properly setup. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* os: check for GALLIUM_PROCESS_NAME to override os_get_process_name()Brian Paul2015-11-191-18/+29
| | | | | | | Useful for debugging and for glretrace. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* hud: fix Windows build breakBrian Paul2015-11-191-0/+6
| | | | | | Protect signal-related code with PIPE_OS_UNIX test. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/hud: control visibility at startup and runtime.Jimmy Berry2015-11-191-0/+29
| | | | | | | - env GALLIUM_HUD_VISIBLE: control default visibility - env GALLIUM_HUD_SIGNAL_TOGGLE: toggle visibility via signal Signed-off-by: Marek Olšák <[email protected]>
* llvmpipe: disable VSX in ppc due to LLVM PPC bugOded Gabbay2015-11-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch disables the use of VSX instructions, as they cause some piglit tests to fail For more details, see: https://llvm.org/bugs/show_bug.cgi?id=25503#c7 With this patch, ppc64le reaches parity with x86-64 as far as piglit test suite is concerned. v2: - Added check that we have at least LLVM 3.4 - Added the LLVM bug URL as a comment in the code v3: - Only disable VSX if Altivec is supported, because if Altivec support is missing, then VSX support doesn't exist anyway. - Change original patch description. Signed-off-by: Oded Gabbay <[email protected]> Cc: "11.0" <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/u_blitter: add support for multi-dword clear values in clear_bufferMarek Olšák2015-11-131-11/+14
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add support for gl_HelperInvocation semanticIlia Mirkin2015-11-121-0/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Glenn Kennard <[email protected]>
* gallium/hud: add cpu graph support for WindowsBrian Paul2015-11-121-0/+54
| | | | | | | | | | We support "cpu" but not "cpu#" because there's no good way of querying per-cpu usage. Also, the cpu usage is for the process, not the whole system. Original code cobbled together by Brian and then fixed/polished by Jose. Signed-off-by: Brian Paul <[email protected]>
* vl: add drm support for vl_screenLeo Liu2015-11-083-1/+85
| | | | | | | | | | This will allow the state trackers to use render nodes with screen creation v2: dup fd for pipe loader Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* vl/buffers: add RGBX and BGRX to the supported formatsJulien Isorce2015-11-061-0/+18
| | | | | | | | | | Useful is one wants to create RGBX or BGRX surfaces. The infrastructure is such that it required just a few definitions to support these formats. Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian K<C3><B6>nig <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium: expose a debug message callback settable by context ownerIlia Mirkin2015-11-052-0/+34
| | | | | | | This will allow gallium drivers to send messages to KHR_debug endpoints Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* u_vbuf: minor code reformatting / line wrappingBrian Paul2015-11-041-4/+8
| | | | Trivial.
* u_vbuf: add some const qualifiersBrian Paul2015-11-041-2/+2
| | | | Trivial.
* util/indices: replace #define tokens with enum typeBrian Paul2015-11-043-86/+91
| | | | | | To ease debugging in gdb. Reviewed-by: Charmaine Lee <[email protected]>
* gallivm: fix sampling for s3tc srgb formats when using texture cacheRoland Scheidegger2015-11-041-1/+3
| | | | | | | | | This actually stored the values as 8bit linear values in the cache, then did another srgb->linear conversion... We don't want to do the former (decoding 8bit srgb values to 8bit linear completely defeats the purpose of srgb in the first place), so just decode to 8bit srgb. Fixes piglit.spec.ext_texture_srgb.texwrap formats-s3tc tests.
* llvmpipe: add cache for compressed texturesRoland Scheidegger2015-11-0412-8/+621
| | | | | | | | | | | | | | | | | | | | | | compressed textures are very slow because decoding is rather complex (and because there's no jit code code to decode them too for non-technical reasons). Thus, add some texture cache which holds a couple of decoded blocks. Right now this handles only s3tc format albeit it could be extended to work with other formats rather trivially as long as the result of decode fits into 32bit per texel (ideally, rgtc actually would decode to more than 8 bits per channel, but even then making it work for it shouldn't be too difficult). This can improve performance noticeably but don't expect wonders (uncompressed is unsurprisingly still faster). It's also possible it might be slower in some cases (using nearest filtering for example or if there's otherwise not many cache hits, the cache is only direct mapped which isn't great). Also, actual decode of a block relies on util code, thus even though always full blocks are decoded it is done texel by texel - this could obviously benefit greatly from simd-optimized code decoding full blocks at once... Note the cache is per (raster) thread, and currently only used for fragment shaders. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: disable f16c when not using AVXRoland Scheidegger2015-10-261-0/+3
| | | | | | | | | | | | | | | | | f16c intrinsic can only be emitted when AVX is used. So when we disable AVX due to forcing 128bit vectors we must not use this intrinsic (depending on llvm version, this worked previously because llvm used AVX even when we didn't tell it to, however I've seen this fail with llvm 3.3 since 718249843b915decf8fccec92e466ac1a6219934 which seems to have the side effect of disabling avx in llvm albeit it only touches sse flags really, but with ea421e919ae6e72e1319fb205c42a6fb53ca2f82 it's now really disabled). Albeit being able to use AVX with 128bit vectors also would have its uses, the code as is really was meant to emulate jit code creation for less capable cpus. v2: add some (ifdefed out) missing de-featuring options for simulating less capable cpus. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix tex offsets with mirror repeat linearRoland Scheidegger2015-10-241-4/+5
| | | | | | | | Can't see why anyone would ever want to use this, but it was clearly broken. This fixes the piglit texwrap offset test using this combination. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix sampling with texture offsets in SoA pathRoland Scheidegger2015-10-241-3/+8
| | | | | | | | | | | | | When using nearest filtering and clamp / clamp to edge wrapping results could be wrong for negative offsets. Fix this by adding the offset before doing the conversion to int coords (could also use floor instead of trunc int conversion but probably more complex on "typical" cpu). This fixes the piglit texwrap offset failures with this filter/wrap combo (which only leaves the linear/mirror repeat combination broken). Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* util/format: add helper util_format_is_snorm8Marek Olšák2015-10-242-0/+22
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* gallium/util: add a test for NULL fragment shadersMarek Olšák2015-10-241-0/+38
| | | | | | Just to validate that radeonsi doesn't crash. Reviewed-by: Michel Dänzer <[email protected]>
* gallivm: Explicitly disable unsupported CPU features.Jose Fonseca2015-10-231-38/+34
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92214 CC: "10.6 11.0" <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* virgl/vtest: add vtest driverDave Airlie2015-10-231-0/+12
| | | | | | | | | | | | | | | | | | | | | virgl/vtest is a swrast driver that allows the virgl acceleration to be tested without having a virtual machine. The backend has a unix socket server that this connects to. This is run by setting LIBGL_ALWAYS_SOFTWARE=y GALLIUM_DRIVER=virpipe In this mode all renderering is sent over a socket to the remote renderer, and the results are readback and copies to the screen using drisw. This works well enough to develop new features and to help debug. Signed-off-by: Dave Airlie <[email protected]>
* virgl: add driver for virtio-gpu 3D (v2)Dave Airlie2015-10-231-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | virgl is the 3D acceleration backend for the virtio-gpu shipping with qemu. The 3D acceleration is designed around gallium and TGSI as the virtualisation layer. The backend renderer translates the virgl interface into OpenGL currently. This is the initial import of the driver to mesa. The kernel driver portions are lined up for drm-next. Currently this driver supports up to GL3.3 and some misc extensions if the host driver exposes it. It is planned to iterate the virgl API to new GL levels as mesa host drivers gain features. v2: fix resource tracking across flushes to avoid ->bind hack in mapping. consolidate mapping and waiting code for transfers. use u_range for dirt tracking. handle larger shaders in protocol. include virtgpu_drm.h in mesa for now. add translation layer for gallium tgsi to virgl tgsi. Signed-off-by: Dave Airlie <[email protected]>
* tgsi: try and handle overflowing shaders. (v2)Dave Airlie2015-10-232-3/+9
| | | | | | | | | | This is used to detect error in virgl if we overflow the shader dumping buffers. v2: return a bool. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tgsi: add option to dump floats as hex valuesDave Airlie2015-10-233-2/+30
| | | | | | | | | | | This adds support to the parser to accept hex values as floats, and then adds support to the dumper to allow the user to select to dump float as 32-bit hex numbers. This is required to get accurate values for virgl use of TGSI. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallivm: Translate all util_cpu_caps bits to LLVM attributes.Jose Fonseca2015-10-221-2/+34
| | | | | | | | | | | | | | This should prevent disparity between features Mesa and LLVM believe are supported by the CPU. http://lists.freedesktop.org/archives/mesa-dev/2015-October/thread.html#96990 Tested on a i7-3720QM w/ LLVM 3.3 and 3.6. v2: Increase SmallVector initial size as suggested by Gustaw Smolarczyk. Reviewed-by: Roland Scheidegger <[email protected]> CC: "10.6 11.0" <[email protected]>
* draw: fix splitting of line loops (v2)Brian Paul2015-10-204-8/+32
| | | | | | | | | | | | | | | | | When the draw module splits long line loops, the sections are emitted as line strips. But the primitive type wasn't set correctly so each section was being drawn as a loop, introducing extra line segments. To fix this, we pass a new DRAW_LINE_LOOP_AS_STRIP flag to the run() function. The linear/elt_run() functions have to check for this flag and set their primitive type accordingly. No piglit regressions. Fixes piglit's lineloop with -count 4097 or higher. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81174 Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: add PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINTMarek Olšák2015-10-202-0/+4
| | | | | | | | | | | | | | This avoids a serious r600g bug leading to a GPU hang. The chances this bug will get fixed are pretty low now. I deeply regret listening to others and not pushing this patch, leaving other users with a GPU-crashing driver. Yes, it should be fixed in the compiler and it's ugly, but users couldn't care less about that. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86720 Cc: 11.0 10.6 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi/scan: use properties for clip/cull distance writemasksMarek Olšák2015-10-201-14/+14
| | | | | | No changes needed for drivers already relying on tgsi_shader_info. Reviewed-by: Brian Paul <[email protected]>
* gallium: add new properties for clip and cull distance usageMarek Olšák2015-10-201-0/+2
| | | | | | | | The TGSI usage mask can't be used, because these are declared as an output array of 2 elements. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm: implement the correct version of LRPMarek Olšák2015-10-171-6/+13
| | | | | | | | | The previous version has precision issues. This can be a problem with tessellation. Sadly, I can't find the article where I read it anymore. I'm not sure if the unsafe-fp-math flag would be enough to revert this. v2: added the comment
* gallivm: set correct opcode info from unary/binary/ternary emitsMarek Olšák2015-10-171-3/+6
| | | | | | | | and clear the emit_data structure. The new radeonsi min/max opcode implementation requires this. (it looks good according to Roland S.)
* tgsi: move pipe_shader_from_tgsi_processor function to utilMarek Olšák2015-10-172-24/+24
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* gallium/hud: fix possible NULL pointer dereferenceMarek Olšák2015-10-171-0/+3
| | | | Trivial.
* tgsi: initialize ctx.file in tgsi_dump_instruction()Brian Paul2015-10-161-0/+1
| | | | | Fixes segfault because of uninitialized file pointer. Trivial.
* gallium/util: fix debug_get_flags_option on 32-bit harderRob Clark2015-10-151-3/+3
| | | | | | | | (yes, we want PRI?64, but we want the x version rather than the u version) Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* u_vbuf: fix vb slot assignment for translated buffersNicolai Hähnle2015-10-121-0/+1
| | | | | | | | | | | Vertex attributes of different categories (constant/per-instance/ per-vertex) go into different buffers for translation, and this is now properly reflected in the vertex buffers passed to the driver. Fixes e.g. piglit's point-vertex-id divisor test. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>