• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    NV_conservative_raster_pre_snap
4
5Name Strings
6
7    GL_NV_conservative_raster_pre_snap
8
9Contact
10
11    Kedarnath Thangudu, NVIDIA Corporation (kthangudu 'at' nvidia.com)
12
13Contributors
14
15    Eric Werness, NVIDIA Corporation
16
17Status
18
19    Shipping in NVIDIA release 388.XX drivers and up
20
21Version
22
23    Last Modified Date:         November 15, 2017
24    Revision:                   1
25
26Number
27
28    OpenGL Extension #517
29    OpenGL ES Extension #297
30
31Dependencies
32
33    This extension is written against the NV_conservative_raster_pre_snap-
34    _triangles extension as applied to OpenGL 4.3 specification
35    (Compatibility Profile) but may be used with the Core profile or OpenGL ES
36    2.0 or later.
37
38Overview
39
40    NV_conservative_raster_pre_snap_triangles provides a new mode to achieve
41    rasterization of triangles that is conservative w.r.t the triangle at
42    infinite precision i.e. before it is snapped to the sub-pixel grid.  This
43    extension provides a new mode that expands this functionality to lines and
44    points.
45
46New Procedures and Functions
47
48    None.
49
50New Tokens
51
52    Accepted by the <param> parameter of ConservativeRasterParameteriNV:
53        CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV            0x9550
54
55Additions to Chapter 14 of the OpenGL 4.3 (Compatibility Profile) Specification
56(Fixed-Function Primitive Assembly and Rasterization)
57
58    Modify the paragraph describing ConservativeRasterParameteriNV in the
59    subsection 14.6.X "Conservative Rasterization" added by NV_conservative_-
60    raster_pre_snap_triangles
61
62    ... The <param> parameter specifies the conservative raster mode to be
63    used. If the mode is set to CONSERVATIVE_RASTER_MODE_POST_SNAP_NV, the
64    generated fragments are conservative w.r.t the primitive after it is
65    snapped to sub-pixel grid.  If the mode is set to CONSERVATIVE_RASTER_MODE_-
66    PRE_SNAP_NV the fragments generated for a primitive will be conservative
67    w.r.t the primitive at infinite precision. Since non-degenerate
68    primitives may become degenerate due to vertex snapping, this mode will
69    generate fragments for zero length lines and zero area triangles which are
70    otherwise culled in the CONSERVATIVE_RASTER_MODE_POST_SNAP_NV. This mode
71    may also generate fragments for pixels that are within half a sub-pixel
72    distance away from the primitive at infinite precision.  If the mode is
73    set to CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV, the pre-snap
74    conservative raster behavior described would apply only to triangles.  The
75    default mode is set to CONSERVATIVE_RASTER_MODE_POST_SNAP_NV.
76
77    Modify the paragraphs describing conservative rasterization behavior for
78    points, lines and polygons added by NV_conservative_raster as follows:
79
80    If CONSERVATIVE_RASTERIZATION_NV is enabled, points are rasterized
81    according to point rasterization rules (section 14.4), except that a
82    fragment will be generated for a framebuffer pixel if the point's region
83    (a circle when MULTISAMPLING is enabled and POINT_SPRITE is disabled, or a
84    square otherwise) covers any portion of the pixel, including its edges or
85    points.  While conservative raster mode PRE_SNAP_NV respects the
86    MULTISAMPLE state, modes POST_SNAP_NV and PRE_SNAP_TRIANGLES_NV always use
87    point multisample rasterization rules (section 14.4.3), whether or not
88    MULTISAMPLE is actually enabled.  When performing conservative
89    rasterization of points, the POINT_SMOOTH enable is ignored and treated as
90    disabled.
91
92    If CONSERVATIVE_RASTERIZATION_NV is enabled, lines are rasterized
93    according to line rasterization rules (section 14.5), except that the
94    LINE_STIPPLE and LINE_SMOOTH enables are ignored and treated as disabled.
95    When the conservative raster mode is POST_SNAP or PRE_SNAP_TRIANGLES,
96    lines with zero length generate no fragments, while a fragment for the
97    pixel that contains the end points will be generated when the mode is
98    PRE_SNAP_NV.  Also, conservative raster mode PRE_SNAP_NV respects the
99    MULTISAMPLE state, while modes POST_SNAP_NV and PRE_SNAP_TRIANGLES_NV
100    always use line multisample rasterization rules (section 14.5.4), whether
101    or not MULTISAMPLE is actually enabled.
102
103    If CONSERVATIVE_RASTERIZATION_NV is enabled, polygons are rasterized
104    according to polygon rasterization rules (section 14.6), except that
105    the POLYGON_SMOOTH enable is ignored and treated as disabled.
106    When the conservative raster mode is POST_SNAP_NV, polygons with
107    an area of zero generate no fragments, even for pixels that contain a
108    vertex or edge of the zero-area polygon, while modes PRE_SNAP_TRIANGLES
109    and PRE_SNAP_NV generate them.  Also, conservative raster mode PRE_SNAP_NV
110    respects the MULTISAMPLE state, while modes POST_SNAP_NV and
111    PRE_SNAP_TRIANGLES_NV always use polygon multisample rasterization rules
112    (section 14.6.6), whether or not MULTISAMPLE is actually enabled.
113
114New State
115
116    None.
117
118Additions to the AGL/GLX/WGL Specifications
119
120    None.
121
122GLX Protocol
123
124    None.
125
126Modifications to the OpenGL Shading Language Specification, Version 4.30
127
128    None.
129
130Errors
131
132    INVALID_ENUM is generated by ConservativeRasterParameteriNV if <pname> is
133    not CONSERVATIVE_RASTER_MODE_NV, or if <param> is not CONSERVATIVE_RASTER_-
134    MODE_POST_SNAP_NV, CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV or CONSERVATIVE_-
135    RASTER_MODE_PRE_SNAP_TRIANGLES_NV.
136
137Issues
138
139    (1) Would MODE_PRE_SNAP_NV generate fragments for zero width lines and
140    zero diameter points?
141
142    RESOLVED. No. Vertex snapping to the sub-pixel grid may cause in a line
143    to become zero length, so, MODE_PRE_SNAP will generate fragments for
144    zero length lines. Zero width lines and zero diameter points are culled as
145    normal in both MODE_PRE_SNAP or MODE_POST_SNAP modes.
146
147Revision History
148
149    Revision 1
150      - Internal revisions.
151
152