summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/indices
Commit message (Collapse)AuthorAgeFilesLines
* gallium/util: another s/unsigned/enum pipe_prim_type/ for clangBrian Paul2016-05-271-1/+1
| | | | Trivial.
* util/indices: move duplicated assignments out of switch casesBrian Paul2016-05-261-29/+4
| | | | | | Spotted by Roland. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* util/indices,svga: s/unsigned/enum pipe_prim_type/Brian Paul2016-05-263-16/+17
| | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* util/indices: implement unfilled (tri->line) conversion for adjacency primsBrian Paul2016-05-262-2/+38
| | | | | | | | Tested with new piglit gl-3.2-adj-prims test. v2: re-order trisadj and tristripadj code, per Roland. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* util/indices: implement provoking vertex conversion for adjacency primitivesBrian Paul2016-05-263-3/+134
| | | | | | Tested with new piglit gl-3.2-adj-prims test. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* util/indices: assert that the incoming primitive is a triangle typeBrian Paul2016-05-261-0/+5
| | | | | | | The unfilled index translator/generator functions should only be called when the primitive mode is one of the triangle types. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* util/indices: formatting, whitespace fixes in u_unfilled_indices.cBrian Paul2016-05-261-12/+7
| | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* util/indices: improve comments in u_indices.hBrian Paul2016-05-261-3/+29
| | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* u_upload_mgr: allow specifying PIPE_USAGE_* for the upload bufferMarek Olšák2016-01-021-1/+2
| | | | Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* u_upload_mgr: remove alignment parameter from u_upload_createMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* u_upload_mgr: pass alignment to u_upload_alloc manuallyMarek Olšák2016-01-021-1/+1
| | | | | | | | | | The fixed alignment of u_upload_mgr will go away. This is the first step. The motivation is that one u_upload_mgr can have multiple users, each allocating from the same buffer, but requiring a different alignment. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* util/indices: replace #define tokens with enum typeBrian Paul2015-11-043-86/+91
| | | | | | To ease debugging in gdb. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* indices: fix provoking vertex for quads/quadstripsIlia Mirkin2015-04-181-3/+10
| | | | | | | | | | This allows drivers to provide consistent flat shading for quads. Otherwise a driver that only supported tris would have to force last provoking vertex when drawing quads (and would have to say that quads don't follow the provoking vertex convention). Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robclark@freedesktop.org>
* primconvert: select pv convention only from flatshade_firstIlia Mirkin2015-04-181-2/+1
| | | | | | | | | This should match to how drivers program hardware. flatshade relates to whether color inputs are interpolated, not the provoking vertex convention. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Rob Clark <robclark@freedesktop.org>
* u_primconvert: add primitive restart supportDave Airlie2015-03-206-86/+201
| | | | | | | | | | | | | | | | | | | | This add primitive restart support to the prim conversion. This involves changing the API for the translate functions as we need to pass the prim restart index and the original number of indices into the translate functions. primitive restart is support for quads, quad strips and polygons. This deal with the case where the actual number of output primitives is less than the initially calculated number, by filling the rest of the output primitives with the restart index, the other option is to reduce the output prim number, but that will make the generator code a bit messier. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gallium/auxiliary/indices: fix start paramMarc-Andre Lureau2015-03-041-4/+4
| | | | | | | | | | | Since commit 28f3f8d, indices generator take a start parameter. However, some index values have been left to start at 0. This fixes the glean/fbo test with the virgl driver, and copytexsubimage with freedreno. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
* u_primconvert: Fix leak of the upload BO on context destroy.Eric Anholt2014-12-311-0/+2
| | | | | | | v2: Conditionalize it on having done any uploads (Turns out u_upload_destroy() isn't safe with a NULL arg). Reviewed-by: Dave Airlie <airlied@redhat.com> (v1)
* util/primconvert: Avoid point arithmetic; apply offset on all cases.José Fonseca2014-12-051-1/+2
| | | | | | Matches what u_vbuf_get_minmax_index() does. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* util/primconvert: take ib offset into accountIlia Mirkin2014-12-051-1/+1
| | | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
* util/primconvert: support instanced renderingIlia Mirkin2014-12-051-0/+2
| | | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
* util/primconvert: pass index bias throughIlia Mirkin2014-12-051-0/+1
| | | | | | | | | | The index_bias (aka base_vertex) applies to the downstream draw just as much, since the actual index values are never modified. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
* u_primconvert: Use u_upload_mgr for our little IB allocations.Eric Anholt2014-09-021-11/+9
| | | | | | | | tex-miplevel-selection was hammering my memory manager with primconverts on individual quads. This gets all those converted IBs packed into larger IBs. Reviewed-by: Rob Clark <robclark@freedesktop.org>
* u_primconvert: Shut up compiler warning.Eric Anholt2014-09-021-1/+1
| | | | | | | gcc isn't detecting that src is set before used, since both are under if (info->indexed). Reviewed-by: Rob Clark <robclark@freedesktop.org>
* u_primconvert: Copy min/max_index from the original primitive.Eric Anholt2014-08-081-4/+2
| | | | | | | | | | | | | | | | | | These values are supposed to be the minimum/maximum index values used to read from the vertex buffers. This code either copies index values out of the old IB (so, same min/max as the original draw call), or generates a new IB (using index values between the start and the start + count of the old array draw info, which just happens to be what min/max_index are set to by st_draw.c). We were incorrectly setting the max_index in the converting-from-glDrawArrays case to the start vertex plus the number of vertices generated in the new IB, which broke QUADS primitive conversion on VC4 (where max_index really has to be correct, or the kernel might reject your draw call due to buffer overflow). Reviewed-by: Rob Clark <robclark@freedesktop.org> (from verbal description of the patch)
* gallium/auxiliary/indices: replace free() with FREE()Brian Paul2014-02-031-1/+1
| | | | | | | | To match the CALLOC_STRUCT() call. Cc: "10.0, 10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
* indices: add comments, assertions in u_indices.c fileBrian Paul2013-11-151-0/+26
| | | | | Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* gallium/auxiliary/indices: add u_primconvertRob Clark2013-10-292-0/+226
| | | | | | | | | | A convenient front end to indices generate/translate code, for emulating primitives which are not supported natively by the driver. This handles saving/restoring index buffer state, etc. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/auxiliary/indices: add start paramRob Clark2013-10-295-26/+54
| | | | | | | Add 'start' parameter to generator/translator. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* indices: add some commentsBrian Paul2013-06-192-4/+28
| | | | | | This is pretty complicated code with few/any comments. Here's a first stab. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* indices: fix conversion of PIPE_PRIM_POLYGON to linesBrian Paul2011-06-242-3/+8
| | | | | | | | | When the fill mode is PIPE_POLYGON_MODE_LINE we were basically converting the polygon into triangles, then drawing the outline of all the triangles. But we really only want to draw the lines around the perimeter of the polygon, not the interior lines. NOTE: This is a candidate for the 7.10 branch.
* gallium: untrack u_indices_gen.c and u_indices_gen.cJosé Fonseca2010-05-063-6121/+2
| | | | | | | | | | | | These files are built with make and removed with make clean, so it does not seem necessary to track them. Looking at the Makefile, it seems that the two u_indices_* files are handled similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3 files are already untracked and in .gitignore Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
* Revert "gallium: untrack u_indices_gen.c and u_indices_gen.c"José Fonseca2010-05-061-2/+0
| | | | | | This incomplete patch got commited by mistake. This reverts commit 2142c769a4ebfe1a7c3facb036af8b75c5288616.
* gallium: untrack u_indices_gen.c and u_indices_gen.cXavier Chantry2010-05-061-0/+2
| | | | | | | | | | | | These files are built with make and removed with make clean, so it does not seem necessary to track them. Looking at the Makefile, it seems that the two u_indices_* files are handled similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3 files are already untracked and in .gitignore Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
* gallium: Generate a single library for auxiliaries with Make too.José Fonseca2010-01-011-16/+0
|
* scons: Aggregate all tiny libraries in a single library.José Fonseca2010-01-011-28/+0
| | | | | Makes integration of gallium into out of tree components much easier. No pratical change for components in this tree,
* aux/indices: don't use 'prim' value once it is known to be badKeith Whitwell2009-06-261-1/+1
| | | | Theoretical bugfix only - no known case where this might happen.
* util/indices: remove debug printsKeith Whitwell2009-04-282-161/+0
|
* mesa: Use the python executable from sys.executable.José Fonseca2009-03-271-2/+4
| | | | From Ramesh Dharan <rrdharan@vmware.com>
* indices: add translate/generate functions for unfilled modesKeith Whitwell2009-03-046-1/+1622
| | | | | | | | | | | | Most of the time unfilled rendering requires a lot more thought than just translating triangles to lines or points. But sometimes, you can do exactly that, and it can be quite a bit quicker. Add code to do the translation. The caller has to determine whether it's a legal thing to do in the current state, in particular you'd need: - culling disabled - offset disabled - same front and back fill modes - possibly other stuff I can't think of.
* gallium: Improve makefiles for librariesJakob Bornecrantz2009-02-201-4/+0
| | | | | | | | The template makefile that most libraries in gallium included was based on dri and had a bunch unrelevant junk in it. Update it and improve the depending makefiles.
* util: Move p_debug.h into util module.José Fonseca2009-02-182-2/+2
| | | | | The debug functions depend on several util function for os abstractions, and these depend on debug functions, so a seperate module is not possible.
* indices: Fix typo.José Fonseca2009-02-092-241/+241
|
* indices: quad fixesKeith Whitwell2009-02-052-132/+133
|
* gallium: add new aux lib for index list translationsKeith Whitwell2009-02-057-0/+5859
Could this be the ultimate index list translating utility? Maybe, but it doesn't yet include support for splitting primitives. Unlike previous attempts, this captures all possible combinations of API and hardware provoking vertex, supports generated list reuse and various other tricks. Relies on python-generated code.