diff options
author | Dave Airlie <[email protected]> | 2012-01-04 11:52:30 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-01-11 07:13:35 +0000 |
commit | 40c5987ed84f9f0b8bb1f707bb13c1aafc39330a (patch) | |
tree | 0614696dcf1b6b8f1886920b3520e38f66dcc3f3 /src/gallium/auxiliary/draw/draw_context.c | |
parent | 34a78b7ef6b0edf217acf221eab4b63542be5552 (diff) |
draw/softpipe: add clip vertex support. (v2)
softpipe always clipped using the position vector, however for unclipped
vertices it stored the position in window coordinates, however when position
and clipping are separated, we need to store the clip-space position and
the clip-space vertex clip, so we can interpolate both separately.
This means we have to take the clip space position and store it to use later.
This allows softpipe to pass all the clip-vertex piglit tests.
v2: fix llvm draw regression, the structure being passed into llvm needed
updating, remove some hardcoded ints that should have been enums while there.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_context.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 10a20f76178..6d7075e5452 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -692,6 +692,16 @@ draw_current_shader_position_output(const struct draw_context *draw) /** + * Return the index of the shader output which will contain the + * vertex position. + */ +uint +draw_current_shader_clipvertex_output(const struct draw_context *draw) +{ + return draw->vs.clipvertex_output; +} + +/** * Return a pointer/handle for a driver/CSO rasterizer object which * disabled culling, stippling, unfilled tris, etc. * This is used by some pipeline stages (such as wide_point, aa_line |