summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/indices
Commit message (Collapse)AuthorAgeFilesLines
* 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 <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* 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 <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* 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 <[email protected]> Cc: "10.4 10.5" <[email protected]>
* 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 <[email protected]> (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 <[email protected]>
* util/primconvert: take ib offset into accountIlia Mirkin2014-12-051-1/+1
| | | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.4 10.3" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* util/primconvert: support instanced renderingIlia Mirkin2014-12-051-0/+2
| | | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.3 10.4" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* 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 <[email protected]> Cc: "10.3 10.4" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> (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" <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* 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/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # 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 <[email protected]>
* indices: add comments, assertions in u_indices.c fileBrian Paul2013-11-151-0/+26
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* 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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/auxiliary/indices: add start paramRob Clark2013-10-295-26/+54
| | | | | | | Add 'start' parameter to generator/translator. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* 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 <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* 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 <[email protected]>
* 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.