diff options
author | Keith Whitwell <[email protected]> | 2009-11-23 03:06:58 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-11-23 03:06:58 +0000 |
commit | 0a89ad80d957869cf8760326787c6189ab50a1e0 (patch) | |
tree | 963eee9ce31c4b0bc787dbe018d2b836f69ce6f6 /src/gallium | |
parent | cd0e6619e6d9f0f60606d1e079b1a04af1717309 (diff) |
i965g: gs nr_attrs also tracks nr fragment shader inputs
Or, equivalently, nr of outputs of active vertex shader varient.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/i965/brw_gs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/i965/brw_gs.c b/src/gallium/drivers/i965/brw_gs.c index ce77be24f60..921b201bae2 100644 --- a/src/gallium/drivers/i965/brw_gs.c +++ b/src/gallium/drivers/i965/brw_gs.c @@ -154,10 +154,12 @@ static const unsigned gs_prim[PIPE_PRIM_MAX] = { static void populate_key( struct brw_context *brw, struct brw_gs_prog_key *key ) { + const struct brw_fs_signature *sig = &brw->curr.fragment_shader->signature; + memset(key, 0, sizeof(*key)); - /* CACHE_NEW_VS_PROG */ - key->nr_attrs = brw->vs.prog_data->nr_outputs; + /* PIPE_NEW_FRAGMENT_SIGNATURE */ + key->nr_attrs = sig->nr_inputs + 1; /* BRW_NEW_PRIMITIVE */ key->primitive = gs_prim[brw->primitive]; @@ -206,9 +208,9 @@ static int prepare_gs_prog(struct brw_context *brw) const struct brw_tracked_state brw_gs_prog = { .dirty = { - .mesa = 0, + .mesa = PIPE_NEW_FRAGMENT_SIGNATURE, .brw = BRW_NEW_PRIMITIVE, - .cache = CACHE_NEW_VS_PROG + .cache = 0, }, .prepare = prepare_gs_prog }; |