diff options
author | Hui Qi Tay <hqtay@vmware.com> | 2010-07-19 15:23:09 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-08-27 13:08:54 +0100 |
commit | 5286dd701640976ffc328e8e85fb3830746851a1 (patch) | |
tree | 9d11aca1063f70218e52135b78540619092b2da3 /src/gallium/drivers/llvmpipe/lp_setup_context.h | |
parent | c95ca04b63eadb61add249531c1041aaf5b525d6 (diff) |
llvmpipe: native rasterization for lines
Rasterize lines directly by treating them as 4-sided polygons.
Still need to check the exact pixel rasteration.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_context.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_context.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h index 1a147e0353..a4838d59a5 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_context.h +++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h @@ -91,6 +91,7 @@ struct lp_setup_context boolean scissor_test; unsigned cullmode; float pixel_offset; + float line_width; struct pipe_framebuffer_state fb; struct u_rect framebuffer; @@ -170,5 +171,42 @@ lp_setup_print_vertex(struct lp_setup_context *setup, const char *name, const float (*v)[4]); +/** shared code between lp_setup_line and lp_setup_tri */ +extern lp_rast_cmd lp_rast_tri_tab[]; + +void +do_triangle_ccw_whole_tile(struct lp_setup_context *setup, + struct lp_scene *scene, + struct lp_rast_triangle *tri, + int x, int y, + boolean opaque, + int *is_blit); + + +void +lp_setup_tri_coefficients( struct lp_setup_context *setup, + struct lp_rast_triangle *tri, + float oneoverarea, + const float (*v1)[4], + const float (*v2)[4], + const float (*v3)[4], + boolean frontface); + +struct lp_rast_triangle * +lp_setup_alloc_triangle(struct lp_scene *scene, + unsigned nr_inputs, + unsigned nr_planes, + unsigned *tri_size); + +void +lp_setup_fragcoord_coef(struct lp_setup_context *setup, + struct lp_rast_triangle *tri, + float oneoverarea, + unsigned slot, + const float (*v1)[4], + const float (*v2)[4], + const float (*v3)[4], + unsigned usage_mask); + #endif |