summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c16
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.h7
2 files changed, 7 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 91f8d0b5dcb..e72ff5e5a8f 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -122,20 +122,6 @@ static void compile_gs_prog( struct brw_context *brw,
ralloc_free(mem_ctx);
}
-static const GLenum gs_prim[] = {
- [_3DPRIM_POINTLIST] = _3DPRIM_POINTLIST,
- [_3DPRIM_LINELIST] = _3DPRIM_LINELIST,
- [_3DPRIM_LINELOOP] = _3DPRIM_LINELOOP,
- [_3DPRIM_LINESTRIP] = _3DPRIM_LINELIST,
- [_3DPRIM_TRILIST] = _3DPRIM_TRILIST,
- [_3DPRIM_TRISTRIP] = _3DPRIM_TRILIST,
- [_3DPRIM_TRIFAN] = _3DPRIM_TRILIST,
- [_3DPRIM_QUADLIST] = _3DPRIM_QUADLIST,
- [_3DPRIM_QUADSTRIP] = _3DPRIM_QUADSTRIP,
- [_3DPRIM_POLYGON] = _3DPRIM_TRILIST,
- [_3DPRIM_RECTLIST] = _3DPRIM_RECTLIST,
-};
-
static void populate_key( struct brw_context *brw,
struct brw_gs_prog_key *key )
{
@@ -148,7 +134,7 @@ static void populate_key( struct brw_context *brw,
key->attrs = brw->vs.prog_data->outputs_written;
/* BRW_NEW_PRIMITIVE */
- key->primitive = gs_prim[brw->primitive];
+ key->primitive = brw->primitive;
/* _NEW_LIGHT */
key->pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
diff --git a/src/mesa/drivers/dri/i965/brw_gs.h b/src/mesa/drivers/dri/i965/brw_gs.h
index 0e4ff3fedf6..12889a62e6b 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.h
+++ b/src/mesa/drivers/dri/i965/brw_gs.h
@@ -41,7 +41,12 @@
struct brw_gs_prog_key {
GLbitfield64 attrs;
- GLuint primitive:8; /**< Hardware primitive, such as _3DPRIM_TRILIST. */
+
+ /**
+ * Hardware primitive type being drawn, e.g. _3DPRIM_TRILIST.
+ */
+ GLuint primitive:8;
+
GLuint pv_first:1;
GLuint need_gs_prog:1;
GLuint userclip_active:1;