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_context.h11
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c5
3 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 83604e5592c..01ef0323c93 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -153,6 +153,7 @@ enum brw_state_id {
BRW_STATE_PROGRAM_CACHE,
BRW_STATE_STATE_BASE_ADDRESS,
BRW_STATE_SOL_INDICES,
+ BRW_STATE_VUE_MAP_GEOM_OUT,
};
#define BRW_NEW_URB_FENCE (1 << BRW_STATE_URB_FENCE)
@@ -182,6 +183,7 @@ enum brw_state_id {
#define BRW_NEW_PROGRAM_CACHE (1 << BRW_STATE_PROGRAM_CACHE)
#define BRW_NEW_STATE_BASE_ADDRESS (1 << BRW_STATE_STATE_BASE_ADDRESS)
#define BRW_NEW_SOL_INDICES (1 << BRW_STATE_SOL_INDICES)
+#define BRW_NEW_VUE_MAP_GEOM_OUT (1 << BRW_STATE_VUE_MAP_GEOM_OUT)
struct brw_state_flags {
/** State update flags signalled by mesa internals */
@@ -918,6 +920,15 @@ struct brw_context
uint32_t offset;
} sampler;
+ /**
+ * Layout of vertex data exiting the geometry portion of the pipleine.
+ * This comes from the geometry shader if one exists, otherwise from the
+ * vertex shader.
+ *
+ * BRW_NEW_VUE_MAP_GEOM_OUT is flagged when the VUE map changes.
+ */
+ struct brw_vue_map vue_map_geom_out;
+
struct {
struct brw_vs_prog_data *prog_data;
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 41dfdc36efd..5c5c05e3efd 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -376,6 +376,7 @@ static struct dirty_bit_map brw_bits[] = {
DEFINE_BIT(BRW_NEW_PROGRAM_CACHE),
DEFINE_BIT(BRW_NEW_STATE_BASE_ADDRESS),
DEFINE_BIT(BRW_NEW_SOL_INDICES),
+ DEFINE_BIT(BRW_NEW_VUE_MAP_GEOM_OUT),
{0, 0, 0}
};
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index fceabba29ce..1a19a794adb 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -488,6 +488,11 @@ static void brw_upload_vs_prog(struct brw_context *brw)
assert(success);
}
+ if (memcmp(&brw->vs.prog_data->vue_map, &brw->vue_map_geom_out,
+ sizeof(brw->vue_map_geom_out)) != 0) {
+ brw->vue_map_geom_out = brw->vs.prog_data->vue_map;
+ brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT;
+ }
}
/* See brw_vs.c: