hardware/intel/intel-driver
Revision | ce682a73e2a248f1feae2d0aad8644afab4f0df6 (tree) |
---|---|
Time | 2015-01-14 12:03:37 |
Author | Joe Konno <joe.konno@inte...> |
Commiter | Zhao, Yakui |
BDW+: disable SGVS
BDW introduces separate packets for controlling instancing and system
generated values (eg vertex id and instance id). We don't use
instancing, but still need to disable sgvs to avoid undefined behaviour
when some other driver (mesa) uses it.
Signed-off-by: Joe Konno <joe.konno@intel.com>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Charles <daniel.charles@intel.com>
(cherry picked from commit 4caa37b895d39af754e2b2307879752130731f56)
@@ -1001,6 +1001,10 @@ gen8_emit_vertex_element_state(VADriverContextP ctx) | ||
1001 | 1001 | OUT_BATCH(batch, i); |
1002 | 1002 | OUT_BATCH(batch, 0); |
1003 | 1003 | } |
1004 | + | |
1005 | + /* Disable system-generated values. */ | |
1006 | + OUT_BATCH(batch, GEN8_3DSTATE_VF_SGVS | (2 - 2)); | |
1007 | + OUT_BATCH(batch, 0); | |
1004 | 1008 | } |
1005 | 1009 | |
1006 | 1010 | static void |
@@ -936,6 +936,9 @@ gen9_emit_vertices(VADriverContextP ctx) | ||
936 | 936 | OUT_BATCH(batch, 0); |
937 | 937 | OUT_BATCH(batch, 0); |
938 | 938 | |
939 | + OUT_BATCH(batch, GEN8_3DSTATE_VF_SGVS | (2 - 2)); | |
940 | + OUT_BATCH(batch, 0); | |
941 | + | |
939 | 942 | BEGIN_BATCH(batch, 7); |
940 | 943 | OUT_BATCH(batch, CMD_3DPRIMITIVE | (7 - 2)); |
941 | 944 | OUT_BATCH(batch, |
@@ -746,6 +746,8 @@ | ||
746 | 746 | #define _3DPRIM_LINESTRIP_CONT_BF 0x14 |
747 | 747 | #define _3DPRIM_TRIFAN_NOSTIPPLE 0x15 |
748 | 748 | |
749 | +#define GEN8_3DSTATE_VF_INSTANCING CMD(3, 0, 0x49) | |
750 | +#define GEN8_3DSTATE_VF_SGVS CMD(3, 0, 0x4a) | |
749 | 751 | #define GEN8_3DSTATE_VF_TOPOLOGY CMD(3, 0, 0x4b) |
750 | 752 | |
751 | 753 | #define I965_TILEWALK_XMAJOR 0 |