From 31970ab9a6526177c585cb92693178b7d5408916 Mon Sep 17 00:00:00 2001 From: Lyude Date: Wed, 15 Mar 2017 17:15:03 -0400 Subject: nvc0: Add support for NV_fill_rectangle for the GM200+ This enables support for the GL_NV_fill_rectangle extension on the GM200+ for Desktop OpenGL. Signed-off-by: Lyude Changes since v1: - Fix commit message - Add note to reldocs Changes since v2: - Remove unnessecary parens in nvc0_screen_get_param() - Fix sorting in release notes - Don't execute FILL_RECTANGLE method on pre-GM200+ GPUs Reviewed-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_state.c') diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c index 32233a51ff2..c51c9a7778f 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c @@ -211,6 +211,7 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe, const struct pipe_rasterizer_state *cso) { struct nvc0_rasterizer_stateobj *so; + uint16_t class_3d = nouveau_screen(pipe->screen)->class_3d; uint32_t reg; so = CALLOC_STRUCT(nvc0_rasterizer_stateobj); @@ -261,6 +262,12 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe, SB_IMMED_3D(so, POINT_SPRITE_ENABLE, cso->point_quad_rasterization); SB_IMMED_3D(so, POINT_SMOOTH_ENABLE, cso->point_smooth); + if (class_3d >= GM200_3D_CLASS) { + SB_IMMED_3D(so, FILL_RECTANGLE, + cso->fill_front == PIPE_POLYGON_MODE_FILL_RECTANGLE ? + NVC0_3D_FILL_RECTANGLE_ENABLE : 0); + } + SB_BEGIN_3D(so, MACRO_POLYGON_MODE_FRONT, 1); SB_DATA (so, nvgl_polygon_mode(cso->fill_front)); SB_BEGIN_3D(so, MACRO_POLYGON_MODE_BACK, 1); -- cgit v1.2.3