diff options
author | Eric Anholt <[email protected]> | 2010-10-14 12:23:29 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-14 12:40:50 -0700 |
commit | a81d423d93f22a948f3aa4bf73dc6b1a3b70192f (patch) | |
tree | b9e27bda6cc98716a1a727af00b3f3dd1adac9ec /src/mesa/drivers | |
parent | 897f6d3c7d06316b0535971cc2de318157c23692 (diff) |
i965: Enable the new FS backend on pre-gen6 as well.
It is now to the point where we have no regressing piglit tests. It
also fixes Yo Frankie! and Humus DynamicBranching, probably due to the
piglit bias tests that work that didn't on the Mesa IR backend.
As a downside, performance takes about a 5-10% performance hit at the
moment (e.g. nexuiz 19.8fps -> 18.8fps), which I plan to resolve by
reintroducing 16-wide fragment shaders where possible. It is a win,
though, for fragment shaders using flow control.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index d46091c9e6e..d220c79a8e4 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -48,7 +48,6 @@ extern "C" { #include "../glsl/ir_optimization.h" #include "../glsl/ir_print_visitor.h" -static int using_new_fs = -1; static struct brw_reg brw_reg_from_fs_reg(class fs_reg *reg); struct gl_shader * @@ -92,17 +91,10 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) { struct intel_context *intel = intel_context(ctx); - if (using_new_fs == -1) { - if (intel->gen >= 6) - using_new_fs = 1; - else - using_new_fs = getenv("INTEL_NEW_FS") != NULL; - } - for (unsigned i = 0; i < prog->_NumLinkedShaders; i++) { struct brw_shader *shader = (struct brw_shader *)prog->_LinkedShaders[i]; - if (using_new_fs && shader->base.Type == GL_FRAGMENT_SHADER) { + if (shader->base.Type == GL_FRAGMENT_SHADER) { void *mem_ctx = talloc_new(NULL); bool progress; @@ -3190,9 +3182,6 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c) if (!prog) return GL_FALSE; - if (!using_new_fs) - return GL_FALSE; - for (unsigned int i = 0; i < prog->_NumLinkedShaders; i++) { if (prog->_LinkedShaders[i]->Type == GL_FRAGMENT_SHADER) { shader = (struct brw_shader *)prog->_LinkedShaders[i]; |