From 6ffde82083e07d86d1e60b00d245af436752fd5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 17 Aug 2016 18:13:46 +0200 Subject: [PATCH] gallium/hud: use AA lines for graphs this looks a lot better (with the next patch) Reviewed-by: Brian Paul --- src/gallium/auxiliary/hud/hud_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 0b292bcca61..fb9c8c65af3 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -67,7 +67,7 @@ struct hud_context { struct pipe_blend_state no_blend, alpha_blend; struct pipe_depth_stencil_alpha_state dsa; void *fs_color, *fs_text; - struct pipe_rasterizer_state rasterizer; + struct pipe_rasterizer_state rasterizer, rasterizer_aa_lines; void *vs; struct pipe_vertex_element velems[2]; @@ -590,6 +590,7 @@ hud_draw(struct hud_context *hud, struct pipe_resource *tex) pipe_resource_reference(&hud->text.vbuf.buffer, NULL); /* draw the rest */ + cso_set_rasterizer(cso, &hud->rasterizer_aa_lines); LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) { if (pane) hud_pane_draw_colored_objects(hud, pane); @@ -1227,6 +1228,9 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso) hud->rasterizer.line_width = 1; hud->rasterizer.line_last_pixel = 1; + hud->rasterizer_aa_lines = hud->rasterizer; + hud->rasterizer_aa_lines.line_smooth = 1; + /* vertex shader */ { static const char *vertex_shader_text = { -- 2.30.2