Commit Graph

36 Commits

Author SHA1 Message Date
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
Zack Rusin 90a46ed277 split larger primitives in the simple varray pt 2008-05-08 15:26:03 -04:00
Keith Whitwell 14cfcb1820 draw: no need to special-case elts/get_elts for varray frontend 2008-04-25 14:20:25 +01:00
Zack Rusin 992d0b997f frontend for rendering without elts 2008-04-25 14:20:25 +01:00
Keith Whitwell 0588858702 draw: allow drivers to query pipeline state more easily
Also, provide a separate flag to say whether the driver can handle
clipping/rhw tasks, in addition to the API flag which indicates they
have already been done.
2008-04-22 20:50:20 +01:00
Keith Whitwell 7d72607e14 draw: move incoming vertex state into draw->pt
This state is effectively private to the vertex processing part
of the draw module.
2008-04-19 17:27:52 +01:00
Keith Whitwell 507fbe2d32 draw: move some pipeline-specific code & state to draw_pipe.[ch] 2008-04-19 15:29:27 +01:00
Keith Whitwell 1246d06313 draw: remove named clipmask flags, tidy up pt middle ends 2008-04-19 13:20:26 +01:00
Keith Whitwell b11d89dc6d draw: remove draw_prim.c 2008-04-18 20:36:38 +01:00
Keith Whitwell a41c05b20a draw: switch over to draw_pt paths, will remove old code shortly 2008-04-18 20:11:16 +01:00
Keith Whitwell 26c27f6636 draw: remove fetch_pipeline middle end -- just use the general path 2008-04-18 18:42:41 +01:00
Keith Whitwell fe8af14124 draw: don't always run pipeline if clipping 2008-04-17 14:42:05 +01:00
Keith Whitwell 3be453bf7f draw: allow pt paths to run without a vbuf render stage 2008-04-16 12:55:47 +01:00
Keith Whitwell a8582efaca draw: make pt run pipeline when need_pipeline is true, not just when clipped 2008-04-16 12:22:20 +01:00
Zack Rusin 2ba6e1fa71 silence some warnings 2008-04-14 12:29:23 -04:00
Keith Whitwell a82e4996a1 draw: flush pipeline before trying to allocate more hw vertices 2008-04-14 12:37:19 +01:00
Keith Whitwell caf293343f draw: hide passthrough shading paths behind an environment variable 2008-04-14 12:08:46 +01:00
Zack Rusin 0c1cb54923 Implement fetch/shade/pipeline or emit vertex passthrough. 2008-04-14 11:05:37 +01:00
Keith Whitwell d2cb4ba0bb draw: add passthrough path to the pipeline
This handles the case where bypass_vs is set, but vertices need to go
through the pipeline for some reason - eg unfilled polygon mode.

Demonstrates how to drive the pipeline from inside one of these things.
2008-04-03 12:21:30 +01:00
Keith Whitwell ae3c91e98c draw: Set the backend prim in the pt 'prepare' operation
Leaving it until 'run' is bad as the primitive is pretty much state
for some drivers and so needs to get set early.  In some drivers
this is used to determine things like vertex format, etc -- by the
time we get to 'run', it's too late to change this.
2008-04-02 12:02:32 +01:00
Keith Whitwell edfa8201a5 draw: more flatshade_first changes
- Reduce the number of changes to the normal vertex ordering
- Assume that the hardware knows how to do this in the standard case.
- Add support to the passthrough vcache path.
2008-04-01 14:51:25 +01:00
Keith Whitwell 4b1377b240 draw: flush between pt/non-pt modes 2008-04-01 14:51:24 +01:00
Michal Krol 63950b11b6 draw: Do not run full pipeline when flatshade_first for point primitives. 2008-03-30 23:21:20 +02:00
Keith Whitwell 4505acf3b2 draw: take primitive into account when deciding if the pipeline is active 2008-03-25 15:22:32 +00:00
Keith Whitwell 3b217c7fa7 draw: check need_pipeline() in passthrough 2008-03-23 21:55:19 +00:00
Keith Whitwell f40357e25c gallium: beginnings of draw module vertex rework
Trying to put a structure in place that we can actually optimize.
Initially just implementing a passthrough mode, this will fairly soon
replace all the vertex_cache/prim_queue/shader_queue stuff that's so
hard to understand...

Split the vertex processing into a couple of distinct stages:
- Frontend
    - Prepares two lists of elements (fetch and draw) to be processed
      by the next stage.  This stage doesn't fetch or draw vertices, but
      makes the decision which to draw.  Multiple implementations of this
      will implement different strategies, currently just a vcache
      implementation.
- MiddleEnd
    - Takes the list of fetch elements, fetches them, runs the vertex
      shader, cliptest, viewport transform on them to produce a
      linear array of vertex_header vertices.
    - Passes that list of vertices, plus the draw_elements (which index
      into that list) onto the backend
- Backend
    - Either the existing primitive/clipping pipeline, or the vbuf_render
      hardware backend provided by the driver.

Currently, the middle-end is the old passthrough code, and it build hardware
vertices, not vertex_header vertices as above.  It may be that passthrough
is a special case in this respect.
2008-03-23 17:36:49 +00:00