diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-05-08 22:20:39 +0200 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-05-08 23:19:30 +0200 |
commit | 084580fa43320b1a0878b572c6804aa5a40b2f9d (patch) | |
tree | ff96b68358518baab81eb0acfdcbf8f563142f56 /src/gallium | |
parent | 34a5109bc2c3f625f178cb80c782b2218ba06f45 (diff) |
r300g: follow pipe_rasterizer_state::point_size_per_vertex
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 5a65f0ccfb..1344415861 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -744,10 +744,21 @@ static void* r300_create_rs_state(struct pipe_context* pipe, (pack_float_16_6x(state->point_size) << R300_POINTSIZE_X_SHIFT); /* Point size clamping. */ - psiz = pipe->screen->get_paramf(pipe->screen, - PIPE_CAP_MAX_POINT_WIDTH); - rs->point_minmax = - (pack_float_16_6x(psiz)) << R300_GA_POINT_MINMAX_MAX_SHIFT; + if (state->point_size_per_vertex) { + /* Per-vertex point size. + * Clamp to [0, max FB size] */ + psiz = pipe->screen->get_paramf(pipe->screen, + PIPE_CAP_MAX_POINT_WIDTH); + rs->point_minmax = + pack_float_16_6x(psiz) << R300_GA_POINT_MINMAX_MAX_SHIFT; + } else { + /* We cannot disable the point-size vertex output, + * so clamp it. */ + psiz = state->point_size; + rs->point_minmax = + (pack_float_16_6x(psiz) << R300_GA_POINT_MINMAX_MIN_SHIFT) | + (pack_float_16_6x(psiz) << R300_GA_POINT_MINMAX_MAX_SHIFT); + } /* Line control. */ rs->line_control = pack_float_16_6x(state->line_width) | |