Commit Graph

57 Commits

Author SHA1 Message Date
Brian
e785f190f0 Don't always declare frag shader INPUT[0] as fragment position.
We were doing this for the sake of softpipe and the tgsi intergrepter since
we always need the fragment position and W-coordinate information in order
to compute fragment interpolants.
But that's not appropriate for hardware drivers.
The tgsi interpreter now get x,y,w information from a separate tgsi_exec_vector
variable setup by softpipe.
The new pipe_shader_state->input_map[] defines how vert shader outputs map
to frag shader inputs.  It may go away though, since one can also examine
the semantic label on frag shader input[0] to figure things out.
2007-12-14 11:00:46 -07:00
Brian
5d41a71392 minor clean-ups, comments 2007-12-10 17:32:43 -07:00
Michal
d754548406 gallium: add draw_stage::destroy(). 2007-12-09 14:03:34 +00:00
Michal Krol
ee295fccdd Make gallium compile in win32.
Use FREE, MALLOC, CALLOC, GETENV wrappers.
Silence compiler warnings.
Add proper copyrights.
2007-10-29 17:05:38 +00:00
Zack Rusin
a70c5e37f1 Remove typedefs from enums.
typedefs are rather evil, remove them and use the enum
keyword explicitely.
2007-10-29 16:14:10 +00:00
michal
187c164bb6 Silence compiler warnings. 2007-10-27 19:01:11 +01:00
Brian
863cc0af74 fix square point rasterization 2007-10-17 10:51:55 -06:00
Brian
efdacc90b4 Update mask calculations for point drawing. 2007-10-16 17:43:41 -06:00
Brian
0edd490a96 Redefine QUAD_TOP_LEFT, TOP_RIGHT, etc. to reflect Y=0=TOP raster layout. 2007-10-16 17:36:37 -06:00
Brian
63b0b5b6c7 fix perspective-interpolated attribs for points, liens 2007-10-16 12:04:16 -06:00
keithw
e078f910dc restore primitive trimming in sp_draw_arrays.c 2007-09-27 07:56:23 +01:00
Keith Whitwell
08589f7105 Make flushing more lazy in the draw module. 2007-09-27 07:56:23 +01:00
Keith Whitwell
a37e0daeb9 First attempt at building vertex buffers post-clip.
Build a buffer of contigous vertices and indices at the backend of our
software transformation/clipping path.  This will become the mechanism
for emitting buffers of vertices to rasterization hardware.

This is similar to but not the same as the post-transform vertex cache.
In particular, these vertices are subject to clipping, culling, poly offset,
etc.  The vertices emitted will all be used by hardware.

TODOs include the actual transformation to hardware vertex formats, moving
this out of softpipe to somewhere more useful and allowing >1 primitive to
share the generated VB.
2007-09-25 13:23:20 +01:00
Brian
da45890818 Fix up some point size breakage. Start on fogcoord too. 2007-09-21 12:06:08 -06:00
Brian
674d013069 checkpoint: TGSI_ATTRIB_x tokens no longer used 2007-09-20 13:50:53 -06:00
Brian
086734502a Checkpoint: vertex attribute clean-up.
Remove/disable the attrib/slot mapping arrays in a few places.
Work in progress...
2007-09-20 13:43:23 -06:00
Brian
bb611c5f1f Checkpoint: rework shader input/output register mapping.
This is a step toward removing TGSI_ATTRIB_ tokens.
Basically, when translating Mesa programs to TGSI programs, pass in input and
output register re-maps, plus interpolation info.
There's some known breakage (cubemap.c) so more to be done...
2007-09-18 19:38:35 -06:00
Brian
72b0a57cfa additional comments for tri_persp_coeff() 2007-09-18 12:56:22 -06:00
Zack Rusin
294401814d converting the setup state to immutable object and renaming it to rasterizer state 2007-09-18 07:18:12 -04:00
Brian
2e21058e3d Define attrib_format and interp_mode enum typedefs and use where appropriate. 2007-08-31 11:27:16 -06:00
Brian
8f1a0decad fix unhandled switch/case warning 2007-08-30 16:01:23 -06:00
Brian
942b9bc5bc In draw_flatshade.c use vertex_info->interp_mode[] to choose attribs/colors to cpy.
One less dependency on the TGSI_ATTRIB_x flags.
This requires setting the vertex_info->interp_mode[] values in the i915 driver and passing them to draw_set_vertex_attributes().
2007-08-30 14:43:08 -06:00
Brian
2d187672b7 Sketch out per-vertex point size.
The code is all in place, but mostly disabled for now:
In t_vp_build.c, write the VERT_RESULT_PSIZE register
In sp_state_derived.c, need to emit vertex point size if drawing points.
In setup_point() use the point size from the vertex.
2007-08-30 14:43:08 -06:00
Brian
440e794b05 Use vertex_info struct for softpipe - lots of clean-up. 2007-08-23 19:28:59 -06:00
Brian
d8b16d416d Checkpoint: new vertex/fragment attribute naming
Replace VF_ATTRIB_x with TGSI_ATTRIB_x
When converting mesa programs to TGSI programs, also convert the InputsRead
and OutputsWritten to a mask of TGSI_ATTRIB_ bits.
Still need to do conversion for vertex programs...
2007-08-23 17:00:47 -06:00
Brian
766fa51537 remove some of the #ifndef MESA stuff 2007-08-20 17:02:07 -06:00
michal
f692cdb544 Silence compiler warnings. 2007-08-16 19:49:04 +01:00
Brian
3fc926f374 Remove many dependencies on mesa headers.
To build with mesa, need -DMESA in makefile/config file.
2007-08-16 18:11:55 -06:00
Keith Whitwell
b0b871429d Remove mesa include directories, be stricter about include paths. 2007-08-15 23:48:48 +01:00
michal
058b978a5a Add UsageMask to DECLARATION in TGSI.
Interpolate FS attributes in the shader.
Do not copy WPOS in FS.
2007-08-15 18:16:11 +01:00
Keith Whitwell
70af238b49 Continue reducing dependencies on core mesa include files.
Mainly down to the support for legacy TNL processing now.
2007-08-14 15:57:30 +01:00
Brian
6dc212ce49 print_vertex func for debugging 2007-08-08 16:10:40 -06:00
Brian
f00179f9b4 Add a quad_stage::begin() method to do per-primitive preparations (like setting up samplers). 2007-08-08 12:04:08 -06:00
Brian
7baa0865b1 Merge branch 'softpipe_0_1_branch' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa into softpipe_0_1_branch 2007-07-30 13:46:00 -06:00
Brian
1c8905790b remove old comments 2007-07-30 13:11:09 -06:00
Brian
75b8a396e5 renaming, comments, clean-up 2007-07-27 11:02:54 -06:00
Brian
05ba76757b Clip triangles against softpipe->cliprect which includes scissor and surface bounds.
This prevents rendering out of bounds when the viewport is partially outside the surface bounds.
2007-07-27 10:50:35 -06:00
Brian
05bde092f3 remove obsolete comments 2007-07-27 10:25:11 -06:00
Brian
a0c1d591ab Maintain cliprect (scissor) info in sp_state_derived.c.
The cliprect depends on the scissor rect (if enabled), otherwise the drawing
surface bounds.
2007-07-27 10:21:34 -06:00
Brian
78ea9cee0d Implement point/line quad clipping. Not quite as efficient as it probably could be, but sufficient for now. 2007-07-27 10:10:49 -06:00
Brian
e1a19781dd init quad.coverage values to 1.0 in case line AA is enabled so that we see something 2007-07-27 09:06:02 -06:00
Brian
0360b49afb Implement line stippling.
Also added draw_stage::reset_line_stipple().  There may be a better way
of doing that though.
2007-07-25 15:48:09 -06:00
Brian
80362a90d8 Add 'prim' field to quad so that stipple and aa coverage stages can do the right thing. 2007-07-13 11:15:10 -06:00
Brian
46bba80a54 Implement AA points and AA coverage application in quad pipeline. 2007-07-13 10:33:48 -06:00
Brian
c78f372b17 s/prim_setup/sp_draw_render_stage/, new comments 2007-07-12 13:43:33 -06:00
Brian
ea470eec86 Rename prim_stage -> draw_stage 2007-07-12 13:32:31 -06:00
Brian
46d75518fa disable debug printfs 2007-07-11 13:13:00 -06:00
Brian
e89bd0fbc5 Implement polygon stipple state tracking, application. 2007-07-11 11:34:19 -06:00
Brian
0ac0fb91bd Compute quad.facing from prim->det and polygon winding.
Updated comments/questions about area vs. prim->det.
2007-07-11 09:52:00 -06:00
Brian
57a5385652 Added comments, assertions. 2007-07-10 10:53:57 -06:00