Commit Graph

50 Commits

Author SHA1 Message Date
Dave Airlie ddb9ad363d softpipe: add support for indexed queries.
We need indexed queries to retrieve the geom shader info.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2019-04-09 11:19:38 +10:00
Dave Airlie 333746011d draw: add stream member to stats callback
This just adds space for the member to the callback, doesn't
change anything else.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2019-04-09 11:19:38 +10:00
Brian Paul 1fe4c7b2af gallium: s/unsigned/enum pipe_prim_type/
In the vbuf_render::set_primitive() functions.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-10-27 16:26:26 -06:00
Roland Scheidegger 8d4039ecdb softpipe: tell draw about the vertex layout we want
This makes it more similar to llvmpipe. It also allows us to let draw emit
code handle things like getting zeros for non-existing vs outputs
automatically. There probably isn't really any overhead either way, there isn't
really any "simply copy everything" code in the emit path it would copy each
attrib individually just the same. Likewise, we still do another mapping step
in softpipe as the layout may still not match exactly (same as in llvmpipe,
should probably nuke the pointless mapping in both drivers).

This fixes the piglit arb_fragment_layer_viewport no_gs/no_write tests.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
2016-01-07 02:00:04 +01:00
Ilia Mirkin a2a1a5805f gallium: replace INLINE with inline
Generated by running:
git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g'
git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g'
git checkout src/gallium/state_trackers/clover/Doxyfile

and manual edits to
src/gallium/include/pipe/p_compiler.h
src/gallium/README.portability

to remove mentions of the inline define.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Marek Olšák <marek.olsak@amd.com>
2015-07-21 17:52:16 -04:00
José Fonseca 8771285054 s/Tungsten Graphics/VMware/
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>
2014-01-17 20:00:32 +00:00
Roland Scheidegger bd3909f265 draw: clean up setting stream out information a bit
In particular noone is interested in the vertex count, so drop that,
and also drop the duplicated num_primitives_generated /
so.primitives_storage_needed variables in drivers. I am unable for now to figure
out if primitives_storage_needed in SO stats (used for d3d10) should
increase if SO is disabled, though the equivalent num_primitives_generated
used for OpenGL definitely should increase. In any case we were only counting
when SO is active both in softpipe and llvmpipe anyway so don't pretend there's
an independent num_primitives_generated counter which would count always.
(This means the PIPE_QUERY_PRIMITIVES_GENERATED count will still be wrong just
as before, should eventually fix this by doing either separate counting for this
query or adjust the code so it always counts this even if SO is inactive depending
on what's correct for d3d10.)

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-08-27 16:59:39 +02:00
Roland Scheidegger 4900e625bd softpipe: support nested/overlapping queries for all query types
There's just no way resetting the counters is working with nested/overlapping
queries.

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-08-27 16:58:20 +02:00
Zack Rusin 80ee4a407a draw: implement pipeline statistics in the draw module
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>
2013-04-16 23:38:47 -07:00
José Fonseca b7283834dc softpipe: Handle adjacency primitives.
Not fully tested.

Based on diagrams from
http://msdn.microsoft.com/en-us/library/windows/desktop/bb205124.aspx#Primitive_Adjacency

v2: Fix based on Brian's feedback.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-11-09 13:43:19 +00:00
Dave Airlie ec8cbd79ac draw/softpipe: EXT_transform_feedback support (v2)
This replaces the current code with an implementation compatible with
the new gallium interface. I've left some of the remains of the interface
intact so llvmpipe keeps building correctly, and I'll take a look at fixing
llvmpipe up later.

v2: fixup as per Brian's review

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-10 12:07:51 +00:00
Brian Paul 488dd2c191 gallium: make vbuf_render::set_primitive() return void
All the implementations of this function always return TRUE.
2012-01-07 14:16:27 -07:00
Zack Rusin 287531772c draw: rewrite stream output to handle all the dark corners
register masks, multiple output buffers, multiple primitives,
non-linear vertices (elts) and stride semantics.
2010-06-16 14:43:56 -04:00
Zack Rusin be7d8ddf0c gallium: add basic support for stream output queries 2010-06-08 06:28:11 -04:00
Zack Rusin 2c22b8e61d gallium: make draw auto work and add relevant caps and docs 2010-06-08 06:28:11 -04:00
Brian Paul 740e50c60f gallium: rename draw() to draw_elements() in vbuf code
Now we have draw_elements() and draw_arrays() to be consistent with the
pipe_context drawing functions.
2010-05-05 18:19:37 -06:00
Brian Paul cb136a93ab gallium: rework provoking vertex code
Builds on commit ddb0e18f6c and fixes
regressions in glean clipFlat test.

We assume that Gallium drivers observe flatshade_first for all triangles
and that all the assorted per-triangle calls in the 'draw' module also
follow flatshade_first.  Everything else builds on those rules.

Gallium does not use follow flatshade_first for GL quads, quad strips
and polygons; the "last" vertex is always the provoking vertex for those
prims.  So now there are separate QUAD_FIRST_PV and QUAD_LAST_PV macros
in the draw primitive decomposition code instead of one QUAD macro.
2010-05-05 18:19:06 -06:00
Brian Paul 826f552188 softpipe: formatting fixes and comments 2010-04-16 08:21:49 -06:00
Marek Olšák 558ce9964f softpipe: quads never provoke the first vertex 2010-03-09 04:51:43 +01:00
Brian Paul cd8614b028 Merge branch 'mesa_7_7_branch'
Conflicts:
	src/gallium/auxiliary/draw/draw_context.c
	src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
	src/gallium/auxiliary/pipebuffer/Makefile
	src/gallium/auxiliary/pipebuffer/SConscript
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/gallium/auxiliary/tgsi/tgsi_scan.c
	src/gallium/drivers/i915/i915_surface.c
	src/gallium/drivers/i915/i915_texture.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/softpipe/sp_prim_vbuf.c
	src/gallium/state_trackers/xorg/xorg_dri2.c
	src/gallium/winsys/drm/intel/gem/intel_drm_api.c
	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
	src/gallium/winsys/drm/radeon/core/radeon_drm.c
	src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
	src/mesa/state_tracker/st_cb_clear.c
2010-01-22 12:17:02 -07:00
José Fonseca e5da7b8548 softpipe: Fix vertex buffer memory leak. 2010-01-19 06:14:12 -08:00
Jakob Bornecrantz 2a60302e51 softpipe: Fix leak in vbuf draw module 2010-01-18 00:12:42 +00:00
Vinson Lee 180ccffe55 softpipe: Silence unused variable warning. 2009-12-27 17:52:47 -08:00
Brian Paul 9a0ff33ad6 softpipe: prefix non-static functions with sp_ 2009-10-07 13:17:20 -06:00
Keith Whitwell 4fe0fc3eba softpipe: remove old prim_setup draw stage
Everything now goes through the draw_vbuf handler, the same as
regular drivers.
2009-08-23 11:22:41 +01:00
Keith Whitwell d12bae9368 softpipe: move flatshade-first check out of loop 2009-08-18 16:21:12 +01:00
Keith Whitwell a1dbd7aa15 softpipe: actually pass >1 quad from triangle routine
First attempt
2009-07-24 18:17:05 +01:00
Brian Paul 9038b6c8bb Merge branch 'ext-provoking-vertex'
Conflicts:

	docs/relnotes-7.6.html
	progs/tests/Makefile
	src/gallium/drivers/softpipe/sp_prim_vbuf.c
	src/glx/x11/indirect.c
	src/mesa/glapi/Makefile
	src/mesa/glapi/dispatch.h
	src/mesa/glapi/glapioffsets.h
	src/mesa/glapi/glapitable.h
	src/mesa/glapi/glapitemp.h
	src/mesa/glapi/glprocs.h
	src/mesa/main/dlist.c
	src/mesa/main/enums.c
	src/mesa/sparc/glapi_sparc.S
	src/mesa/x86-64/glapi_x86-64.S
	src/mesa/x86/glapi_x86.S
2009-06-19 09:15:34 -06:00
Brian Paul 5aec03aaf4 softpipe: implement flatshade_first for triangles 2009-06-09 21:52:37 -06:00
Brian Paul 086ecea179 softpipe: separate case for PIPE_PRIM_POLYGON in sp_vbuf_draw()
Because of flat shading, we can't use same code as PIPE_PRIM_TRIANGLE_FAN.
This is a follow-on to commit a59575d8fb.
2009-06-03 18:33:07 -06:00
Brian Paul a64bbdaa3e softpipe: fix incorrect tri vertex order for PIPE_PRIM_POLYGON rendering
This fixes incorrect front/back-face orientation.
2009-06-03 18:31:55 -06:00
Brian Paul a59575d8fb softpipe: fix incorrect provoking vertex color for PIPE_PRIM_POLYGON
This fixes the incorrect colors seen when rendering flat-shaded polygons.
Note that clipped polygons were correct, but unclipped polygons were wrong.

See the glean/clipFlat test for regression testing.
2009-05-30 20:07:18 -06:00
Brian Paul 9d9a7edfbc Revert "softpipe: added null ptr check for align_free() call in vbuf code"
This reverts commit 6db24f449d.

With a null ptr check in align_free() this is no longer needed.
2009-03-05 10:01:53 -07:00
Brian Paul 6db24f449d softpipe: added null ptr check for align_free() call in vbuf code
Fixes GALLIUM_NOCELL path.  See bug 20475.
2009-03-05 09:49:27 -07:00
Keith Whitwell a321b8ed6e softpipe: add dumping of post-tranfsormed vertices (disabled) 2009-02-27 15:23:21 +00:00
Keith Whitwell 7ca78a07b3 softpipe: update to new draw interfaces 2009-02-17 12:20:05 +00:00
Brian Paul d7b5243c64 gallium: massage sp_vbuf_draw() and sp_vbuf_draw_arrays() to look more alike
Also, update some comments.
2008-11-24 13:11:05 -07:00
Brian Paul 4f25420bdd gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.h
Also, rename p_tile.[ch] to u_tile.[ch]
2008-08-24 17:48:55 -06:00
Keith Whitwell f116a14916 softpipe: more work to get non-reduced primitives working in vbuf 2008-05-12 17:40:55 +01:00
Keith Whitwell 90e86363de softpipe: make vbuf handle all primitive types 2008-05-12 17:40:55 +01:00
Keith Whitwell 8b607f42d0 softpipe: call setup_prepare earlier so that vertex info is correct when queried 2008-04-16 12:22:20 +01:00
Keith Whitwell 871d39ec8c softpipe: calculate determinant for all triangles, don't rely on draw module to do it 2008-04-14 16:18:00 +01:00
Keith Whitwell 8e7326832a softpipe: do our own culling, don't rely on the draw module.
May not always happen due to passthrough modes, etc.
2008-04-14 11:32:50 +01:00
Keith Whitwell c95dcc4962 remove usage of vertex_header 2008-04-10 14:35:47 -04:00
Keith Whitwell 9425a702be gallium: improvements, or extensions at least, to the passthrough path
Passthrough is actually more tricky than you'd think...
2008-03-17 10:10:45 +00:00
Brian 49a687882a gallium: finish remaining prim types for sp_vbuf_draw_arrays()
Not totally tested, but easily fixed if glitches are found.
2008-03-16 10:33:59 -06:00
Keith Whitwell e4cdce43ce gallium: fix some compiler warnings 2008-03-14 08:42:45 +00:00
Brian 7d5e38a55a gallium: plug in new sp_vbuf_draw_arrays() function
Will be used for pass-through mode.
Also, call draw_set_render() to register the vbuf stage.  Should probably
rename that function to something like draw_set_vbuf_stage().
2008-03-13 16:53:44 -06:00
José Fonseca 6acd63a498 Code reorganization: update build.
Update the Makefiles and includes for the new paths.

Note that there hasn't been no separation of the Makefiles yet, and make is
jumping all over the place. That will be taken care shortly. But for now, make
should work. It was tested with linux and linux-dri. Linux-cell and linux-llvm
might require some minor tweaks.
2008-02-15 17:50:12 +09:00
José Fonseca b642730be9 Code reorganization: move files into their places.
This is in a separate commit to ensure renames are properly preserved.
2008-02-15 17:45:40 +09:00
Renamed from src/mesa/pipe/softpipe/sp_prim_vbuf.c (Browse further)