Fixes width of non-smooth (aliased) lines on nvc0.
#define NV50_3D_CULL_FACE_BACK 0x00000405
#define NV50_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
-#define NV50_3D_UNK1924 0x00001924
+#define NV50_3D_LINE_LAST_PIXEL 0x00001924
#define NVA3_3D_FP_MULTISAMPLE 0x00001928
#define NVA3_3D_FP_MULTISAMPLE_EXPORT_SAMPLE_MASK 0x00000001
OUT_RING (chan, NV50_3D_MULTISAMPLE_MODE_MS1);
BEGIN_RING(chan, RING_3D(MULTISAMPLE_CTRL), 1);
OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(LINE_LAST_PIXEL), 1);
+ OUT_RING (chan, 0);
BEGIN_RING(chan, RING_3D(SCREEN_Y_CONTROL), 1);
OUT_RING (chan, 0);
FREE(hwcso);
}
+/* NOTE: ignoring line_last_pixel, using FALSE (set on screen init) */
static void *
nv50_rasterizer_state_create(struct pipe_context *pipe,
const struct pipe_rasterizer_state *cso)
#define NVC0_3D_SERIALIZE 0x00000110
+#define NVC0_3D_LINE_WIDTH_SEPARATE 0x0000020c
+
#define NVC0_3D_EARLY_FRAGMENT_TESTS 0x00000210
#define NVC0_3D_MEM_BARRIER 0x0000021c
#define NVC0_3D_SCREEN_Y_CONTROL_Y_NEGATE 0x00000001
#define NVC0_3D_SCREEN_Y_CONTROL_TRIANGLE_RAST_FLIP 0x00000010
-#define NVC0_3D_LINE_WIDTH 0x000013b0
+#define NVC0_3D_LINE_WIDTH_SMOOTH 0x000013b0
+
+#define NVC0_3D_LINE_WIDTH_ALIASED 0x000013b4
#define NVC0_3D_GP_VERTEX_OUTPUT_COUNT 0x00001420
#define NVC0_3D_GP_VERTEX_OUTPUT_COUNT__MIN 0x00000001
#define NVC0_3D_CULL_FACE_BACK 0x00000405
#define NVC0_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
+#define NVC0_3D_LINE_LAST_PIXEL 0x00001924
+
#define NVC0_3D_VIEWPORT_TRANSFORM_EN 0x0000192c
#define NVC0_3D_VIEW_VOLUME_CLIP_CTRL 0x0000193c
OUT_RING (chan, 1 << 12);
BEGIN_RING(chan, RING_3D_(0x151c), 1);
OUT_RING (chan, 1);
- BEGIN_RING(chan, RING_3D_(0x020c), 1);
- OUT_RING (chan, 1);
BEGIN_RING(chan, RING_3D_(0x030c), 1);
OUT_RING (chan, 0);
BEGIN_RING(chan, RING_3D_(0x0300), 1);
OUT_RING (chan, NVC0_3D_MULTISAMPLE_MODE_1X);
BEGIN_RING(chan, RING_3D(MULTISAMPLE_CTRL), 1);
OUT_RING (chan, 0);
+ BEGIN_RING(chan, RING_3D(LINE_WIDTH_SEPARATE), 1);
+ OUT_RING (chan, 1);
+ BEGIN_RING(chan, RING_3D(LINE_LAST_PIXEL), 1);
+ OUT_RING (chan, 0);
nvc0_magic_3d_init(chan);
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)
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) {