summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_state.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-03-31 19:04:17 +0200
committerChristoph Bumiller <[email protected]>2011-04-10 14:06:52 +0200
commit843d5391c3b7b80ff2087ce7e6440417aab623cc (patch)
treec6a3d888748c51721447885ec11219c5398e244d /src/gallium/drivers/nvc0/nvc0_state.c
parentd546df4d9c090656c506e8a959646a48ed00efc2 (diff)
nv50,nvc0: identify some line rasterization state
Fixes width of non-smooth (aliased) lines on nvc0.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_state.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index c482b25f6b6..db3b78f10b8 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -161,6 +161,7 @@ nvc0_blend_state_delete(struct pipe_context *pipe, void *hwcso)
FREE(hwcso);
}
+/* NOTE: ignoring line_last_pixel, using FALSE (set on screen init) */
static void *
nvc0_rasterizer_state_create(struct pipe_context *pipe,
const struct pipe_rasterizer_state *cso)
@@ -187,9 +188,12 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
SB_BEGIN_3D(so, FRAG_COLOR_CLAMP_EN, 1);
SB_DATA (so, cso->clamp_fragment_color ? 0x11111111 : 0x00000000);
- SB_BEGIN_3D(so, LINE_WIDTH, 1);
- SB_DATA (so, fui(cso->line_width));
SB_IMMED_3D(so, LINE_SMOOTH_ENABLE, cso->line_smooth);
+ if (cso->line_smooth)
+ SB_BEGIN_3D(so, LINE_WIDTH_SMOOTH, 1);
+ else
+ SB_BEGIN_3D(so, LINE_WIDTH_ALIASED, 1);
+ SB_DATA (so, fui(cso->line_width));
SB_BEGIN_3D(so, LINE_STIPPLE_ENABLE, 1);
if (cso->line_stipple_enable) {