aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-09-30 15:22:38 -0700
committerIan Romanick <[email protected]>2015-10-06 10:41:56 -0700
commit68976a5a009beeb5118a52c31b0e7784202707a3 (patch)
treec0371cc9e02a9a655a698c617e4b067af50eef3a /src/mesa/drivers
parentfad5fd3a254c9c37bc25cd356d2bced0dcfe9e26 (diff)
i965: Use C99 initializers for primitive arrays
Using C99 initializers for the primitive arrays makes things more readable. Signed-off-by: Ian Romanick <[email protected]> Suggested-by: Matt Turner <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 6a75e067915..c0517e6c0fb 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -55,34 +55,34 @@
#define FILE_DEBUG_FLAG DEBUG_PRIMS
static const GLuint prim_to_hw_prim[GL_TRIANGLE_STRIP_ADJACENCY+1] = {
- _3DPRIM_POINTLIST,
- _3DPRIM_LINELIST,
- _3DPRIM_LINELOOP,
- _3DPRIM_LINESTRIP,
- _3DPRIM_TRILIST,
- _3DPRIM_TRISTRIP,
- _3DPRIM_TRIFAN,
- _3DPRIM_QUADLIST,
- _3DPRIM_QUADSTRIP,
- _3DPRIM_POLYGON,
- _3DPRIM_LINELIST_ADJ,
- _3DPRIM_LINESTRIP_ADJ,
- _3DPRIM_TRILIST_ADJ,
- _3DPRIM_TRISTRIP_ADJ,
+ [GL_POINTS] =_3DPRIM_POINTLIST,
+ [GL_LINES] = _3DPRIM_LINELIST,
+ [GL_LINE_LOOP] = _3DPRIM_LINELOOP,
+ [GL_LINE_STRIP] = _3DPRIM_LINESTRIP,
+ [GL_TRIANGLES] = _3DPRIM_TRILIST,
+ [GL_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP,
+ [GL_TRIANGLE_FAN] = _3DPRIM_TRIFAN,
+ [GL_QUADS] = _3DPRIM_QUADLIST,
+ [GL_QUAD_STRIP] = _3DPRIM_QUADSTRIP,
+ [GL_POLYGON] = _3DPRIM_POLYGON,
+ [GL_LINES_ADJACENCY] = _3DPRIM_LINELIST_ADJ,
+ [GL_LINE_STRIP_ADJACENCY] = _3DPRIM_LINESTRIP_ADJ,
+ [GL_TRIANGLES_ADJACENCY] = _3DPRIM_TRILIST_ADJ,
+ [GL_TRIANGLE_STRIP_ADJACENCY] = _3DPRIM_TRISTRIP_ADJ,
};
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
};
uint32_t