i965/vs: Move the flag for whether to use the new backend to the context.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2011-08-19 11:42:50 -07:00
parent 1995d1e207
commit 2f82c33dee
3 changed files with 4 additions and 5 deletions

View file

@ -248,6 +248,8 @@ GLboolean brwCreateContext( int api,
brw_draw_init( brw );
brw->new_vs_backend = (getenv("INTEL_NEW_VS") != NULL);
return GL_TRUE;
}

View file

@ -523,6 +523,7 @@ struct brw_context
GLboolean has_negative_rhw_bug;
GLboolean has_aa_line_parameters;
GLboolean has_pln;
GLboolean new_vs_backend;
struct {
struct brw_state_flags dirty;

View file

@ -54,7 +54,6 @@ do_vs_prog(struct brw_context *brw,
void *mem_ctx;
int aux_size;
int i;
static int new_vs = -1;
memset(&c, 0, sizeof(c));
memcpy(&c.key, key, sizeof(*key));
@ -90,10 +89,7 @@ do_vs_prog(struct brw_context *brw,
/* Emit GEN4 code.
*/
if (new_vs == -1)
new_vs = getenv("INTEL_NEW_VS") != NULL;
if (new_vs && prog) {
if (brw->new_vs_backend && prog) {
if (!brw_vs_emit(prog, &c)) {
ralloc_free(mem_ctx);
return false;