summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-01-26 11:03:33 +1300
committerChris Forbes <[email protected]>2014-02-06 10:58:37 +1300
commit046f8d8a6fcae641ed0e7e06e24ab5da39a57c86 (patch)
tree2d5eb414cd86199fd631efc34059f860deec557d /src
parent6c9de691c71c07adebb11c24864d9e6d2a6207e3 (diff)
i965/fs: Guess nr_color_regions better in precompile
Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index d7301dd0a12..c2fa06b38ab 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3590,7 +3590,9 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
key.render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
}
- key.nr_color_regions = 1;
+ key.nr_color_regions = _mesa_bitcount_64(fp->Base.OutputsWritten &
+ ~(BITFIELD64_BIT(FRAG_RESULT_DEPTH) |
+ BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK)));
/* GL_FRAGMENT_SHADER_DERIVATIVE_HINT is almost always GL_DONT_CARE. The
* quality of the derivatives is likely to be determined by the driconf