From 5507c11f85dda4fbcdc9b36494551c933471a070 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 10 Jun 2013 23:36:59 -0400 Subject: gallium/draw: add limits to the clip and cull distances There are strict limits on those registers. Define the maximums and use them instead of magic numbers. Also allows us to add some extra sanity checks. Suggested by Brian. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Reviewed-by: Jose Fonseca --- src/gallium/include/pipe/p_state.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/include') diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index ff0aac78394..29e8cc9b05f 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -66,6 +66,8 @@ extern "C" { #define PIPE_MAX_SO_BUFFERS 4 #define PIPE_MAX_SO_OUTPUTS 64 #define PIPE_MAX_VIEWPORTS 16 +#define PIPE_MAX_CLIP_OR_CULL_DISTANCE_COUNT 8 +#define PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT 2 struct pipe_reference -- cgit v1.2.3