Commit Graph

75 Commits

Author SHA1 Message Date
Chia-I Wu 9d2be38fad draw: Simplify frontend interface a little.
The run method is simplified to take the start vertex and the vertex
count.
2010-08-16 20:46:27 +08:00
Brian Paul 0e7b53c75b draw: use instance divisor in draw_print_arrays() 2010-08-03 16:37:58 -06:00
Brian Paul f94e7e25d1 draw: add assertion, rearrange debug code 2010-08-03 16:37:58 -06:00
Brian Paul 8a2933f366 draw: add vertex buffer offset in draw_print_arrays() 2010-07-29 17:25:54 -06:00
Brian Paul 80e07c4190 draw: updated debug/dump code 2010-07-16 11:10:25 -06:00
Brian Paul 839608a8be draw: update comments for drawing functions 2010-07-15 15:42:36 -06:00
Zack Rusin 425870c5fd mesa: get the translation from mesa 2d regs to tgsi working
first working version of arb_geometry_shader4
2010-07-10 02:02:35 -04:00
Keith Whitwell 64682da8ab draw: don't try to precalculate the pipeline output primitive
We were previously calculating a value which was either the geometry
shader output primitive or the application's input primitive, and
passing that to the various front/middle/back components for use as
the ultimate rendering primtive.

Unfortunately, this was not correct -- if the vcache decomposition
path is active and geometry shaders are *not* active, we can end up
with a third primitive -- specifically the decomposed version of the
input primitive.

Rather than trying to precalculate this, just let the individual
components inform their successors about which primitive type they are
recieving.
2010-06-23 18:10:20 +01:00
Zack Rusin d4ef0f6c67 geometry shaders: make gs work with changable primitives and variable number of vertices
lots and lots of fixes for geometry shaders. in particular now we work when the gs
emits a different primitive than the one the pipeline was started with and also
we work when gs emits more vertices than would fit in the original buffer.
2010-06-09 11:13:34 -04:00
Keith Whitwell 045174b685 draw: don't use llvm engine when geometry shaders active
They aren't implemented for llvm.
2010-06-07 19:38:30 +01:00
Brian Paul 0e4f0e8725 draw: remove extra semicolons 2010-04-28 15:27:08 -06:00
José Fonseca 6ecbbc3c05 draw: Always use the llvm middle end when available & enabled. 2010-04-26 16:05:06 +01:00
Jakob Bornecrantz 1820d240cd gallium: Convert some uses of get option to static 2010-04-23 21:57:49 +01:00
José Fonseca a6171a9dd9 Merge branch 'gallium-index-bias' 2010-04-20 11:07:08 +02:00
Zack Rusin 7dfde3aadc draw llvm: make sure use_llvm isn't used when not defined 2010-04-19 13:33:49 -04:00
Zack Rusin 4df3e76949 draw llvm: allow runtime switching of pipelines (yes/no to llvm)
use DRAW_USE_LLVM to disable or enable (default) llvm
2010-04-19 12:53:27 -04:00
José Fonseca 2197fac47c draw: Implement index bias. 2010-04-19 18:14:04 +02:00
José Fonseca ea532f0e72 scons: Make LLVM a black-white dependency.
Now that draw depends on llvm it is very difficult to correctly handle
broken llvm installations. Either the user requests LLVM and it needs to
supply a working installation. Or it doesn't, and it gets no LLVM
accelerate pipe drivers.
2010-04-11 17:17:34 +09:00
Brian Paul 78fd65fd2c draw: init draw->pt.middle.general = NULL just to be safe
This field should be null from the initial calloc() of the draw context,
but let's be safe (and improve understanding of the code).
2010-04-07 07:09:57 -06:00
Brian Paul 45c8909148 gallium/draw: add additional DRAW_LLVM check
Fixes build breakage.
2010-04-06 20:20:17 -06:00
Zack Rusin 275c4bd364 Merge remote branch 'origin/master' into gallium_draw_llvm 2010-03-15 15:24:38 -04:00
Roland Scheidegger 685340a53e Merge branch 'gallium-vertexelementcso'
Conflicts:
	src/gallium/auxiliary/cso_cache/cso_context.c
	src/gallium/auxiliary/util/u_blit.c
	src/gallium/auxiliary/util/u_gen_mipmap.c
	src/gallium/drivers/i915/i915_context.h
	src/gallium/drivers/i965/brw_draw_upload.c
	src/gallium/drivers/r300/r300_blit.c
	src/gallium/drivers/r300/r300_context.h
	src/gallium/drivers/r300/r300_render.c
	src/gallium/drivers/r300/r300_state_derived.c
	src/mesa/state_tracker/st_cb_bitmap.c
	src/mesa/state_tracker/st_cb_clear.c
2010-03-09 15:59:40 +01:00
Zack Rusin c5c5cd7132 gallium/draw: initial code to properly support llvm in the draw module
code generate big chunks of the vertex pipeline in order to speed up
software vertex processing.
2010-02-22 22:02:58 -05:00
Michal Krol 63cb6f59ea gallium: Remove bypass_vs_clip_and_viewport from rasteriser state.
Needs testing.
2010-02-22 21:36:22 +01:00
Roland Scheidegger 464a72dd41 gallium: remove redundant nr_components field from pipe_vertex_element
This is a property of the associated src_format pipe format.
Hence use util_format_get_nr_components to query this when necessary instead.
2010-02-17 16:44:38 +01:00
José Fonseca 13701aae40 draw: Use util_format_name(). 2010-02-14 13:27:00 +00: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
Vinson Lee dc544ad9c6 draw: Remove unnecessary headers. 2010-01-21 22:57:12 -08:00
Michal Krol 6481f40eec draw: Implement draw_arrays() in terms of draw_arrays_instanced(). 2009-12-30 18:54:04 +01:00
Michal Krol 7ca0ce3834 Implement draw_arrays_instanced() in softpipe.
Modify the translate module to respect instance divisors and accept
instance id as a parameter to calculate input vertex offset.
2009-12-29 23:21:01 +01:00
Roland Scheidegger a0127b6ced gallium: more work for edgeflags changes
fixes, cleanups, etc.
not working yet
2009-12-14 18:36:33 +01:00
Keith Whitwell a08e348a84 gallium: first steps to treat edgeflags as regular vertex element
The idea here is to eliminate the set_edgeflags() call in pipe_context
by treating edgeflags as a regular vertex element.

Edgeflags provoke special treatment in hardware, which means we need to
label them in some way, in this case we'll be passing them through the
vertex shader and labelling the vertex shader output with a new TGSI
semantic (TGSI_SEMANTIC_EDGEFLAG).
2009-12-09 19:03:10 +01:00
Vinson Lee ea98e9820d draw: Initialize variable in draw_pt.c. 2009-11-20 16:03:48 -08:00
Brian Paul d2e4643767 draw: use u_reduced_prim() function 2009-06-19 09:45:23 -06:00
Keith Whitwell 683e7091a9 gallium: consolidate bypass_vs and bypass_clipping flags
The draw module provides a similar interface to the driver which
is retained as various bits of hardware may be able to take on
incremental parts of the vertex pipeline.  However, there's no
need to advertise all this complexity to the state tracker.

There are basically two modes now - normal and passthrough/screen-coords.
2009-03-13 16:42:57 +00:00
Zack Rusin 872b515e8f gallium: standardize on stride instead of pitch in the interface 2009-01-27 12:20:25 -05:00
Michal Krol 0ee92d6ed9 draw: Add missing include. 2008-11-12 18:12:28 +01:00
Brian Paul 6c3e7365d5 gallium: debug code to print vertex array data (disabled) 2008-11-06 14:57:20 -07:00
Brian Paul 05a17f83b0 gallium: added some debug code (disabled) 2008-11-05 09:08:56 -07:00
Keith Whitwell c48da7d78b draw: add switch for drivers to force vertex data passthrough 2008-10-07 16:33:52 +01: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
Brian Paul ba9e633902 gallium: fix trim() function bug when count < first
If the user called glDrawArrays(GL_TRIANGLES, count=1), trim() returned a
very large integer because of the unsigned arithmetic.
2008-07-04 10:02:43 -06:00
José Fonseca a70684bf25 gallium: Deprecate GETENV. Replace by debug_get_bool_option.
debug_get_bool_option will interpret "n", "no", "0", "f", or
"false" as FALSE; and everything else as TRUE. The default value
(used when the variable is not set) is received as a parameter.
2008-06-10 08:33:21 +09:00
Keith Whitwell 1529a2c983 draw: trim incoming primitives 2008-05-30 17:49:10 +01:00
Keith Whitwell 807e7c4ccf draw: add more switches to turn FSE on/off 2008-05-29 14:35:47 +01:00
Keith Whitwell 728d1f7f43 draw: enable FSE by default 2008-05-28 23:54:18 +01:00
Keith Whitwell b23706454b draw: get rid of fetch-shade-emit frontend hack
The code is now living in it's intended place as a pt middle end.
2008-05-23 09:16:54 +01:00
Keith Whitwell bbda45ec76 draw: turn fse path into a middle end
Also add some util functions in pt_util.c
2008-05-12 19:40:20 +01:00
Keith Whitwell 44463b2997 draw: streamline the varray path
- drop support for running the pipeline (ie. don't populate the flags values)
- pass through all split-able primitives intact to the middle end
- only primitives that can't be split are shunted on the draw-element path
2008-05-12 17:40:55 +01:00
Keith Whitwell b5e5369da5 draw: add fetch-shade-emit path
Enable with TEST_FSE=t.  Performs fetch from API-provided vertex buffers,
transformation with one of three (two working) hard-coded shaders, and
final emit to hardware vertices all in a single pass.

Currently only really useful for profiling in conjunction with SP_NO_RAST=t.
2008-05-12 17:40:55 +01:00