summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-02-28 17:02:42 -0800
committerJason Ekstrand <[email protected]>2017-03-01 16:14:01 -0800
commit0d2c9ce1ce93848ce4c13d3467d58fa2fc36d0ca (patch)
treefc2dae595a3fd685442cb494db3253bc77750b96 /src/mesa/drivers
parent406321caeb0027f853a1356a2a864364ba7eb80c (diff)
i965: Get rid of BRW_PRIM_OFFSET
This is a relic of when we wired up meta to be able to use RECTLIST primitives. It's no longer needed. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_util.c8
2 files changed, 2 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 3c5c6c484d7..f443cac3278 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -86,14 +86,6 @@
#define _3DPRIM_TRIFAN_NOSTIPPLE 0x16
#define _3DPRIM_PATCHLIST(n) ({ assert(n > 0 && n <= 32); 0x20 + (n - 1); })
-
-/* We use this offset to be able to pass native primitive types in struct
- * _mesa_prim::mode. Native primitive types are BRW_PRIM_OFFSET +
- * native_type, which should be different from all GL types and still fit in
- * the 8 bits avialable. */
-
-#define BRW_PRIM_OFFSET 0x80
-
#define BRW_ANISORATIO_2 0
#define BRW_ANISORATIO_4 1
#define BRW_ANISORATIO_6 2
diff --git a/src/mesa/drivers/dri/i965/brw_util.c b/src/mesa/drivers/dri/i965/brw_util.c
index 934b6b8d627..f190a68cade 100644
--- a/src/mesa/drivers/dri/i965/brw_util.c
+++ b/src/mesa/drivers/dri/i965/brw_util.c
@@ -119,10 +119,6 @@ static const GLuint prim_to_hw_prim[GL_TRIANGLE_STRIP_ADJACENCY+1] = {
uint32_t
get_hw_prim_for_gl_prim(int mode)
{
- if (mode >= BRW_PRIM_OFFSET)
- return mode - BRW_PRIM_OFFSET;
- else {
- assert(mode < ARRAY_SIZE(prim_to_hw_prim));
- return prim_to_hw_prim[mode];
- }
+ assert(mode < ARRAY_SIZE(prim_to_hw_prim));
+ return prim_to_hw_prim[mode];
}