[Mesa-dev] [Mesa-stable] [PATCH 1/3] i965: Set fs_inst::base_mrf = -1 by default.

Francisco Jerez currojerez at riseup.net
Thu Jun 23 21:11:53 UTC 2016


Kenneth Graunke <kenneth at whitecape.org> writes:

> On MRF platforms, we need to set base_mrf to the first MRF value we'd
> like to use for the message.  On send-from-GRF platforms, we set it to
> -1 to indicate that the operation doesn't use MRFs.
>
> As MRF platforms are becoming increasingly a thing of the past, we've
> forgotten to bother with this.  It makes more sense to set it to -1 by
> default, so we don't have to think about it for new code.
>
> I searched the code for every instance of 'mlen =' in brw_fs*cpp, and
> it appears that all MRF-based messages correctly program a base_mrf.
>
> Forgetting to set base_mrf = -1 can confuse the register allocator,
> causing it to think we have a large fake-MRF region.  This ends up
> moving the send-with-EOT registers earlier, sometimes even out of
> the g112-g127 range, which is illegal.  For example, this fixes
> illegal sends in Piglit's arb_gpu_shader_fp64-layout-std430-fp64-shader,
> which had SSBO messages with mlen > 0 but base_mrf == 0.
>
> Cc: mesa-stable at lists.freedesktop.org
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

Series is:

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> ---
>  src/mesa/drivers/dri/i965/brw_fs.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index 17673f8..a738e8d 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -57,6 +57,7 @@ fs_inst::init(enum opcode opcode, uint8_t exec_size, const fs_reg &dst,
>     this->dst = dst;
>     this->sources = sources;
>     this->exec_size = exec_size;
> +   this->base_mrf = -1;
>  
>     assert(dst.file != IMM && dst.file != UNIFORM);
>  
> -- 
> 2.9.0
>
> _______________________________________________
> mesa-stable mailing list
> mesa-stable at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160623/75e0b890/attachment.sig>


More information about the mesa-dev mailing list