summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c14
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c2
2 files changed, 7 insertions, 9 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index e16fa479e5f..593d7436037 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -4067,15 +4067,13 @@ nv50_pntc_replace(struct nv50_context *nv50, uint32_t pntc[8], unsigned base)
}
if (j < vp->info.num_outputs) {
- ubyte mode =
- nv50->rasterizer->pipe.sprite_coord_mode[si];
+ ubyte enable =
+ (nv50->rasterizer->pipe.sprite_coord_enable >> si) & 1;
- if (mode == PIPE_SPRITE_COORD_NONE) {
+ if (enable == 0) {
m += n;
continue;
- } else
- if (mode == PIPE_SPRITE_COORD_LOWER_LEFT)
- origin = 0;
+ }
}
/* this is either PointCoord or replaced by sprite coords */
@@ -4086,7 +4084,7 @@ nv50_pntc_replace(struct nv50_context *nv50, uint32_t pntc[8], unsigned base)
++m;
}
}
- return origin;
+ return (nv50->rasterizer->pipe.sprite_coord_mode == PIPE_SPRITE_COORD_LOWER_LEFT ? 0 : origin);
}
static int
@@ -4202,7 +4200,7 @@ nv50_linkage_validate(struct nv50_context *nv50)
so_method(so, tesla, NV50TCL_NOPERSPECTIVE_BITMAP(0), 4);
so_datap (so, lin, 4);
- if (nv50->rasterizer->pipe.point_sprite) {
+ if (nv50->rasterizer->pipe.sprite_coord_enable) {
so_method(so, tesla, NV50TCL_POINT_SPRITE_CTRL, 1);
so_data (so,
nv50_pntc_replace(nv50, pcrd, (reg[4] >> 8) & 0xff));
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 1f67df814b1..cbe2f349c2b 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -318,7 +318,7 @@ nv50_rasterizer_state_create(struct pipe_context *pipe,
so_data (so, fui(cso->point_size));
so_method(so, tesla, NV50TCL_POINT_SPRITE_ENABLE, 1);
- so_data (so, cso->point_sprite);
+ so_data (so, cso->sprite_coord_enable ? 1 : 0);
so_method(so, tesla, NV50TCL_POLYGON_MODE_FRONT, 3);
if (cso->front_winding == PIPE_WINDING_CCW) {