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 <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Kenneth Graunke 2011-12-07 03:13:50 -08:00
parent 387a3d43d1
commit d45814c925
2 changed files with 11 additions and 0 deletions

View file

@ -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) &&

View file

@ -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;
};