softpipe: rename PRIM_x to QUAD_PRIM_x

This commit is contained in:
Brian 2009-02-11 21:38:20 -07:00
parent 7925274da3
commit 253d2d1676
4 changed files with 12 additions and 11 deletions

View file

@ -34,9 +34,9 @@
#include "pipe/p_state.h"
#include "tgsi/tgsi_exec.h"
#define PRIM_POINT 1
#define PRIM_LINE 2
#define PRIM_TRI 3
#define QUAD_PRIM_POINT 1
#define QUAD_PRIM_LINE 2
#define QUAD_PRIM_TRI 3
/* The rasterizer generates 2x2 quads of fragment and feeds them to
@ -65,7 +65,7 @@ struct quad_header_input
int y0;
float coverage[QUAD_SIZE]; /** fragment coverage for antialiasing */
unsigned facing:1; /**< Front (0) or back (1) facing? */
unsigned prim:2; /**< PRIM_POINT, LINE, TRI */
unsigned prim:2; /**< QUAD_PRIM_POINT, LINE, TRI */
};
struct quad_header_inout

View file

@ -46,10 +46,11 @@ static void
coverage_quad(struct quad_stage *qs, struct quad_header *quad)
{
struct softpipe_context *softpipe = qs->softpipe;
const uint prim = quad->input.prim;
if ((softpipe->rasterizer->poly_smooth && quad->input.prim == PRIM_TRI) ||
(softpipe->rasterizer->line_smooth && quad->input.prim == PRIM_LINE) ||
(softpipe->rasterizer->point_smooth && quad->input.prim == PRIM_POINT)) {
if ((softpipe->rasterizer->poly_smooth && prim == QUAD_PRIM_TRI) ||
(softpipe->rasterizer->line_smooth && prim == QUAD_PRIM_LINE) ||
(softpipe->rasterizer->point_smooth && prim == QUAD_PRIM_POINT)) {
uint cbuf;
/* loop over colorbuffer outputs */

View file

@ -19,7 +19,7 @@ stipple_quad(struct quad_stage *qs, struct quad_header *quad)
static const uint bit31 = 1 << 31;
static const uint bit30 = 1 << 30;
if (quad->input.prim == PRIM_TRI) {
if (quad->input.prim == QUAD_PRIM_TRI) {
struct softpipe_context *softpipe = qs->softpipe;
/* need to invert Y to index into OpenGL's stipple pattern */
int y0, y1;

View file

@ -968,7 +968,7 @@ void setup_tri( struct setup_context *setup,
setup_tri_coefficients( setup );
setup_tri_edges( setup );
setup->quad.input.prim = PRIM_TRI;
setup->quad.input.prim = QUAD_PRIM_TRI;
setup->span.y = 0;
setup->span.y_flags = 0;
@ -1206,7 +1206,7 @@ setup_line(struct setup_context *setup,
setup->quad.input.x0 = setup->quad.input.y0 = -1;
setup->quad.inout.mask = 0x0;
setup->quad.input.prim = PRIM_LINE;
setup->quad.input.prim = QUAD_PRIM_LINE;
/* XXX temporary: set coverage to 1.0 so the line appears
* if AA mode happens to be enabled.
*/
@ -1361,7 +1361,7 @@ setup_point( struct setup_context *setup,
}
}
setup->quad.input.prim = PRIM_POINT;
setup->quad.input.prim = QUAD_PRIM_POINT;
if (halfSize <= 0.5 && !round) {
/* special case for 1-pixel points */