diff options
-rw-r--r-- | src/mesa/drivers/dri/nouveau_winsys/nouveau_context.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/nv40/nv40_context.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/nv40/nv40_state.c | 14 | ||||
-rw-r--r-- | src/mesa/pipe/nv40/nv40_state.h | 1 |
4 files changed, 18 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau_winsys/nouveau_context.c b/src/mesa/drivers/dri/nouveau_winsys/nouveau_context.c index 584d236f34..67df43647a 100644 --- a/src/mesa/drivers/dri/nouveau_winsys/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau_winsys/nouveau_context.c @@ -25,6 +25,7 @@ #define need_GL_ARB_fragment_program #define need_GL_ARB_multisample #define need_GL_ARB_occlusion_query +#define need_GL_ARB_point_parameters #define need_GL_ARB_texture_compression #define need_GL_ARB_vertex_program #define need_GL_ARB_vertex_buffer_object @@ -44,6 +45,7 @@ const struct dri_extension nv40_extensions[] = { "GL_ARB_fragment_program", NULL }, { "GL_ARB_multisample", GL_ARB_multisample_functions }, { "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions }, + { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions }, { "GL_ARB_texture_border_clamp", NULL }, { "GL_ARB_texture_compression", GL_ARB_texture_compression_functions }, { "GL_ARB_texture_cube_map", NULL }, diff --git a/src/mesa/pipe/nv40/nv40_context.c b/src/mesa/pipe/nv40/nv40_context.c index ba9d875e0e..8706ed1c07 100644 --- a/src/mesa/pipe/nv40/nv40_context.c +++ b/src/mesa/pipe/nv40/nv40_context.c @@ -54,7 +54,7 @@ nv40_get_param(struct pipe_context *pipe, int param) case PIPE_CAP_ANISOTROPIC_FILTER: return 1; case PIPE_CAP_POINT_SPRITE: - return 0; + return 1; case PIPE_CAP_MAX_RENDER_TARGETS: return 4; case PIPE_CAP_OCCLUSION_QUERY: diff --git a/src/mesa/pipe/nv40/nv40_state.c b/src/mesa/pipe/nv40/nv40_state.c index b1928a5f91..1b8989b844 100644 --- a/src/mesa/pipe/nv40/nv40_state.c +++ b/src/mesa/pipe/nv40/nv40_state.c @@ -278,6 +278,7 @@ nv40_rasterizer_state_create(struct pipe_context *pipe, const struct pipe_rasterizer_state *cso) { struct nv40_rasterizer_state *rs; + int i; /*XXX: ignored: * light_twoside @@ -326,6 +327,16 @@ nv40_rasterizer_state_create(struct pipe_context *pipe, break; } + if (cso->point_sprite) { + rs->point_sprite = (1 << 0); + for (i = 0; i < 8; i++) { + if (cso->sprite_coord_mode[i] != PIPE_SPRITE_COORD_NONE) + rs->point_sprite |= (1 << (8 + i)); + } + } else { + rs->point_sprite = 0; + } + return (void *)rs; } @@ -358,6 +369,9 @@ nv40_rasterizer_state_bind(struct pipe_context *pipe, void *hwcso) BEGIN_RING(curie, NV40TCL_POLYGON_STIPPLE_ENABLE, 1); OUT_RING (rs->poly_stipple_en); + + BEGIN_RING(curie, NV40TCL_POINT_SPRITE, 1); + OUT_RING (rs->point_sprite); } static void diff --git a/src/mesa/pipe/nv40/nv40_state.h b/src/mesa/pipe/nv40/nv40_state.h index d0114972ef..c6d22ceaa8 100644 --- a/src/mesa/pipe/nv40/nv40_state.h +++ b/src/mesa/pipe/nv40/nv40_state.h @@ -51,6 +51,7 @@ struct nv40_rasterizer_state { uint32_t cull_face; uint32_t cull_face_en; + uint32_t point_sprite; }; struct nv40_vertex_program { |