summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | gallium/tgsi: Split sampler views from shader resources.Francisco Jerez2012-05-1112-107/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit splits the current concept of resource into "sampler views" and "shader resources": "Sampler views" are textures or buffers that are bound to a given shader stage and can be read from in conjunction with a sampler object. They are analogous to OpenGL texture objects or Direct3D SRVs. "Shader resources" are textures or buffers that can be read and written from a shader. There's no support for floating point coordinates, address wrap modes or filtering, and, unlike sampler views, shader resources are global for the whole graphics pipeline. They are analogous to OpenGL image objects (as in ARB_shader_image_load_store) or Direct3D UAVs. Most hardware is likely to implement shader resources and sampler views as separate objects, so, having the distinction at the API level simplifies things slightly for the driver. This patch introduces the SVIEW register file with a declaration token and syntax analogous to the already existing RES register file. After this change, the SAMPLE_* opcodes no longer accept a resource as input, but rather a SVIEW object. To preserve the functionality of reading from a sampler view with integer coordinates, the SAMPLE_I(_MS) opcodes are introduced which are similar to LOAD(_MS) but take a SVIEW register instead of a RES register as argument.
* | gallivm: implement iabs/issg opcode.Dave Airlie2012-05-092-1/+26
| | | | | | | | | | | | Reimplemented by Olivier Galibert <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* | radeon/llvm: add support for TXQ/TXF/DDX/DDY instructionsVadim Girlin2012-05-081-2/+0
| | | | | | | | Signed-off-by: Vadim Girlin <[email protected]>
* | auxiliary/os: Add missing signal.h include.Baldo Davide2012-05-051-0/+1
| | | | | | | | | | | | | | | | The signal.h include was missed in the commit bc16c73407d11bb6702cf7de9925bfaeb80a5272 which leads to broken compilations under Linux. Signed-off-by: José Fonseca <[email protected]>
* | gallivm: fix comment typoBrian Paul2012-05-041-1/+1
| |
* | gallivm: Use debug_printf in lp_build_printf.José Fonseca2012-05-021-6/+9
| | | | | | | | | | | | | | So that its output can be seen on GUI window apps. Tested-by: James Benton <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* | gallivm: Avoid LLVMAddGlobalMapping() in lp_bld_assert().José Fonseca2012-05-022-26/+16
| | | | | | | | Brittle, complex, and unecesary. Just use function pointer constant.
* | gallivm: Add a lp_build_const_func_pointer() helper.José Fonseca2012-05-023-15/+44
| | | | | | | | To be reused in all places where we want to call C code.
* | gallivm: Cleanup/simplify lp_build_const_string_variable.José Fonseca2012-05-025-29/+29
| | | | | | | | | | | | | | - Move to lp_bld_const where it belongs - Rename to lp_build_const_string - take the length from the argument (and don't count the zero terminator twice) - bitcast the constant to generic i8 *
* | gallivm: Added lp_build_const_mask_aos_swizzledJames Benton2012-05-023-2/+30
| | | | | | | | | | | | | | | | | | | | Allows the creation of const aos masks which have the mask swizzled to match the correct format. Updated existing mask creation code to use the swizzled version where necessary (tgsi register masks and llvmpipe aos blending). Signed-off-by: José Fonseca <[email protected]>
* | gallivm: Move loop var declaration to beginning of scope.José Fonseca2012-05-021-1/+3
| |
* | gallivm: added a debug function which allows llvm to print vectors of 16 ↵James Benton2012-05-022-0/+29
| | | | | | | | | | | | | | | | unsigned ints This is useful for debugging the linear llvm path as it handles pixels in this format Signed-off-by: José Fonseca <[email protected]>
* | llvmpipe: Check when a shader does not satisfy 0 < imm < 1.James Benton2012-05-022-2/+11
| | | | | | | | Signed-off-by: José Fonseca <[email protected]>
* | gallivm: fixed memory leak in lp_build_tgsi_aosJames Benton2012-05-021-0/+1
| | | | | | | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* | llvmpipe: Added support for color masks in AoS blending.James Benton2012-05-021-0/+13
| | | | | | | | Signed-off-by: José Fonseca <[email protected]>
* | gallivm: added aligned pointer get/setJames Benton2012-05-024-0/+81
| |
* | gallivm: llvm c-style for loops, allows us to create loops with conditions ↵James Benton2012-05-022-0/+94
|/ | | | on entry, rather than condition check on loop
* u_vbuf: unbind vertex buffers on destroyMarek Olšák2012-04-291-0/+2
|
* u_blitter: fix resource leakMarek Olšák2012-04-291-0/+1
|
* gallivm: Use lp_build_alloca instead of LLVMBuildAlloca on the loop limiter.José Fonseca2012-04-251-4/+1
| | | | | | | To ensure that the alloca is at the top of the function body, otherwise LLVM will not eliminate them, causing stack misalignment on 32bits. Reviewed-by: James Benton <[email protected]>
* u_vbuf: don't call u_vbuf_upload_buffers if there's nothing to uploadMarek Olšák2012-04-241-2/+8
|