summaryrefslogtreecommitdiff
path: root/src/gallium/tests
AgeCommit message (Collapse)AuthorFilesLines
2014-05-23Make DRI dependencies and build depend on the targetJon TURNEY1-1/+1
- Don't require xcb-dri[23] etc. if we aren't building for a target with DRM, as we won't be using dri[23] - Enable a more fine-grained control of what DRI code is built, so that a libGL using direct swrast can be built on targets which don't have DRM. The HAVE_DRI automake conditional is retired in favour of a number of other conditionals: HAVE_DRI2 enables building of code using the DRI2 interface (and possibly DRI3 with HAVE_DRI3) HAVE_DRISW enables building of DRI swrast HAVE_DRICOMMON enables building of target-independent DRI code, and also enables some makefile cases where a more detailled decision is made at a lower level. HAVE_APPLEDRI enables building of an Apple-specific direct rendering interface, still which requires additional fixing up to build properly. v2: Place xfont.c and drisw_glx.c into correct categories. Update 'make check' as well Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-25gallium/tests: conditionally include sw/dri winsysEmil Velikov1-1/+5
In all fairness we allow the gallium tests to be build with --disable-dri which will result in the approapriate winsys to not be build, thus the build will fail. ./configure --disable-dri --with-gallium-drivers=svga --enable-gallium-tests Cc: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-25automake: cleanup pipe-loader handling when using sw/xlib winsysEmil Velikov1-1/+1
Rather than defining our own set of variables, use NEED_WINSYS_XLIB and based on it include the sw/xlib winsys. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-05automake: introduce GALLIUM_COMMON_LIB_DEPSEmil Velikov2-6/+2
Rather than copying the core four dependencies all over gallium, introduce the above variable to avoid all the duplication. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76848 Tested-by: Vinson Lee <vlee@freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-24pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIBEmil Velikov1-0/+7
The above function implies using the the xlib winsys, which has additional library dependencies that should not be forced. Make the software xlib pipe loader optional thus avoid all the dependency hell. A user that wishes to use the particular pipe-loader would need to set the following within configure.ac. enable_gallium_xlib_loader=yes v2: - Wrap sw/xlib/xlib_sw_winsys.h to handle compilation on systems lacking X11 headers. Spotted by Christian Prochaska. Tested-by: Tom Stellard <thomas.stellard@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-22pipe-loader: introduce pipe_loader_sw_probe_dri helperEmil Velikov1-0/+1
Will be used in the following commits. v2: Link gallium tests against the library. v3: Handle dri_create_sw_winsys failure v4: Rebase on top of the targets/xa changes Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v2)
2014-02-16pipe-loader: split out "client" versionRob Clark1-2/+2
Build two versions of pipe-loader, with only the client version linking in x11 client side dependencies. This will allow the XA state tracker to use pipe-loader. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-02-11gallium/tests: do not link against libudevEmil Velikov1-1/+0
Previously the linking was required due to dependency of udev in the pipe-loader. Now this is no longer the case, as we dlopen the library. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-06gallium: remove PIPE_USAGE_STATICMarek Olšák18-21/+21
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-23gallium: Use C11 thread abstractions.José Fonseca1-1/+1
Note that PIPE_ROUTINE now returns an int. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-12-13swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie9-9/+9
This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> swrast: add support for copy_sub_buffer
2013-11-25llvmpipe: support 8bit subpixel precisionZack Rusin2-0/+175
8 bit precision is required by d3d10 but unfortunately requires 64 bit rasterizer. This commit implements 64 bit rasterization with full support for 8bit subpixel precision. It's a combination of all individual commits from the llvmpipe-rast-64 branch. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-10-23gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul8-10/+10
The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-10-09gallium: Add support for 32x32 muls with 64 bit resultsZack Rusin2-0/+24
The code introduces two new 32bit integer multiplication opcodes which can be used to produce correct 64 bit results. GLSL, OpenCL and D3D10+ require them. We use two seperate opcodes, because they match the behavior of GLSL and OpenCL, are a lot easier to add than a single opcode with multiple destinations and because there's not much (any) difference wrt code-generation. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-10-03gallium/tests: fix SHADER typoBrian Paul1-1/+1
2013-10-03gallium/tests: use pipe_context::bind_sampler_states()Brian Paul8-9/+13
2013-06-28gallium/tests: fix the translate testZack Rusin1-4/+4
2013-06-24tests/graw: Fix typo in shader-leak.cJosé Fonseca1-1/+1
2013-06-24gallium: Fix llvmpipe on big-endian machinesAdam Jackson8-17/+17
Squashed commit of the following: commit 0857a7e105bfcbc4d1431b2cc56612094c747ca3 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:07 2013 -0400 gallivm: Fix lp_build_rgba8_to_fi32_soa for big endian Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 0d65131649a8aa140e2db228ba779d685c4333e3 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:07 2013 -0400 gallivm: Fix big-endian machines This adds a bit-shift count to the format table, and adds the concept of vector or bitwise alignment on gathers. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 9740bda9b7dc894b629ed38be9b51059ce90818f Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:07 2013 -0400 llvmpipe: Fix convert_to_blend_type on big-endian Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit ae037c2de0f029e4e99371c0de25560484f0d8df Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 util: Convert color pack to packed formats This fixes them on big-endian. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 5b05ac0c89ae092ea8ba5bba9f739708d7396b5c Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 graw-xlib: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 51396e7d098cb6ff794391cf11afe4dbf86dbea0 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 format: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 417b60bc66eb450e68a92ab0e47f76e292b385e6 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 18 12:25:06 2013 -0400 st/dri: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 0934b2e022a5e0847d312c40734e2b44cac52fd8 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 st/xlib: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit a307ea3c3716a706963acce7966b5e405ba11db9 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 gbm: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 53eebdd253e1960a645ea278f31d7ef6a6cf4aeb Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 tests: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 2f77fe3ee524945eacd546efcac34f7799fb3124 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 18 13:07:37 2013 -0400 gallium: Document packed formats Signed-off-by: Adam Jackson <ajax@redhat.com> commit 1f1017159ce951f922210a430de9229f91f62714 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 gallium: Introduce 32-bit packed format names These are for interacting with buffers natively described in terms of bit shifts, like X11 visuals: uint32_t xyzw8888 = (x << 0) | (y << 8) | (z << 16) | (w << 24); Define these in terms of (endian-dependent) aliases to the array-style format names. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 6cc7ab1ee66ed668da78c1d951dfd7782b4e786a Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 3 12:10:32 2013 -0400 gallium: Document format name conventions v2: - Fix a channel name thinko (Michel Dänzer) - Elaborate on SCALED versus INT - Add links to DirectX and FOURCC docs Signed-off-by: Adam Jackson <ajax@redhat.com> commit df4d269e7fb62051a3c029b84147465001e5776e Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 18 12:25:06 2013 -0400 gallivm: Remove all notion of byte-swapping Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-06-13gallium/util: make WRITES_ALL_CBUFS optional in the passthrough fragment shaderMarek Olšák1-1/+1
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-25gallium: Add support for multiple viewportsZack Rusin8-8/+8
Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-14graw/tgsi_dump: Fix gdb macro.José Fonseca1-2/+2
The macro was relying on "tokens" local variable to exist.
2013-04-30build: Remove libpipe_loader.la from GALLIUM_PIPE_LOADER_LIBS.Matt Turner1-0/+1
Tested-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-30build: Remove libws_null.la from GALLIUM_PIPE_LOADER_LIBS.Matt Turner1-0/+1
Tested-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-25graw: Set the vertex shader constant buffer.José Fonseca1-1/+1
We were setting the fragment shader, which wasn't needed.
2013-04-25graw: Simple utilities to dump and disassemble TGSI tokens.José Fonseca3-0/+97
Useful for core dumps, where calling tgsi_dump() from gdb is not an alternative.
2013-04-23gallium: Replace gl_rasterization_rules with lower_left_origin and ↵José Fonseca12-12/+24
half_pixel_center. Squashed commit of the following: commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852 Author: José Fonseca <jfonseca@vmware.com> Date: Tue Apr 23 17:37:18 2013 +0100 gallium: s/lower_left_origin/bottom_edge_rule/ commit 4dff4f64fa83b9737def136fffd161d55e4f1722 Author: José Fonseca <jfonseca@vmware.com> Date: Tue Apr 23 17:35:04 2013 +0100 gallium: Move diagram to docs. commit 442a63012c8c3c3797f45e03f2ca20ad5f399832 Author: James Benton <jbenton@vmware.com> Date: Fri May 11 17:50:55 2012 +0100 gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center. This change is necessary to achieve correct results when using OpenGL FBOs. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-04-22gallivm: Fix assignment of unsigned values to OUT register.José Fonseca1-0/+9
TEMP is not the only register file that accept unsigned. OUT too. Actually, what determines the appropriate type of the destination value is not the opcode, but rather the register. Also cleanup/simplify code. Add a few more asserts, but also make code more robust by handling graceful if assert fails. This fixes segfault / assertion in the included vert-uadd.sh graw shader. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-04-15build: Build pipe-loader before gallium testsMatt Turner1-4/+0
And don't build it from other Makefiles. That's awful, and breaks distclean. Tested-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-04-04llvmpipe: implement ucmpZack Rusin1-0/+11
and add a test for it Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-27graw/gs: add missing max output vertices to all testsZack Rusin4-0/+4
A few tests were missing this crucial property. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-03-12gallium/tests: check format in compute tests, make selectableChristoph Bumiller1-17/+52
2013-01-15gallium/util: fix glClear with MRT by making the FS write to all cbufsMarek Olšák1-1/+2
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-10gallium/tests/unit: Convert to automakeAndreas Boll2-49/+34
2013-01-10gallium/tests/trivial: Convert to automakeAndreas Boll2-54/+34
2013-01-04gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák18-18/+18
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 <brianp@vmware.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2012-12-21gallium/tests: fix build breakage after pipe_surface::usage removalMarek Olšák1-1/+0
2012-12-12gallium: remove pipe_surface::usageMarek Olšák11-12/+0
Not really used by anybody now. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-27gallium/tests/trivial: updates for transfer functions changesAndreas Boll1-10/+4
Fixes build error with configure option --enable-gallium-tests introduced in 369e46888904c6d379b8b477d9242cff1608e30e Compile tested only. Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-11-27gallium/tests/trivial: updates for CSO interface changesAndreas Boll1-2/+2
Fixes build error with configure option --enable-gallium-tests introduced in ea6f035ae90895bd4ee3247408eb179dfdf96d22 Cc: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-11-27gallium/tests/trivial: updates for util_draw_vertex_buffer changesAndreas Boll2-2/+2
Fixes build error with configure option --enable-gallium-tests introduced in e73bf3b805de78299f1a652668ba4e6eab9bac94 Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-11-21gallium/tests: update .gitignore filesAndreas Boll2-0/+7
2012-10-31gallium: add start_slot parameter to set_vertex_buffersMarek Olšák15-15/+15
This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-26graw/fs-test: Use user constant buffers.José Fonseca1-56/+14
Much simpler. More interesting.
2012-10-26graw: Ensure new members are zeroed.José Fonseca14-0/+16
Several new state members were added, and they were not being zeroed, causing random crashes.
2012-10-26tests/graw: Update occlusion query example.José Fonseca1-4/+4
2012-10-25tests: Use printf instead of debug_printf in u_format_compatible_test.Vinson Lee1-1/+1
Use printf instead of debug_printf to be consistent with print statements in rest of unit tests. This also fixes the lack of print output with the MinGW build of u_format_compatible_test. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-17tgsi: Add support to parse IMM[x] too.José Fonseca1-2/+2
Thanks to Brian for pointing this out.
2012-10-11gallium: unify transfer functionsMarek Olšák6-38/+18
"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 <brianp@vmware.com>
2012-09-05Use the correct macro _WIN32 for Windows.Vinson Lee3-3/+3
The correct predefined macro for Windows is _WIN32, not WIN32 or __WIN32__. _WIN32 is defined for 32-bit and 64-bit version of Windows by both MSVC and MinGW compilers. http://sourceforge.net/p/predef/wiki/OperatingSystems http://msdn.microsoft.com/en-us/library/b0084kay.aspx This patch also fixes a MinGW automake build error. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>