From 4a4daa75a85db22cd37ebd533ebbccb427e07077 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 3 Feb 2010 17:25:14 +0100 Subject: gallium: clean up point sprite rasterizer state Don't need sprite coord origin per coord. Also, don't need separate sprite enable bit - if all coords have it diabled, then there are no point sprites (technically, there's a distinction in pre-GL3, but it only differs in having more leniency in clamping to max size, something the state tracker would need to handle and the hardware won't bother anyway). Also, use packed field for the per-coord enables. All in all, should save 3 dwords in rasterizer state (from 10 down to 7). --- src/gallium/drivers/nv40/nv40_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/nv40') diff --git a/src/gallium/drivers/nv40/nv40_state.c b/src/gallium/drivers/nv40/nv40_state.c index ed0ca9e02c..a5c5e291f3 100644 --- a/src/gallium/drivers/nv40/nv40_state.c +++ b/src/gallium/drivers/nv40/nv40_state.c @@ -401,11 +401,11 @@ nv40_rasterizer_state_create(struct pipe_context *pipe, } so_method(so, curie, NV40TCL_POINT_SPRITE, 1); - if (cso->point_sprite) { + if (cso->sprite_coord_enable) { unsigned psctl = (1 << 0), i; for (i = 0; i < 8; i++) { - if (cso->sprite_coord_mode[i] != PIPE_SPRITE_COORD_NONE) + if ((cso->sprite_coord_enable >> i) & 1) psctl |= (1 << (8 + i)); } -- cgit v1.2.3 From 68f93ea3eb83cfad014b8ec93cec3564c1aa9833 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Thu, 4 Feb 2010 21:35:28 +0100 Subject: gallium: add point_quad_rasterization bit to rasterizer state This determines if points should be rasterized according to GL point rules or as normal quads (GL point sprites / d3d points / d3d point sprites). --- src/gallium/drivers/nv40/nv40_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/nv40') diff --git a/src/gallium/drivers/nv40/nv40_state.c b/src/gallium/drivers/nv40/nv40_state.c index a5c5e291f3..5084c48eeb 100644 --- a/src/gallium/drivers/nv40/nv40_state.c +++ b/src/gallium/drivers/nv40/nv40_state.c @@ -401,7 +401,7 @@ nv40_rasterizer_state_create(struct pipe_context *pipe, } so_method(so, curie, NV40TCL_POINT_SPRITE, 1); - if (cso->sprite_coord_enable) { + if (cso->point_quad_rasterization) { unsigned psctl = (1 << 0), i; for (i = 0; i < 8; i++) { -- cgit v1.2.3