summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* u2f_emit: Fix type parameter in LLVM call.Olivier Galibert2012-06-261-1/+1
| | | | | | | | The type is the destination type (i.e. float vector) and not the source type. Fixes piglit fs-{in,de}crement-uint. Signed-off-by: Olivier Galibert <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* u_blitter: disable streamout before renderingMarek Olšák2012-06-261-0/+10
| | | | | | This fixes piglit EXT_transform_feedback tests: - intervening-read output - intervening-read prims_written
* draw: Handle the case when there isn't a fragment shader.Olivier Galibert2012-06-221-10/+17
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* llvmpipe: Add vertex id support.Olivier Galibert2012-06-193-18/+38
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Simplify and fix system variables fetch.Olivier Galibert2012-06-193-77/+32
| | | | | | | | | | | | | | The system array values concept doesn't really because it expects the system values to be fixed per call, which is wrong for gl_VertexID and iffy for gl_SampleID. So this patch does two things: - kill the array, have emit_fetch_system_value directly pick the values it needs (only gl_InstanceID for now, as the previous code) - correctly handle the expected type in emit_fetch_system_value Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw: fix flat shading and screen-space linear interpolation in clipperOlivier Galibert2012-06-191-31/+113
| | | | | | | | | | | | | | | This includes: - picking up correctly which attributes are flatshaded and which are noperspective - copying the flatshaded attributes when needed, including the non-built-in ones - correctly interpolating the noperspective attributes in screen-space instead than in a 3d-correct fashion. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw: Ensure that the vertex_header type size matches expectation.José Fonseca2012-06-181-0/+3
| | | | | | | | | This is failing sometimes, probably because TargetData keeps a structure layout cache, which can becomes bogus, ever since the InvalidateStructLayoutInfo API was removed in LLVM r135245. This change merely makes the problem easier to diagnose (an assertion failure instead of a random crash).
* gallium: Add TGSI_OPCODE_F2U to gallivm backend.Paul Berry2012-06-151-0/+13
| | | | | | | | Note: for the moment TGSI_OPCODE_F2U is implemented using lp_build_itrunc() (the same function used to implement TGSI_OPCODE_F2I). In the long run, we should create an lp_build_utrunc() function to do the proper conversion. But this should allow us to limp along with mostly correct behaviour for now.
* rbug: fix make process on Linux Mint 13 x64.Aaron Watry2012-06-1412-20/+20
| | | | | | | | | | | | | | | | | | | Previously, rbug_*.c would fail to compile with incomplete prototype errors when make was run from the command line on my machine. My IDE always built fine, and still does after this patch (Netbeans 7.1.2). Most of the includes from files in gallium/auxiliary/rbug/* were assuming an rbug/ subdirectory, while the headers are actually in the same directory as the .c files. The build error was also previously a problem for me on Ubuntu 11.10 and Mint 12. Fixes build for the following configuration: ./autogen.sh --enable-debug --enable-texture-float --with-gallium-drivers=r600 --with-dri-drivers=radeon --enable-r600-llvm-compiler Signed-off-by: Brian Paul <[email protected]>
* util: add some comments, fix indentationBrian Paul2012-06-131-1/+5
|
* gallivm: Fix calculating rho for 3d textures for the single-quad caseRoland Scheidegger2012-06-081-2/+1
| | | | | | Discovered by accident, this looks like a very old typo bug. Signed-off-by: José Fonseca <[email protected]>
* draw: simplify index buffer specificationBrian Paul2012-05-315-43/+24
| | | | | Replace draw_set_index_buffer() and draw_set_mapped_index_buffer() with draw_set_indexes() which simply takes a pointer and an index size.
* draw: fix primitive restart bug by using the index buffer offsetBrian Paul2012-05-251-3/+6
| | | | | | | | | | | The code which scans the index buffer for restart indexes wasn't adding the index buffer offset so we were always starting at offset=0. The offset is usually zero so it wasn't noticed before. Fixes a failure in the piglit primitive-restart test when testing vertex data + index data in a single VBO. NOTE: This is a candidate for the 8.0 branch.
* util: add GALLIUM_LOG_FILE option for logging output to a fileBrian Paul2012-05-252-6/+25
| | | | Useful for logging different runs to files and diffing, etc.
* tgsi: Initialize Padding struct fields.Vinson Lee2012-05-231-0/+4
| | | | | | | Fix uninitialized scalar variable defects report by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm: Fixed erroneous optimisation in lp_build_min/max.James Benton2012-05-211-7/+14
| | | | | | | | Previously assumed normalised was 0 to 1, but it can be -1 to 1 if type is signed. Tested with lp_test_conv and lp_test_format, reduced errors. Signed-off-by: José Fonseca <[email protected]>
* gallivm: Compensate for lp_const_offset in lp_build_conv.James Benton2012-05-211-4/+31
| | | | | | | Fixing a /*FIXME*/ to remove errors in integer conversion in lp_build_conv. Tested using lp_test_conv and lp_test_format, reduced errors. Signed-off-by: José Fonseca <[email protected]>
* gallivm: Fixed overflow in lp_build_clamped_float_to_unsigned_norm.James Benton2012-05-211-1/+1
| | | | | | Tested with lp_test_conv and lp_test_format, reduced errors. Signed-off-by: José Fonseca <[email protected]>
* gallium/tgsi/text: Ensure ret is initialized in parse_immediate_data.Vinson Lee2012-05-171-0/+4
| | | | | | | Fix uninitialized scalar variable defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Fix fetching integer inputs.José Fonseca2012-05-181-0/+8
|
* llvmpipe: Implement TXQ.Olivier Galibert2012-05-186-6/+204
| | | | | | | | | | Piglits test for fragment shaders pass, vertex shaders fail. The actual failure seems to be in the interpolators, and not the textureSize query. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallium/auxiliary/pipe-loader: Fix usage of anonymous union.Francisco Jerez2012-05-162-7/+7
| | | | | | | | | Anonymous unions aren't part of the C99 standard. Fixes build on GCC versions older than 4.6. https://bugs.freedesktop.org/show_bug.cgi?id=50001 Reported-by: Michael Lange <[email protected]>
* draw,llvmpipe: Avoid named struct types on LLVM 3.0 and later.José Fonseca2012-05-161-20/+4
| | | | | | | | | | | | Starting with LLVM 3.0, named structures are meant not for debugging, but for recursive data types, previously also known as opaque types. The recursive nature of these types leads to several memory management difficulties. Given that we don't actually need recursive types, avoid them altogether. This is an attempt to address fdo bugs 41791 and 44466. The issue is somewhat random so there's no easy way to check how effective this is.
* gallivm: Add MCRegisterInfo.h to silence benign warnings about missing ↵José Fonseca2012-05-151-0/+3
| | | | | | implementation. Trivial.
* gallivm: Fix lp_build_sgn for normalized/fixed-point integers.José Fonseca2012-05-151-1/+2
| | | | | These types got broken with the recent commit that fixed lp_build_sgn for negative integers.
* gallivm: Fix lp_build_const_xxx for negative integers.José Fonseca2012-05-151-5/+6
| | | | | | Do proper rounding. Thanks to Olivier Galibert for investigating this.
* Add .gitignore files for recently-added gallium projectsPaul Berry2012-05-151-0/+1
| | | | | | | This patch adds .gitignore files to ignore the makefiles generated by the gallium pipe loader and the clover OpenCL state tracker. Reviewed-by: Francisco Jerez <[email protected]>
* vl: Initialize pipe_vertex_buffer.user_buffer fields.Vinson Lee2012-05-141-0/+4
| | | | | | | Fix uninitialized scalar variable defects reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallium: remove user_buffer_create from the interfaceMarek Olšák2012-05-122-9/+1
| | | | Nothing uses it now.
* gallium/graw: stop using user_buffer_createMarek Olšák2012-05-121-0/+13
| | | | This is compile-tested.
* gallium/util: remove unused parameter nr_vertex_buffers in util_draw_max_indexMarek Olšák2012-05-123-3/+0
|
* auxiliary/util: Ensure pipe_constant_buffer::user_buffer is initialized.José Fonseca2012-05-121-0/+1
|
* gallivm: Fix copy'n'paste typo bug translating CEIL opcode.José Fonseca2012-05-111-2/+2
| | | | Trivial.
* Merge branch 'gallium-userbuf'Marek Olšák2012-05-1114-81/+154
|\ | | | | | | | | | | | | | | Conflicts: src/gallium/docs/source/screen.rst src/gallium/drivers/nv50/nv50_state.c src/gallium/include/pipe/p_defines.h src/mesa/state_tracker/st_draw.c
| * u_vbuf: set user buffer pointer for drivers which support user buffersMarek Olšák2012-05-011-0/+2
| | | | | | | | | | It's not common to end up in u_vbuf and at the same time support user buffers in a driver, but such a combination should work.
| * st/vega: don't use user_buffer_createMarek Olšák2012-04-302-0/+24
| |
| * cso: cso_context should install u_vbuf by itself and not st/mesaMarek Olšák2012-04-302-7/+23
| | | | | | | | so that it's installed in the other state trackers too
| * gallium/util: stop using user buffers in util_draw_texquadMarek Olšák2012-04-301-2/+3
| |
| * gallium: add void *user_buffer in pipe_index_bufferMarek Olšák2012-04-303-45/+69
| | | | | | | | | | | | | | Adapted drivers: i915, llvmpipe, r300, r600, radeonsi, softpipe. User index buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
| * gallium: remove pipe_context::redefine_user_bufferMarek Olšák2012-04-302-13/+0
| |
| * gallium: add void *user_buffer in pipe_vertex_bufferMarek Olšák2012-04-303-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | This reduces CPU overhead in st_draw_vbo and removes a lot of unnecessary code in that function which was required only to comply with the gallium interface, but wasn't any useful really. Adapted drivers: i915, llvmpipe, r300, softpipe. No changes required in: r600, radeonsi. User vertex buffers have been disabled in nv30, nv50, nvc0 and svga to keep things working.
| * gallium: change set_constant_buffer to be UBO-friendlyMarek Olšák2012-04-303-3/+18
| |
* | gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/José Fonseca2012-05-111-2/+2
| | | | | | | | | | | | For consistency. Reviewed-by: Brian Paul <[email protected]>
* | gallium/tgsi: Redefine the TGSI_TEXTURE_UNKNOWN texture target.José Fonseca2012-05-113-3/+4
| | | | | | | | | | | | | | | | | | Some code relies on the existing of an invalid texture target. It seems safer to bring it back than to deal with unintended consequences. This partially reverts commit a4ebb04214bab1cd9bd41967232ec89441e31744. Reviewed-by: Brian Paul <[email protected]>
* | gallium: Add pipe loader for device enumeration and driver multiplexing.Francisco Jerez2012-05-118-0/+666
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to have a uniform interface to create winsys and pipe_screen instances for any driver, exposing the device enumeration capabilities that might be supported by the operating system (for now there's a "drm" back-end using udev and a "sw" back-end that always returns the same built-in devices). The typical use case of this library will be: > > struct pipe_loader_device devs[n]; > struct pipe_screen *screen; > > pipe_loader_probe(&devs, n); >[pick some device from the array...] > > screen = pipe_loader_create_screen(dev, library_search_path); >[do something with screen...] > > screen->destroy(screen); > pipe_loader_release(&devs, N); > A part of the code was taken from targets/gbm/pipe_loader.c, which will be removed and replaced with calls into this library by a future commit.
* | gallium/tgsi/text: Replace open-coded integer parsing with parse_int().Francisco Jerez2012-05-111-17/+3
| |
* | gallium/tgsi/text: Parse immediates of non-float data types.Francisco Jerez2012-05-111-18/+48
| |
* | gallium/tgsi: Fix tgsi_build_full_immediate() for non-float data types.Francisco Jerez2012-05-111-22/+8
| |
* | gallium/tgsi/text: Make label parsing optional for branch instructions.Francisco Jerez2012-05-111-10/+9
| | | | | | | | | | Structured branch instructions like IF, ELSE, BGNLOOP, ENDLOOP no longer require a label argument, make it optional for them.
* | gallium/tgsi/ureg: Support local temporary emission.Francisco Jerez2012-05-112-6/+60
| |