mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 09:20:13 +01:00
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.
This commit is contained in:
parent
897f6d3c7d
commit
a81d423d93
1 changed files with 1 additions and 12 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue