summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* u_vbuf_mgr: add a way to specify the BIND flag for the upload bufferMarek Olšák2011-02-082-1/+3
|
* u_vbuf_mgr: remove tabsMarek Olšák2011-02-081-18/+18
|
* u_vbuf_mgr: make the uploader publicMarek Olšák2011-02-082-17/+15
|
* util: import a new vertex buffer managerMarek Olšák2011-02-074-1/+722
| | | | | | | This code has originally matured in r300g and was ported to r600g several times. It was obvious it's a code duplication. See also comments in the header file.
* util: Change u_get_transfer_vtbl usage argument type to match prototype.Vinson Lee2011-02-031-1/+1
| | | | | | The type of u_get_transfer_vtbl of the usage argument in u_transfer.h is unsigned and not enum pipe_transfer_usage. This patch changes the type of usage to unsigned to match the prototype in the header file.
* cso: don't tell drivers to bind null samplers, sampler viewsBrian Paul2011-02-031-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, the set_sampler_views() and restore_sampler_views() functions used MAX2(old,new) to tell the driver how many samplers or sampler views to set. This could result in cases such as: pipe->set_fragment_sampler_views(pipe, 4, views={foo, bar, NULL, NULL}) Many/most gallium drivers would take this as-is and set ctx->num_sampler_views=4 and ctx->sampler_views={foo, bar, NULL, NULL, ...}. Later, loops over ctx->num_sampler_views would have to check for null pointers. Worse, the number of sampler views and number of sampler CSOs could get out of sync: ctx->num_samplers = 2 ctx->samplers = {foo, bar, ...} ctx->num_sampler_views = 4 ctx->sampler_views={Foo, Bar, NULL, NULL, ...} So loops over the num_samplers could run into null sampler_views pointers or vice versa. This fixes a failed assertion in the SVGA driver when running the Mesa engine demo in AA line mode (and possibly other cases). It looks like all gallium drivers are careful to unreference views and null-out sampler CSO pointers for the units beyond what's set with the pipe::bind_x_sampler_states() and pipe::set_x_sampler_views() functions. I'll update the gallium docs to explain this as well.
* util: Prevent transfer dangling pointer on map failure.José Fonseca2011-02-031-0/+1
|
* cso: refactor texture sampler and sampler view codeBrian Paul2011-02-021-326/+307
| | | | | | This consolidates the code duplicated between the fragment sampler and vertex sampler functions. Plus, it'll make adding support for geometry shader samplers trivial.
* cso: rename fragment sampler-related fieldsBrian Paul2011-02-021-21/+26
| | | | To better distinguish from vertex sampler fields.
* cso: fix loop bound in cso_set_vertex_samplers()Brian Paul2011-02-021-1/+1
| | | | | | | Before we were looping to nr_samplers, which is the number of fragment samplers, not vertex samplers. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* util: Call tables should be const.Henri Verbeet2011-01-301-1/+1
|
* u_blitter: use user buffers instead of real buffersMarek Olšák2011-01-291-21/+8
| | | | User buffers may be the fastest way to upload data.
* util: Fix leak of transfers in upload managerJakob Bornecrantz2011-01-281-0/+1
|
* util: fix parsing debug optionsMarek Olšák2011-01-271-19/+25
| | | | | | | So that 'foo' can be found in: OPTION=prefixfoosuffix,foo Also allow that debug options can be separated by a non-alphanumeric characters instead of just commas.
* r300g: fix some bugs with zbuffer compression (v4)Marek Olšák2011-01-273-40/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This drops the memblock manager for ZMASK. Instead, only one zbuffer can be compressed at a time. Note that this does not necessarily have to be slower. When there is a large number of zbuffers, compression might be used more often than it was before. It's also easier to debug. How it works: 1) 'clear' turns the compression on. 2) If some other zbuffer is set or the currently-bound zbuffer is used for texturing, the driver decompresses it and then turns the compression off. Notes: - The ZMASK clear has been refactored, so that only one packet3 is used to clear ZMASK. - The 8x8 compression mode is disabled. I couldn't make it work without issues. - Also removed driver-specific stuff from u_blitter. Driver status: - RV530 and R580 appear to just work (finally). - RV570 should work, but there may be an issue that we don't correctly calculate the number of dwords to clear, resulting in a partially uninitialized zbuffer. - RS690 misrenders as if no ZMASK clear happened. No idea what's going on. - RV350 may even hardlock. This issue was already present and this patch doesn't fix it. I think we are still missing some hardware info we need to make the zbuffer compression work fully. Note that there is also an issue with HiZ, resulting in a sort of blocky zigzagged corruption around some objects.
* tgsi: add cases for array texturesBrian Paul2011-01-261-0/+2
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33555
* util: require debug options to be separated by commasMarek Olšák2011-01-261-1/+38
| | | | | | | | | Let's assume there are two options with names such that one is a substring of another. Previously, if we only specified the longer one as a debug option, the shorter one would be considered specified as well (because of strstr). This commit fixes it by checking that each option is surrounded by commas. (a regexp would be nicer, but this is not a performance critical code)
* tgsi: add support for 1D/2D texture arraysBrian Paul2011-01-253-2/+39
|
* u_blitter: remove bogus assertionMarek Olšák2011-01-251-3/+0
| | | | The module uses the 3D engine, so it can blit non-compatible formats.
* u_blitter: report recursion, update commentsMarek Olšák2011-01-251-1/+14
|
* gallium: implement modern sampling schemeZack Rusin2011-01-2412-33/+607
| | | | | | | | | | | largely a merge of the previously discussed origin/gallium-resource-sampling but updated. the idea is to allow arbitrary binding of resources, the way opencl, new gl versions and dx10+ require, i.e. DCL RES[0], 2D, FLOAT LOAD DST[0], SRC[0], RES[0] SAMPLE DST[0], SRC[0], RES[0], SAMP[0]
* draw: Do not use LLVM's opaque types.José Fonseca2011-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | Contrary what the name may suggest, LLVM's opaque types are used for recursive types -- types whose definition refers itself -- so opaque types correspond to pre-declaring a structure in C. E.g.: struct node; struct link { .... struct node *next; }; struct node { struct link link; } Void pointers are also disallowed by LLVM. So the suggested way of creating what's commonly referred as "opaque pointers" is using byte pointer (i.e., uint8_t * ).
* secure malloc in translate_cache_createTim Wiederhake2011-01-241-0/+4
| | | | Signed-off-by: Brian Paul <[email protected]>
* util: Add function logger helpersJakob Bornecrantz2011-01-242-0/+72
|
* draw: Init llvm if not providedJakob Bornecrantz2011-01-243-4/+18
|
* gallium/util: added pipe_put_tile_rgba_format()Brian Paul2011-01-222-1/+18
|
* gallium/util: simplify pipe_get_tile_rgba()Brian Paul2011-01-221-20/+1
| | | | Implement it in terms of pipe_get_tile_rgba_format()
* gallium/softpipe: replace pipe_get_tile_swizzle()Brian Paul2011-01-222-55/+10
| | | | | | The new function, pipe_get_tile_rgba_format(), no longer takes a swizzle (we weren't actually using it anywhere). Rename it to indicate that the format is passed explicitly.
* gallium/util: added util_format_linear()Brian Paul2011-01-221-1/+41
|
* draw: add missing LP_CHECK_MEMBER_OFFSET()Brian Paul2011-01-151-0/+2
|
* Merge branch 'draw-instanced'Brian Paul2011-01-1511-12/+209
|\ | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_llvm.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/glsl/ir_set_program_inouts.cpp src/mesa/tnl/t_vb_program.c
| * gallivm/llvmpipe: implement system values and instanceIDBrian Paul2010-12-083-4/+96
| |
| * draw: setup instance ID for SSE generatorBrian Paul2010-12-081-0/+6
| |
| * draw: setup instance ID for VS interpreterBrian Paul2010-12-081-0/+6
| |
| * tgsi/ppc: add case for system values and assertBrian Paul2010-12-081-1/+3
| |
| * tgsi/sse: add support for system valuesBrian Paul2010-12-081-3/+51
| |
| * tgsi: new tgsi_shader_info fields for system valuesBrian Paul2010-12-082-1/+22
| |
| * tgsi: add support for system values to TGSI interpreterBrian Paul2010-12-082-3/+23
| |
* | draw: Fix an off-by-one bug in a vsplit assertion.Chia-I Wu2011-01-141-1/+2
| | | | | | | | | | | | | | | | When use_spoken is true, istart (the first vertex of this segment) is replaced by i0 (the spoken vertex of the fan). There are still icount vertices. Thanks to Brian Paul for spotting this.
* | util: Undo spurious changes in last commit.José Fonseca2011-01-131-1/+1
| |
* | util: Don't limit debug_printf message length on unices.José Fonseca2011-01-131-1/+6
| |
* | noop: make noop useable like trace or rbugJerome Glisse2011-01-091-0/+51
| | | | | | | | | | | | | | | | If you want to enable noop set GALLIUM_NOOP=1 as an env variable. You need first to enable noop wrapping for your driver see change to src/gallium/targets/dri-r600/ in this commit as an example. Signed-off-by: Jerome Glisse <[email protected]>
* | util: add comments to u_upload_mgr and u_inlinesMarek Olšák2011-01-063-15/+38
| |
* | tgsi: remove redundant name tables from tgsi_text, use those from tgsi_dumpMarek Olšák2011-01-063-56/+33
| | | | | | | | | | I also specified the array sizes in the header so that one can use the Elements macro on it.
* | gallium: drivers should reference vertex buffersMarek Olšák2011-01-063-15/+31
| | | | | | | | So that a state tracker can unreference them after set_vertex_buffers.
* | u_upload_mgr: new featuresMarek Olšák2011-01-062-26/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added a parameter to specify a minimum offset that should be returned. r300g needs this to better implement user buffer uploads. This weird requirement comes from the fact that the Radeon DRM doesn't support negative offsets. - Added a parameter to notify a driver that the upload flush occured. A driver may skip buffer validation if there was no flush, resulting in a better performance. - Added a new upload function that returns a pointer to the upload buffer directly, so that the buffer can be filled e.g. by the translate module.
* | u_upload_mgr: keep the upload buffer mapped until it is flushedMarek Olšák2011-01-061-52/+14
| | | | | | | | | | | | | | The map/unmap overhead can be significant even though there is no waiting on busy buffers. There is simply a huge number of uploads. This is a performance optimization for Torcs, a car racing game.
* | util: Add forward declarations in u_index_modify.h.Vinson Lee2010-12-301-0/+3
| |
* | tgsi: Clean up header file inclusion in tgsi_text.h.Vinson Lee2010-12-301-2/+4
| |
* | tgsi: Clean up header file inclusion in tgsi_sanity.h.Vinson Lee2010-12-301-2/+4
| |