summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* gallium/u_gen_mipmap: don't release vertex buffer at end of frame / in glFlushMarek Olšák2012-04-182-19/+4
| | | | | There's no reason to do that. The buffer being used for rendering is always mapped as unsynchronized.
* gallium/u_blit: don't release vertex buffer at end of frame / in glFlushMarek Olšák2012-04-182-18/+4
| | | | | There's no reason to do that. The buffer being used for rendering is always mapped as unsynchronized.
* gallium: remove PIPE_TRANSFER_NOOVERWRITE, use equivalent UNSYNCHRONIZEDMarek Olšák2012-04-181-1/+1
|
* u_blitter: align vertex buffer suballocations to 4Marek Olšák2012-04-131-1/+1
|
* util: add dual blend helper function (v2)Dave Airlie2012-04-131-0/+26
| | | | | | | | This is just a function to tell if a certain blend mode requires dual sources. v2: move to inlines as per Brian's suggestion Signed-off-by: Dave Airlie <[email protected]>
* util: fix uninitialized tableDylan Noblesmith2012-04-131-4/+5
| | | | | | | | | | | | | | | | | | | Most of the 256 values in the 'generic_to_slot' table were supposed to be initialized with the default value 0xff, but were left at zero (from CALLOC_STRUCT()) instead. Noticed by clang: u_linkage.h:60:31: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset(table, 0xff, sizeof(table)); ~~~~~ ^~~~~ Also fix a signed/unsigned comparison and a comment typo here. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <[email protected]>
* util: fix undefined behaviorDylan Noblesmith2012-04-131-5/+10
| | | | | | | | | container_of() can legally return anything, even invalid addresses that cause segfaults, when 'sample' is an uninitialized pointer. Bug exposed by clang. NOTE: This is a candidate for the 8.0 branch.
* u_blitter: don't use user buffersMarek Olšák2012-04-031-18/+23
|
* gallium/util: add helper function util_query_clear_resultMarek Olšák2012-03-301-0/+30
|
* gallium: add R8G8_R8B8 and G8R8_B8R8 formatsChristian König2012-03-093-0/+96
| | | | | | | v2: simplify implementation by using correct swizzle v3: fix mix with successor patch Signed-off-by: Christian König <[email protected]>
* u_format: fix a comment about subsampled formatsChristian König2012-03-091-1/+1
| | | | Signed-off-by: Christian König <[email protected]>
* util: replace format equality test with compatibility test in blit codeBrian Paul2012-02-291-1/+21
| | | | | | | | | | This lets us use the resource_copy_region() path when blitting from R8G8B8A8 to R8G8B8x8, for example. v2: be smarter when src_format==dst_format Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* util: better comment for util_is_format_compatible()Brian Paul2012-02-291-2/+3
|
* util: fix assertions in u_blitter.c codeBrian Paul2012-02-291-11/+11
| | | | | | | Assertions of the form assert(a && b) should be written as separate assertions so that you can actually tell which part is false when there's a failure. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: add fast path for buffers in u_default_transfer_inline_writeMarek Olšák2012-02-271-14/+23
| | | | v2: fix indentation, add assertions
* gallium/util: set correct usage flags in u_default_transfer_inline_writeMarek Olšák2012-02-271-0/+12
| | | | The DISCARD flags should improve performance in drivers which handle them.
* u_blitter: decrease minimum buffer range alignment to 4 for copy_bufferMarek Olšák2012-02-241-5/+5
|
* u_blitter: check for invalid values in copy_bufferMarek Olšák2012-02-241-0/+11
|
* gallium/u_slab: fix possible crash in util_slab_destroyMarek Olšák2012-02-231-3/+5
| | | | | | | It may happen if util_slab_create has not been called. Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* util: add mutex lock in u_debug_memory.c codeBrian Paul2012-02-231-0/+9
| | | | | | | The linked list of memory allocations was not protected by a mutex. This lead to sporadic failures with multi-threaded apps. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: added pipe_sampler_view_release() functionBrian Paul2012-02-231-0/+22
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium/util: remove u_simple_screenMarek Olšák2012-02-211-180/+0
| | | | Deprecated and unused.
* util: fix typo in debug_printf_once commentBrian Paul2012-02-061-1/+1
|
* vl: remove assert on unknown video profileChristian König2012-02-061-1/+0
| | | | | | | It's perfectly valid to ask for an unknown profile and get unknown code as a result. Signed-off-by: Christian König <[email protected]>
* svga: set POINTSIZEMIN to 1.0 for non-sprite non-aa pointsMarek Olšák2012-01-311-0/+11
| | | | v2: add the helper function, improve the condition
* util: Silence GCC unused-but-set-variable warning.Vinson Lee2012-01-161-0/+2
| | | | | | | | | | Fix this GCC 4.6 warning with 64-bit builds. u_debug_stack.c: In function ‘debug_backtrace_capture’: u_debug_stack.c:45:17: warning: variable ‘frame_pointer’ set but not used [-Wunused-but-set-variable] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallium: improve the pipe_stream_output_info struct (v2)Marek Olšák2012-01-152-4/+6
| | | | | | | | | | | | | | | | | | | | | There are 3 changes: 1) stride is specified for each buffer, not just one, so that drivers don't have to derive it from the outputs 2) new per-output property dst_offset, which specifies the offset into the buffer in dwords where the output should be stored, so that drivers don't have to compute the offsets manually; this will also be useful for gl_SkipComponents from ARB_transform_feedback3 3) register_mask is removed, instead, there is start_component and num_components; register_mask with non-consecutive 1s doesn't make much sense (some hardware cannot do packing of components) Christoph Bumiller: fixed nvc0. v2: resolve merge conflicts in Draw and clean it up
* mesa/gallium: add FFS_DEFINED to protect ffs() from multiple definitionsBrian Paul2012-01-121-0/+5
| | | | | | | | We include both imports.h and u_math.h in the state tracker. This leads to multiple, conflicting definitions of ffs() with MSVC. Use FFS_DEFINED to skip the ffs() in u_math.h. Reviewed-by: José Fonseca <[email protected]>
* util: use memset() to initialize surface, sampler_view templatesBrian Paul2012-01-102-7/+16
| | | | | | | | | | | | These initialization functions weren't initializing all the fields so some had undefined values. The callers of these functions sometimes use a structure assignment to initialize new objects from these templates so we'd just propagate the undefined values. That made for some confusing info when debugging, plus it could lead to bugs. v2: fix surf pointer mix-up: "&surf" -> "surf" Jakob Bornecrantz <[email protected]>
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-105-29/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <[email protected]> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <[email protected]> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <[email protected]> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* util: silence some MSVC type conversion warningsBrian Paul2012-01-071-5/+5
|
* util: add debug_warn_once() macroBrian Paul2012-01-071-0/+19
| | | | Emits a warning message, but only once to avoid tons of repeated warnings.
* u_vbuf: don't unroll indices if mapping vertex buffers blocksMarek Olšák2012-01-071-1/+35
|
* u_vbuf: use cso_cache to cache vertex element statesMarek Olšák2012-01-051-10/+47
| | | | Improves performance to 28 fps in Cogs.
* u_vbuf: implement another upload codepath which unrolls indicesMarek Olšák2012-01-052-27/+120
| | | | | | | Improves performance from cca 1 fps to 23 fps in Cogs. This new codepath is not always used, instead, there is a heuristic which determines whether to use it. Using translate for uploads is generally slower than what we have had already, it's a win only in a few cases.
* u_vbuf: cleanup variable names to be consistentMarek Olšák2012-01-051-13/+11
|
* u_vbuf: cleanup the computation of how many vertices to upload/translateMarek Olšák2012-01-051-16/+23
|
* u_vbuf: convert min_index,max_index to start,countMarek Olšák2012-01-051-19/+26
|
* util: add helper function util_dump_draw_infoMarek Olšák2012-01-052-0/+34
|
* u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formatsMarek Olšák2012-01-053-4/+32
| | | | | | | | | | | | | Fetching int as float and vice versa is not allowed. Fetching unsigned int as signed int and vice versa is not allowed either. Doing conversions like that isn't allowed for samplers in OpenGL. The three hooks could be consolidated into one fetch hook, which would fetch uint as uint32, sint as sint32, and everything else as float. The receiving parameter would be void*. This would be useful for implementing vertex fetches for shader model 4.0, which has untyped registers. Reviewed-by: Dave Airlie <[email protected]>
* u_vbuf: translate per-vertex, per-instance, and constant attribs separatelyMarek Olšák2012-01-051-104/+236
| | | | | | | We don't wanna convert per-instance or constant (zero-stride) attribs into ordinary vertex attribs. More importantly, the translation of instance attribs now finally works.
* u_vbuf: take start_instance into account when uploading instanced attribsMarek Olšák2012-01-051-2/+4
|
* u_upload_mgr: remove the 'flushed' parameterMarek Olšák2012-01-053-20/+8
| | | | | | Not used by anybody. Reviewed-by: Brian Paul <[email protected]>
* u_vbuf: don't map user buffers, just obtain a pointer to themMarek Olšák2012-01-051-6/+11
|
* u_vbuf: only map a subrange of buffers to translateMarek Olšák2012-01-051-9/+8
|
* gallium: fix behavior of pipe_buffer_map_rangeMarek Olšák2012-01-052-6/+5
| | | | | | | To match what transfer_map returns. Really, subtracting the offset leads to bugs if someone expects it to work exactly like transfer_map. Reviewed-by: Brian Paul <[email protected]>
* u_vbuf: remove the workaround for half floats and translateMarek Olšák2012-01-051-20/+1
|
* gallium/util: fix argument cast in x32_s8_get_tile_rgba() callBrian Paul2012-01-041-1/+1
|
* softpipe: remove the 32bits limitation on depth(-stencil) formatsMorgan Armand2012-01-031-0/+28
| | | | | | | This patch remove the 32bits limitation. As a side effect, it bring the support for the GL_ARB_depth_buffer_float extension. No regression have been found on piglit, and all tests for GL_ARB_depth_buffer_float pass successfully. Signed-off-by: Dave Airlie <[email protected]>
* gallium: use Haiku provided debug_printf in OS.hAlexander von Gluck2012-01-031-1/+4
| | | | Signed-off-by: Brian Paul <[email protected]>