diff options
author | Marek Olšák <[email protected]> | 2012-01-27 20:45:33 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-01-31 00:54:34 +0100 |
commit | ac3a765589a881c56f351514d6436760edd4a291 (patch) | |
tree | d94493ba6efc06dfb7391033b070deda6695e5d8 /src/gallium/drivers/r300 | |
parent | cb43954308f44717814b53f40672163384cc005e (diff) |
r300g: set minimum point size to 1.0 for non-sprite non-aa points
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 33fdf3b6261..940443050ba 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1017,7 +1017,6 @@ static void* r300_create_rs_state(struct pipe_context* pipe, const struct pipe_rasterizer_state* state) { struct r300_rs_state* rs = CALLOC_STRUCT(r300_rs_state); - float psiz; uint32_t vap_control_status; /* R300_VAP_CNTL_STATUS: 0x2140 */ uint32_t vap_clip_cntl; /* R300_VAP_CLIP_CNTL: 0x221C */ uint32_t point_size; /* R300_GA_POINT_SIZE: 0x421c */ @@ -1070,14 +1069,16 @@ static void* r300_create_rs_state(struct pipe_context* pipe, if (state->point_size_per_vertex) { /* Per-vertex point size. * Clamp to [0, max FB size] */ - psiz = pipe->screen->get_paramf(pipe->screen, + float min_psiz = util_get_min_point_size(state); + float max_psiz = pipe->screen->get_paramf(pipe->screen, PIPE_CAPF_MAX_POINT_WIDTH); point_minmax = - pack_float_16_6x(psiz) << R300_GA_POINT_MINMAX_MAX_SHIFT; + (pack_float_16_6x(min_psiz) << R300_GA_POINT_MINMAX_MIN_SHIFT) | + (pack_float_16_6x(max_psiz) << R300_GA_POINT_MINMAX_MAX_SHIFT); } else { /* We cannot disable the point-size vertex output, * so clamp it. */ - psiz = state->point_size; + float psiz = state->point_size; point_minmax = (pack_float_16_6x(psiz) << R300_GA_POINT_MINMAX_MIN_SHIFT) | (pack_float_16_6x(psiz) << R300_GA_POINT_MINMAX_MAX_SHIFT); |