summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-17 18:13:46 +0200
committerMarek Olšák <[email protected]>2016-08-22 16:01:35 +0200
commit6ffde82083e07d86d1e60b00d245af436752fd5e (patch)
tree5b0c762eeb3bef3c83020ea76cb66a9ff81a5200 /src/gallium
parent6902f9e82a1d4c4ff12ac6b55b96d2ef5feb26e3 (diff)
gallium/hud: use AA lines for graphs
this looks a lot better (with the next patch) Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/hud/hud_context.c6
1 files changed, 5 insertions, 1 deletions
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 = {