diff options
author | Ville Syrjälä <[email protected]> | 2015-03-23 14:47:29 +0200 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-10-06 10:41:56 -0700 |
commit | fad5fd3a254c9c37bc25cd356d2bced0dcfe9e26 (patch) | |
tree | a2d7b76362fdea576a1fd2875dc467c17708f9ba /src/mesa/drivers/dri/i915/intel_tris.c | |
parent | 3801fa65c1ebb44d93cc6c5780906e0fa0d0b676 (diff) |
i915: Use C99 initializers for primitive arrays
Using C99 initializers for the primitive arrays makes things more
readable.
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_tris.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_tris.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index ae62a800fb7..1554613aa4f 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -670,16 +670,16 @@ do { \ ***********************************************************************/ static const GLuint hw_prim[GL_POLYGON + 1] = { - PRIM3D_POINTLIST, - PRIM3D_LINELIST, - PRIM3D_LINELIST, - PRIM3D_LINELIST, - PRIM3D_TRILIST, - PRIM3D_TRILIST, - PRIM3D_TRILIST, - PRIM3D_TRILIST, - PRIM3D_TRILIST, - PRIM3D_TRILIST + [GL_POINTS] = PRIM3D_POINTLIST, + [GL_LINES] = PRIM3D_LINELIST, + [GL_LINE_LOOP] = PRIM3D_LINELIST, + [GL_LINE_STRIP] = PRIM3D_LINELIST, + [GL_TRIANGLES] = PRIM3D_TRILIST, + [GL_TRIANGLE_STRIP] = PRIM3D_TRILIST, + [GL_TRIANGLE_FAN] = PRIM3D_TRILIST, + [GL_QUADS] = PRIM3D_TRILIST, + [GL_QUAD_STRIP] = PRIM3D_TRILIST, + [GL_POLYGON] = PRIM3D_TRILIST, }; #define RASTERIZE(x) intelRasterPrimitive( ctx, x, hw_prim[x] ) @@ -1043,16 +1043,16 @@ intelChooseRenderState(struct gl_context * ctx) } static const GLenum reduced_prim[GL_POLYGON + 1] = { - GL_POINTS, - GL_LINES, - GL_LINES, - GL_LINES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES, - GL_TRIANGLES + [GL_POINTS] = GL_POINTS, + [GL_LINES] = GL_LINES, + [GL_LINE_LOOP] = GL_LINES, + [GL_LINE_STRIP] = GL_LINES, + [GL_TRIANGLES] = GL_TRIANGLES, + [GL_TRIANGLE_STRIP] = GL_TRIANGLES, + [GL_TRIANGLE_FAN] = GL_TRIANGLES, + [GL_QUADS] = GL_TRIANGLES, + [GL_QUAD_STRIP] = GL_TRIANGLES, + [GL_POLYGON] = GL_TRIANGLES }; |