From: Kenneth Graunke <kenn...@whitecape.org> We really should guarantee that vertex elements non-instanced, especially since we don't use our own hardware context - other programs can change this on us.
Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Acked-by: Sean V Kelley <sea...@posteo.de> --- src/gen8_render.c | 8 ++++++++ src/i965_defines.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/gen8_render.c b/src/gen8_render.c index b7494a1..8a8012d 100644 --- a/src/gen8_render.c +++ b/src/gen8_render.c @@ -950,6 +950,7 @@ gen8_emit_vertex_element_state(VADriverContextP ctx) { struct i965_driver_data *i965 = i965_driver_data(ctx); struct intel_batchbuffer *batch = i965->batch; + int i; /* * The VUE layout @@ -993,6 +994,13 @@ gen8_emit_vertex_element_state(VADriverContextP ctx) (I965_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_1_SHIFT) | (I965_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_2_SHIFT) | (I965_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_3_SHIFT)); + + /* Disable instancing for all vertex elements. */ + for (i = 0; i < 3; i++) { + OUT_BATCH(batch, GEN8_3DSTATE_VF_INSTANCING | (3 - 2)); + OUT_BATCH(batch, i); + OUT_BATCH(batch, 0); + } } static void diff --git a/src/i965_defines.h b/src/i965_defines.h index 33829db..727abd6 100755 --- a/src/i965_defines.h +++ b/src/i965_defines.h @@ -327,6 +327,9 @@ #define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS CMD(3, 0, 0x2c) #define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS CMD(3, 0, 0x2d) +#define GEN7_3DSTATE_VF CMD(3, 0, 0x0c) +#define GEN8_3DSTATE_VF_INSTANCING CMD(3, 0, 0x49) + #define MFX(pipeline, op, sub_opa, sub_opb) \ (3 << 29 | \ (pipeline) << 27 | \ -- 2.1.4 _______________________________________________ Libva mailing list Libva@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libva