summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_cull.c5
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_twoside.c3
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_unfilled.c12
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_alpha_test.c8
-rw-r--r--src/mesa/pipe/softpipe/sp_state_setup.c5
5 files changed, 14 insertions, 19 deletions
diff --git a/src/mesa/pipe/softpipe/sp_prim_cull.c b/src/mesa/pipe/softpipe/sp_prim_cull.c
index 16920d478a..63099fbee0 100644
--- a/src/mesa/pipe/softpipe/sp_prim_cull.c
+++ b/src/mesa/pipe/softpipe/sp_prim_cull.c
@@ -29,6 +29,7 @@
*/
#include "imports.h"
+#include "pipe/p_defines.h"
#include "sp_context.h"
#include "sp_prim.h"
@@ -75,8 +76,8 @@ static void cull_tri( struct prim_stage *stage,
_mesa_printf("%s %f\n", __FUNCTION__, header->det );
if (header->det != 0) {
- GLuint mode = (header->det < 0) ? WINDING_CW : WINDING_CCW;
-
+ GLuint mode = (header->det < 0) ? PIPE_WINDING_CW : PIPE_WINDING_CCW;
+
if ((mode & cull_stage(stage)->mode) == 0)
stage->next->tri( stage->next, header );
}
diff --git a/src/mesa/pipe/softpipe/sp_prim_twoside.c b/src/mesa/pipe/softpipe/sp_prim_twoside.c
index 8ac0b5c130..5e9f218d1e 100644
--- a/src/mesa/pipe/softpipe/sp_prim_twoside.c
+++ b/src/mesa/pipe/softpipe/sp_prim_twoside.c
@@ -30,6 +30,7 @@
#include "imports.h"
#include "vf/vf.h"
+#include "pipe/p_defines.h"
#include "sp_context.h"
#include "sp_prim.h"
@@ -52,7 +53,7 @@ static void twoside_begin( struct prim_stage *stage )
{
struct twoside_stage *twoside = twoside_stage(stage);
- twoside->facing = (stage->softpipe->setup.front_winding == WINDING_CW) ? -1 : 1;
+ twoside->facing = (stage->softpipe->setup.front_winding == PIPE_WINDING_CW) ? -1 : 1;
stage->next->begin( stage->next );
}
diff --git a/src/mesa/pipe/softpipe/sp_prim_unfilled.c b/src/mesa/pipe/softpipe/sp_prim_unfilled.c
index 73147337fd..ab0dab09d4 100644
--- a/src/mesa/pipe/softpipe/sp_prim_unfilled.c
+++ b/src/mesa/pipe/softpipe/sp_prim_unfilled.c
@@ -31,7 +31,7 @@
#include "sp_context.h"
#include "sp_prim.h"
-
+#include "pipe/p_defines.h"
struct unfilled_stage {
@@ -113,17 +113,17 @@ static void unfilled_tri( struct prim_stage *stage,
GLuint mode = unfilled->mode[header->det < 0];
switch (mode) {
- case FILL_TRI:
+ case PIPE_POLYGON_MODE_FILL:
stage->next->tri( stage->next, header );
break;
-
- case FILL_LINE:
+ case PIPE_POLYGON_MODE_LINE:
lines( stage, header );
break;
-
- case GL_POINT:
+ case PIPE_POLYGON_MODE_POINT:
points( stage, header );
break;
+ default:
+ abort();
}
}
diff --git a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c
index f7cebca6ea..0059b3abf4 100644
--- a/src/mesa/pipe/softpipe/sp_quad_alpha_test.c
+++ b/src/mesa/pipe/softpipe/sp_quad_alpha_test.c
@@ -16,16 +16,8 @@ alpha_test_quad(struct quad_stage *qs, struct quad_header *quad)
{
struct softpipe_context *softpipe = qs->softpipe;
GLuint j;
- struct softpipe_surface *sps = softpipe_surface(softpipe->framebuffer.zbuf);
const GLfloat ref = softpipe->alpha_test.ref;
-#if 0
- assert(sps); /* shouldn't get here if there's no zbuffer */
-#else
- if (!sps)
- return;
-#endif
-
switch (softpipe->alpha_test.func) {
case PIPE_FUNC_NEVER:
quad->mask = 0x0;
diff --git a/src/mesa/pipe/softpipe/sp_state_setup.c b/src/mesa/pipe/softpipe/sp_state_setup.c
index 7be7d7fe40..a249ceb992 100644
--- a/src/mesa/pipe/softpipe/sp_state_setup.c
+++ b/src/mesa/pipe/softpipe/sp_state_setup.c
@@ -25,6 +25,7 @@
*
**************************************************************************/
+#include "pipe/p_defines.h"
#include "sp_context.h"
#include "sp_state.h"
#include "sp_prim.h"
@@ -39,8 +40,8 @@ static void validate_prim_pipe( struct softpipe_context *softpipe )
/* TODO: make the current primitive part of the state and build
* shorter pipelines for lines & points.
*/
- if (softpipe->setup.fill_cw != FILL_TRI ||
- softpipe->setup.fill_ccw != FILL_TRI) {
+ if (softpipe->setup.fill_cw != PIPE_POLYGON_MODE_FILL ||
+ softpipe->setup.fill_ccw != PIPE_POLYGON_MODE_FILL) {
softpipe->prim.unfilled->next = next;
next = softpipe->prim.unfilled;