summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | gallium/tgsi/ureg: Lift the restriction on releasing temporaries over ↵Francisco Jerez2012-05-111-27/+22
| | | | | | | | UREG_MAX_TEMP.
* | gallium/util: Define util_strchrnul.Francisco Jerez2012-05-111-6/+18
| | | | | | | | Reviewed-by: Jakob Bornecrantz <[email protected]>
* | gallium/tgsi: Introduce the "LOCAL" register declaration modifier.Francisco Jerez2012-05-113-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change will be useful to implement function parameter passing on top of TGSI. As we don't have a proper stack, a register-based calling convention will be used instead, which isn't necessarily a bad thing given that GPUs often have plenty of registers to spare. Using the same register space for local temporaries and inter-procedural communication caused some inefficiencies, because in some cases the register allocator would lose the freedom to merge temporary values together into the same physical register, leading to suboptimal register (and sometimes, as a side effect, instruction) usage. The LOCAL declaration modifier specifies that the value isn't intended for parameter passing and as a result the compiler doesn't have to give any guarantees of it being preserved across function boundaries. Ignoring the LOCAL flag doesn't change the semantics of a valid program in any way, because local variables are just supposed to get a more relaxed treatment. IOW, this should be a backwards-compatible change.
* | gallium/tgsi: Add support for atomic opcodes.Francisco Jerez2012-05-111-1/+12
| |
* | gallium/tgsi: Add support for barriers.Francisco Jerez2012-05-111-0/+4
| |
* | gallium/tgsi: Define system values used to query the compute grid parameters.Francisco Jerez2012-05-111-1/+5
| |
* | gallium/tgsi: Add resource write-back support.Francisco Jerez2012-05-114-0/+11
| | | | | | | | | | Define a new STORE opcode with a role dual to the LOAD opcode, and add flags to specify that a shader resource is intended for writing.
* | gallium/tgsi: Add support for raw resources.Francisco Jerez2012-05-113-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normal resource access (e.g. the LOAD TGSI opcode) is supposed to perform a series of conversions to turn the texture data as it's found in memory into the target data type. In compute programs it's often the case that we only want to access the raw bits as they're stored in some buffer object, and any kind of channel conversion and scaling is harmful or inefficient, especially in implementations that lack proper hardware support to take care of it -- in those cases the conversion has to be implemented in software and it's likely to result in a performance hit even if the pipe_buffer and declaration data types are set up in a way that would just pass the data through. Add a declaration flag that marks a resource as typeless. No channel conversion will be performed in that case, and the X coordinate of the address vector will be interpreted in byte units instead of elements for obvious reasons. This is similar to D3D11's ByteAddressBuffer, and will be used to implement OpenCL's constant arguments. The remaining four compute memory spaces can also be understood as raw resources.
* | gallium/tgsi: Define the TGSI_BUFFER texture target.Francisco Jerez2012-05-113-3/+3
| | | | | | | | | | | | This texture type was already referred to by the documentation but it was never defined. Define it as 0 to match the pipe_texture_target enumeration values.
* | gallium/tgsi: Introduce the compute processor.Francisco Jerez2012-05-114-4/+8
| |
* | gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.Francisco Jerez2012-05-1113-52/+105
| | | | | | | | | | | | Move Interpolate, Centroid and CylindricalWrap from tgsi_declaration to a separate token -- they only make sense for FS inputs and we need room for other flags in the top-level declaration token.