summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
...
* gallium/u_blitter: make clearing independent of the number of bound colorbuffersMarek Olšák2013-06-134-56/+41
| | | | | | We can use the fragment shader TGSI property WRITES_ALL_CBUFS. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/util: make WRITES_ALL_CBUFS optional in the passthrough fragment shaderMarek Olšák2013-06-132-4/+8
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* util: new util_fill_box helperRoland Scheidegger2013-06-132-10/+37
| | | | | | | | | Use new util_fill_box helper for util_clear_render_target. (Also fix off-by-one map error.) v2: handle non-zero z correctly in new helper Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* util: Use sizeof(void *) rather than 0 as the fallback cache line sizeRichard Sandiford2013-06-101-0/+5
| | | | | | | | Without this, llvmpipe ends up giving a zero size to all uncompressed textures on non-x86 systems, since align() cannot handle a 0 alignment. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
* util: add comment about bogus transfer flagsRoland Scheidegger2013-06-071-0/+1
|
* util: fix util_clear_render_target and util_clear_depth_stencil layer handlingRoland Scheidegger2013-06-071-87/+103
| | | | | | | These functions must clear all bound layers, not just the first. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* util: add util_resource_is_array_texture()Chia-I Wu2013-06-081-1/+19
| | | | | | | | Checking if array_size is greater than 1 is not enough for single-layered array textures. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* u_vbuf: fix index buffer leakChia-I Wu2013-06-071-0/+3
| | | | | Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* gallium: Add support for multiple viewportsZack Rusin2013-05-251-4/+4
| | | | | | | | | | | | Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* gallium: fix build on uclibc systemAnthony G. Basile2013-05-291-4/+2
| | | | | | | | | | | | execinfo.h and debug_symbol_name_glibc() are pure GNU-isms and do not build on uclibc systems. A previous patch addressed this issue, but there was an error. This patch corrects that error. See https://bugs.freedesktop.org/show_bug.cgi?id=51782 https://bugs.gentoo.org/show_bug.cgi?id=469768 Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Brian Paul <brianp@vmware.com>
* util/prim: add u_reduced_prims_for_vertices()Chia-I Wu2013-05-031-0/+20
| | | | | | | | The function returns the number of reduced/tessellated primitives for the given vertex count. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Zack Rusin <zackr@vmware.com>
* util/prim: assorted fixes for u_decomposed_prims_for_vertices()Chia-I Wu2013-05-031-11/+11
| | | | | | | | | | | Switch to '>=' for comparisons, and it becomes obvious that the comparison for PIPE_PRIM_QUAD_STRIP was wrong. Add minimum vertex count check for PIPE_PRIM_LINE_LOOP. Return 1 for PIPE_PRIM_POLYGON with 3 vertices. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Zack Rusin <zackr@vmware.com>
* util/prim: use vertex count info in u_validate_pipe_prim()Chia-I Wu2013-05-031-32/+2
| | | | | | | As a side effect, primitives with adjacency are now correctly validated. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Zack Rusin <zackr@vmware.com>
* util/prim: fix the name of the include guardChia-I Wu2013-05-031-2/+2
| | | | | | | It should be U_PRIM_H, not U_BLIT_H. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Zack Rusin <zackr@vmware.com>
* draw: use u_assembled_prim() instead of u_assembled_primitive()Chia-I Wu2013-05-031-8/+0
| | | | | | | The latter function is also removed as a result of the change. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Zack Rusin <zackr@vmware.com>
* util/prim: clean up and add commentsChia-I Wu2013-05-031-60/+107
| | | | | | | | | | | | | Move together (or add) functions to decompose/reduce/assemble a primitive, give them consistent names, and document them. Add u_prim_vertex_count() so that the vertex count information can be used elsewhere. u_assembled_primitive() will be removed in a folow-on commit. [olv: fix a warning when -Wold-style-declaration is enabled] Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Zack Rusin <zackr@vmware.com>
* util/prim: fix primitive trimming for triangles with adjacencyChia-I Wu2013-05-031-2/+2
| | | | | | | Fix for PIPE_PRIM_TRIANGLES_ADJACENCY and PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Acked-by: Zack Rusin <zackr@vmware.com>
* util/u_sse: Fix _mm_shuffle_epi8 prototype for clang.José Fonseca2013-04-251-1/+6
| | | | | Clang does not support __artificial__. Instead match precisely what's in the clang headers.
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-234-12/+16
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-234-4/+4
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-234-4/+4
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium: Replace gl_rasterization_rules with lower_left_origin and ↵José Fonseca2013-04-235-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | half_pixel_center. Squashed commit of the following: commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852 Author: José Fonseca <jfonseca@vmware.com> Date: Tue Apr 23 17:37:18 2013 +0100 gallium: s/lower_left_origin/bottom_edge_rule/ commit 4dff4f64fa83b9737def136fffd161d55e4f1722 Author: José Fonseca <jfonseca@vmware.com> Date: Tue Apr 23 17:35:04 2013 +0100 gallium: Move diagram to docs. commit 442a63012c8c3c3797f45e03f2ca20ad5f399832 Author: James Benton <jbenton@vmware.com> Date: Fri May 11 17:50:55 2012 +0100 gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center. This change is necessary to achieve correct results when using OpenGL FBOs. Reviewed-by: Marek Olšák <maraeo@gmail.com>
* gallium/u_blitter: implement buffer clearingMarek Olšák2013-04-232-8/+97
| | | | | | | | | | | | Although this might be useful for ARB_clear_buffer_object, I need it for initializating resources in r600g. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com> v2: comment cleanups NOTE: This is a candidate for the 9.1 branch.
* draw: implement primitive assemblerZack Rusin2013-04-181-0/+21
| | | | | | | | | | | | | | | | | | | | Input assembler needs to be able to decompose adjacency primitives into something that can be understood by the rest of the pipeline. The specs say that the adjacency primitives are *only* visible in the geometry shader, for everything else they need to be decomposed. Which in most of the cases is not an issue, because the geometry shader always decomposes them for us, but without geometry shader we were passing unchanged adjacency primitives to the rest of the pipeline and causing crashes everywhere. This commit introduces a primitive assembler which, if geometry shader is missing and the input primitive is one of the adjacency primitives, decomposes them into something that the rest of the pipeline can understand. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* util/prim: fix decomposed counts for adjacency primitivesZack Rusin2013-04-181-4/+4
| | | | | | Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* st/mesa: optionally apply texture swizzle to border color v2Christoph Bumiller2013-04-182-0/+46
| | | | | | | | | | | | This is the only sane solution for nv50 and nvc0 (really, trust me), but since on other hardware the border colour is tightly coupled with texture state they'd have to undo the swizzle, so I've added a cap. The dependency of update_sampler on the texture updates was introduced to avoid doing the apply_depthmode to the swizzle twice. v2: Moved swizzling helper to u_format.c, extended the CAP to provide more accurate information.
* draw: implement pipeline statistics in the draw moduleZack Rusin2013-04-161-15/+20
| | | | | | | | | | | | | This is a basic implementation of the pipeline statistics in the draw module. The interface is similar to the stream output statistics and also requires that the callers explicitly enable it. Included is the implementation of the interface in llvmpipe and softpipe. Only softpipe enables the pipeline statistics capability though because llvmpipe is lacking gathering of the fragment shading and rasterization statistics. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium/util: add const to a parameter of util_max_layerMarek Olšák2013-04-061-1/+1
|
* util: add ETC as compressed formatWladimir2013-04-051-0/+1
| | | | | | | Add UTIL_FORMAT_LAYOUT_ETC to util_format_is_compressed. It was missing. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/u_blitter: fix is_blit_generic_supported() stencil checkingBrian Paul2013-04-051-12/+14
| | | | | | | | | | | | | | | Don't check if there's sampler support for stencil if we're not going to actually blit/copy stencil values. Fixes the case where we mistakenly said we can't support a blit of depth values from S8Z24 to X8Z24. Also, rename the is_stencil variable to dst_has_stencil to improve readability. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
* util: add debug_memory_check_block(), debug_memory_tag()Brian Paul2013-04-041-0/+55
| | | | | | | | | | The former just checks that the given block is valid by checking the header and footer. The later sets the memory block's tag. With extra debug code, we can use that for monitoring/checking particular allocations. Reviewed-by: José Fonseca <jfonseca@vmware.com>
* gallivm: use f16c hw support for float->half and half->float conversionRoland Scheidegger2013-04-042-0/+2
| | | | | | | | Should be way faster of course on cpus supporting this (includes AMD Bulldozer and Jaguar cores, Intel Ivy Bridge and up (except budget models)). Passes piglit fbo-blending-formats GL_ARB_texture_float -auto on Ivy Bridge. Reviewed-by: Brian Paul <brianp@vmware.com>
* util: add new util_resource_size() function in u_resource.[ch]Brian Paul2013-04-032-1/+98
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* util: move functions from u_resource.c to u_transfer.cBrian Paul2013-04-032-75/+74
| | | | | | | | | The functions are prototyped in u_transfer.h and are related to the other functions in u_transfer.c. The next patch will re-use the u_resource.c file for new code. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium: add interface for driver queries like performance counters, etc.Marek Olšák2013-03-261-1/+1
| | | | | | | The pipe query interface is reused. The list of available queries can be obtained using pipe_screen::get_driver_query_info. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/util: attempt to fix blitting multisample texture arraysMarek Olšák2013-03-112-2/+2
| | | | We don't have a test for this yet, but obviously the swizzle was wrong.
* gallium/util: dump instance_divisorMarek Olšák2013-03-111-2/+1
|
* gallium/util: Correct shift value for TSC feature detection.Maxence Le Doré2013-03-081-1/+1
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* u_blitter: don't create illegal shaders for 1D/3D/RECT/CUBE MSAADave Airlie2013-03-041-0/+5
| | | | | Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium/util: add helper code for 1D integer rangeMarek Olšák2013-03-011-0/+89
| | | | | | | | | | Reviewed-by: Brian Paul <brianp@vmware.com> v2: cosmetic changes based on Brian's review Tested-by: Andreas Boll <andreas.boll.dev@gmail.com> NOTE: This is a candidate for the 9.1 branch. (the next patch depends on it)
* util: fix issues with util_clear_render_target.Roland Scheidegger2013-02-281-9/+46
| | | | | | | | For PIPE_BUFFER we need coord adjustments for the transfer. And for pure integer formats util_pack_color just crashes, need to handle that differently due to clear colors being ints/uints. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium/util: add helper util_max_layer from r600gMarek Olšák2013-02-261-0/+16
|
* util/u_blitter: Set pipe_sampler_state::normalized_coords correctly.José Fonseca2013-02-231-4/+22
| | | | | | | | | We might want to revisit the normalized_coords semantics, but this is the current expected behavior. Fixes fdo bug 61091. Reviewed-by: Brian Paul <brianp@vmware.com>
* util/dump: Use static assertion to detect string table size mismatches.José Fonseca2013-02-231-1/+18
| | | | | | | | Suggested by Brian Paul. Could probably be extended to other enums. Reviewed-by: Brian Paul <brianp@vmware.com>
* util/u_dump: Update texture target strings.José Fonseca2013-02-221-2/+10
|
* util/debug: Always use __builtin_frame_address on gcc.Sergey Matyukevich2013-02-221-4/+1
| | | | | | Should workaround fdo bug 57563. Signed-off-by: José Fonseca <jfonseca@vmware.com>
* gallium: add red-alpha texture formats and a couple of util functionsMarek Olšák2013-02-132-0/+129
| | | | | | | | | This is for glGetTexImage and it will be used for samplers only (which some drivers already implement by reading util_format_description). v2: incorporate Brian's suggestion Reviewed-by: Brian Paul <brianp@vmware.com>
* util: fix incorrect Z bit masking in util_clear_depth_stencil()Brian Paul2013-02-121-2/+2
| | | | | | | | | | | | | For PIPE_FORMAT_Z24_UNORM_S8_UINT, the Z bits are in the 24 least significant bits. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=60527 and http://bugs.freedesktop.org/show_bug.cgi?id=60524 and http://bugs.freedesktop.org/show_bug.cgi?id=60047 Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium: add RGBX formats for existing GL RGB texture formatsMarek Olšák2013-02-072-0/+22
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>