summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-01-27 20:29:15 +0100
committerMarek Olšák <[email protected]>2012-01-31 00:54:34 +0100
commitcb43954308f44717814b53f40672163384cc005e (patch)
tree9353cdc88f0c40d476df418e6426482ab2ec0cc2 /src/gallium/auxiliary
parentb478fcb9a99ef084674529f7db95f041db4a4796 (diff)
svga: set POINTSIZEMIN to 1.0 for non-sprite non-aa points
v2: add the helper function, improve the condition
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_inlines.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index 9660cdc6eae..c90dc57073f 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -461,6 +461,17 @@ static INLINE void util_copy_vertex_buffers(struct pipe_vertex_buffer *dst,
memcpy(dst, src, src_count * sizeof(struct pipe_vertex_buffer));
}
+static INLINE float
+util_get_min_point_size(const struct pipe_rasterizer_state *state)
+{
+ /* The point size should be clamped to this value at the rasterizer stage.
+ */
+ return state->gl_rasterization_rules &&
+ !state->point_quad_rasterization &&
+ !state->point_smooth &&
+ !state->multisample ? 1.0f : 0.0f;
+}
+
#ifdef __cplusplus
}
#endif