diff options
author | Christoph Bumiller <[email protected]> | 2011-03-11 10:00:32 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-03-13 13:23:54 +0100 |
commit | d9f1310e519ac8182329fcd3e6c357d44d110955 (patch) | |
tree | 623fb7c4d1df314cf970c8c0ed3fdaa172232f2e /src/gallium/drivers/nvc0/nvc0_state.c | |
parent | 11f07a35f4734401999c00749e36f39d3e7ad161 (diff) |
nvc0: move sprite coord replace state into cso
It's not dependent on any other state anymore now.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_state.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_state.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c index f230292316f..bbcac3938f5 100644 --- a/src/gallium/drivers/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nvc0/nvc0_state.c @@ -166,6 +166,7 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe, const struct pipe_rasterizer_state *cso) { struct nvc0_rasterizer_stateobj *so; + uint32_t reg; so = CALLOC_STRUCT(nvc0_rasterizer_stateobj); if (!so) @@ -202,6 +203,13 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe, SB_BEGIN_3D(so, POINT_SIZE, 1); SB_DATA (so, fui(cso->point_size)); } + + reg = (cso->sprite_coord_mode == PIPE_SPRITE_COORD_UPPER_LEFT) ? + NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_UPPER_LEFT : + NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_LOWER_LEFT; + + SB_BEGIN_3D(so, POINT_COORD_REPLACE, 1); + SB_DATA (so, ((cso->sprite_coord_enable & 0xff) << 3) | reg); SB_IMMED_3D(so, POINT_SPRITE_ENABLE, cso->point_quad_rasterization); SB_IMMED_3D(so, POINT_SMOOTH_ENABLE, cso->point_smooth); |