aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'gallium-userbuf'Marek Olšák2012-05-1186-560/+599
|\ | | | | | | | | | | | | | | 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
| * svga: check for and skip null vertex buffer pointersBrian Paul2012-05-011-8/+12
| | | | | | | | | | | | Fixes regressions with google earth and other things. Reviewed-by: José Fonseca <[email protected]>
| * softpipe: cast away const to silence warningBrian Paul2012-05-011-1/+2
| |
| * svga: cast away const to silence warningBrian Paul2012-05-011-1/+2
| |
| * 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/xorg: don't use user_buffer_createMarek Olšák2012-04-301-51/+16
| |
| * st/xa: don't use user_buffer_createMarek Olšák2012-04-301-44/+15
| |
| * st/vega: don't use user_buffer_createMarek Olšák2012-04-304-36/+34
| |
| * st/vega: use cso_draw_arraysMarek Olšák2012-04-301-3/+3
| |
| * 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
| * st/xorg: fix compilation - wrong libkms include fileMarek Olšák2012-04-302-2/+2
| |
| * gallium/util: stop using user buffers in util_draw_texquadMarek Olšák2012-04-301-2/+3
| |
| * gallium: remove pipe_resource::user_ptrMarek Olšák2012-04-3010-23/+0
| | | | | | | | It's unused now.
| * radeonsi: don't create temporary user buffer for r600_upload_const_bufferMarek Olšák2012-04-303-32/+25
| |
| * gallium: add void *user_buffer to pipe_constant_bufferMarek Olšák2012-04-3017-18/+108
| | | | | | | | This reduces CPU overhead when updating constants.
| * gallium: add void *user_buffer in pipe_index_bufferMarek Olšák2012-04-3022-108/+144
| | | | | | | | | | | | | | 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-3021-131/+0
| |
| * gallium: add void *user_buffer in pipe_vertex_bufferMarek Olšák2012-04-3013-22/+42
| | | | | | | | | | | | | | | | | | | | | | | | 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-3031-90/+130
| |
| * gallium: add PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENTMarek Olšák2012-04-3012-1/+28
| | | | | | | | | | | | | | | | This is required for any serious constant buffer support. Constant buffer offsets on ATI and NVIDIA DX10 and DX11 GPUs must be a multiple of 256. In OpenGL, this can be queried via GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT.
| * gallium: add PIPE_CAP_USER_INDEX_BUFFERS and PIPE_CAP_USER_CONSTANT_BUFFERSMarek Olšák2012-04-3012-0/+28
| |
* | gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/José Fonseca2012-05-113-5/+4
| | | | | | | | | | | | For consistency. Reviewed-by: Brian Paul <[email protected]>
* | gallium/tgsi: Redefine the TGSI_TEXTURE_UNKNOWN texture target.José Fonseca2012-05-115-4/+8
| | | | | | | | | | | | | | | | | | 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]>
* | llvmpipe: Fix triangle bounding box calculation to be correctly inclusive or ↵James Benton2012-05-111-8/+6
| | | | | | | | | | | | | | | | exclusive Tested with custom rasterisation test tool added to piglit suite, reduced errors Signed-off-by: José Fonseca <[email protected]>
* | llvmpipe: Change triangle rasterization comparison from < 0 to <= 0James Benton2012-05-111-1/+8
| | | | | | | | | | | | Tested with custom rasterisation test tool added to piglit suite, reduced errors Signed-off-by: José Fonseca <[email protected]>
* | clover: Implement CL_MEM_COPY_HOST_PTR.Francisco Jerez2012-05-114-7/+20
| |
* | gallium/targets/pipe-loader: Prepend DESTDIR to the installation directory.Alexey Shvetsov2012-05-111-2/+2
| | | | | | | | Signed-off-by: Alexey Shvetsov <[email protected]>
* | clover: Import OpenCL state tracker.Francisco Jerez2012-05-1143-1/+8002
| |
* | gallium/tests/trivial: Import compute unit tests.Francisco Jerez2012-05-112-1/+1594
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test program that tries to exercise some of the language features commonly used by compute programs at the Gallium API level: - Correctness of the values returned by the grid parameters. - Proper functioning of resource LOADs and STOREs. - Subroutine calls. - Argument passing to the compute parameter through the INPUT memory space. - Mapping of buffer objects to the GLOBAL memory space. - Proper functioning of the PRIVATE and LOCAL memory spaces. - Texture sampling and constant buffers. - Support for multiple kernels in the same program. - Indirect resource indexing. - Formatted resource loads and stores (i.e. with channel conversion and scaling) using several different formats. - Proper functioning of work-group barriers. - Atomicity and semantics of the atomic opcodes. As of now all of them seem to pass on my nvA8.
* | gallium/gbm: Switch to auxiliary/pipe-loader.Francisco Jerez2012-05-1112-574/+51
| | | | | | | | Reviewed-by: Jakob Bornecrantz <[email protected]>
* | gallium/tests/trivial: Switch to the pipe loader.Francisco Jerez2012-05-113-36/+39
| | | | | | | | | | | | | | | | It simplifies things slightly, and besides, it makes possible to execute the trivial tests on a hardware device instead of being limited to software rendering. Reviewed-by: Jakob Bornecrantz <[email protected]>
* | gallium: Add "pipe-loader" target.Francisco Jerez2012-05-117-0/+315
| | | | | | | | | | | | | | | | | | This target generates pipe driver modules intended to be consumed by auxiliary/pipe-loader. Most of it was taken from the "gbm" target -- the duplicated code will be replaced with references to this target in a future commit. Reviewed-by: Jakob Bornecrantz <[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/compute: Drop TGSI dependency.Francisco Jerez2012-05-113-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Add a shader cap for specifying the preferred shader representation. Right now the only supported value is TGSI, other enum values will be added as they are needed. This is mainly to accommodate AMD's LLVM compiler back-end by letting it bypass the TGSI representation for compute programs. Other drivers will keep using the common TGSI instruction set. Reviewed-by: Tom Stellard <[email protected]>
* | gallium/tgsi: Introduce the "LOCAL" register declaration modifier.Francisco Jerez2012-05-115-27/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-113-2/+188
| |
* | gallium/tgsi: Add support for barriers.Francisco Jerez2012-05-113-1/+59
| |
* | gallium/tgsi: Define system values used to query the compute grid parameters.Francisco Jerez2012-05-112-2/+10
| |
* | gallium/tgsi: Add resource write-back support.Francisco Jerez2012-05-118-4/+45
| | | | | | | | | | 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-115-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-115-6/+6
| | | | | | | | | | | | 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-115-4/+9
| |
* | gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.Francisco Jerez2012-05-1119-74/+141
| | | | | | | | | | | | 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.