summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/softpipe/sp_setup.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-05-29 10:22:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-05-29 10:22:51 +0000
commitc9223eed3c16cd3e98a8f56dda953d8f299de0e3 (patch)
tree53e2a1c3f13bcf6b4ed201d7bc135e7213c94ebe /lib/mesa/src/gallium/drivers/softpipe/sp_setup.h
parent6e8f2d062ab9c198239b9283b2b7ed12f4ea17d8 (diff)
Import Mesa 11.2.2
Diffstat (limited to 'lib/mesa/src/gallium/drivers/softpipe/sp_setup.h')
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_setup.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_setup.h b/lib/mesa/src/gallium/drivers/softpipe/sp_setup.h
index 885be7390..a54dc5dad 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_setup.h
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_setup.h
@@ -30,11 +30,30 @@
struct setup_context;
struct softpipe_context;
+/**
+ * Attribute interpolation mode
+ */
+enum sp_interp_mode {
+ SP_INTERP_POS, /**< special case for frag position */
+ SP_INTERP_CONSTANT,
+ SP_INTERP_LINEAR,
+ SP_INTERP_PERSPECTIVE
+};
+
+
+struct sp_setup_info {
+ unsigned valid;
+ struct {
+ unsigned interp:8; /**< SP_INTERP_X */
+ int src_index:8;
+ } attrib[PIPE_MAX_SHADER_OUTPUTS];
+};
+
void
-sp_setup_tri( struct setup_context *setup,
- const float (*v0)[4],
- const float (*v1)[4],
- const float (*v2)[4] );
+sp_setup_tri(struct setup_context *setup,
+ const float (*v0)[4],
+ const float (*v1)[4],
+ const float (*v2)[4]);
void
sp_setup_line(struct setup_context *setup,
@@ -45,6 +64,11 @@ void
sp_setup_point( struct setup_context *setup,
const float (*v0)[4] );
+static inline unsigned
+sp_clamp_viewport_idx(int idx)
+{
+ return (PIPE_MAX_VIEWPORTS > idx && idx >= 0) ? idx : 0;
+}
struct setup_context *sp_setup_create_context( struct softpipe_context *softpipe );
void sp_setup_prepare( struct setup_context *setup );