[Mesa-dev] [PATCH 1/2] i965/fs: Guess nr_color_regions better in precompile
Kenneth Graunke
kenneth at whitecape.org
Tue Jan 28 14:29:57 PST 2014
On 01/25/2014 04:07 PM, Chris Forbes wrote:
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index 1e6c3e0..d6ebe50 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -3589,7 +3589,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
>
Both are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140128/85352436/attachment.pgp>
More information about the mesa-dev
mailing list