i965/gs: Add new primitive types.
authorPaul Berry <stereotype441@gmail.com>
Sun, 28 Apr 2013 14:43:18 +0000 (07:43 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 17 Sep 2013 22:18:07 +0000 (15:18 -0700)
As part of its support for geometry shaders, GL 3.2 introduces four
new primitive types: GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY,
GL_TRIANGLES_ADJACENCY, and GL_TRIANGLE_STRIP_ADJACENCY.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_draw.c

index 9d41529edb7b34f1ce3c63332c66a6b3505dd791..494693cc3a06c8548c5cf47317d5f70a596f2616 100644 (file)
@@ -1638,7 +1638,7 @@ gen7_emit_depth_stencil_hiz(struct brw_context *brw,
                             uint32_t width, uint32_t height,
                             uint32_t tile_x, uint32_t tile_y);
 
-extern const GLuint prim_to_hw_prim[GL_POLYGON+1];
+extern const GLuint prim_to_hw_prim[GL_TRIANGLE_STRIP_ADJACENCY+1];
 
 void
 brw_setup_vec4_key_clip_info(struct brw_context *brw,
index 42f268598d42c19d5665e15ddf29e3514fbaf957..549f9d0a598c4337ed558c1170ca66c88624e47e 100644 (file)
@@ -54,7 +54,7 @@
 
 #define FILE_DEBUG_FLAG DEBUG_PRIMS
 
-const GLuint prim_to_hw_prim[GL_POLYGON+1] = {
+const GLuint prim_to_hw_prim[GL_TRIANGLE_STRIP_ADJACENCY+1] = {
    _3DPRIM_POINTLIST,
    _3DPRIM_LINELIST,
    _3DPRIM_LINELOOP,
@@ -64,7 +64,11 @@ const GLuint prim_to_hw_prim[GL_POLYGON+1] = {
    _3DPRIM_TRIFAN,
    _3DPRIM_QUADLIST,
    _3DPRIM_QUADSTRIP,
-   _3DPRIM_POLYGON
+   _3DPRIM_POLYGON,
+   _3DPRIM_LINELIST_ADJ,
+   _3DPRIM_LINESTRIP_ADJ,
+   _3DPRIM_TRILIST_ADJ,
+   _3DPRIM_TRISTRIP_ADJ,
 };