diff options
author | Kenneth Graunke <[email protected]> | 2011-12-07 03:13:50 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-12-19 16:33:10 -0800 |
commit | d45814c925dd6c479cfd383b9b59458fc4359cf7 (patch) | |
tree | 4a980bed812e03008b8ac8eda1eb29fe81c1bf83 /src/mesa | |
parent | 387a3d43d11cbd3eb1bd8ce787a2c693d575300c (diff) |
i965/vs: Add texture related data to brw_vs_prog_key.
Now that this is all factored out, it's trivial to do.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index 81d5f884a5a..6eec9730755 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -279,8 +279,10 @@ static void brw_upload_vs_prog(struct brw_context *brw) struct intel_context *intel = &brw->intel; struct gl_context *ctx = &intel->ctx; struct brw_vs_prog_key key; + /* BRW_NEW_VERTEX_PROGRAM */ struct brw_vertex_program *vp = (struct brw_vertex_program *)brw->vertex_program; + struct gl_program *prog = (struct gl_program *) brw->vertex_program; int i; memset(&key, 0, sizeof(key)); @@ -316,6 +318,12 @@ static void brw_upload_vs_prog(struct brw_context *brw) } } + /* _NEW_TEXTURE */ + for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { + if (prog->TexturesUsed[i]) + brw_populate_sampler_prog_key_data(ctx, &key.tex, i); + } + /* BRW_NEW_VERTICES */ for (i = 0; i < VERT_ATTRIB_MAX; i++) { if (vp->program.Base.InputsRead & BITFIELD64_BIT(i) && diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h index 8701116dd84..8814251a84c 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.h +++ b/src/mesa/drivers/dri/i965/brw_vs.h @@ -36,6 +36,7 @@ #include "brw_context.h" #include "brw_eu.h" +#include "brw_program.h" #include "program/program.h" @@ -76,6 +77,8 @@ struct brw_vs_prog_key { GLuint copy_edgeflag:1; GLuint point_coord_replace:8; GLuint clamp_vertex_color:1; + + struct brw_sampler_prog_key_data tex; }; |