[Mesa-dev] [PATCH] i965/blorp: retype destination register for texture SEND instruction to UW.

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Mon Sep 30 06:49:31 PDT 2013


I re-ran piglit with my resource streamer v2 implementation + this patch and 
actually this fixed sporadic lockups that I've been struggling with. As 
discussed at F2F with Chad and Paul, we need this for RS. I'll be posting the 
RS v2 soon quite soon.

-abdiel

On Friday, September 27, 2013 01:08:45 PM Paul Berry wrote:
> From the bspec documentation of the SEND instruction:
> 
>     "destination region cannot cross the 256-bit register boundary."
> 
> To avoid violating this restriction when executing SIMD16 texturing
> operations (such as those used by blorp), we need to ensure that the
> destination of the SEND instruction doesn't exceed 256 bits in size.
> An easy way to do this is to set the type of the destination register
> to UW (unsigned word), since 16 unsigned words can fit inside a
> 256-bit register.  Fortunately, this has no effect on the sampling
> operation, since the sampler always infers the destination data type
> from the sampler message rather than from the type of the instruction
> operand.
> 
> Previously, we did this for texturing operations issued by the vec4
> and fs back-ends, but not for blorp.  This patch makes blorp use the
> same trick.
> 
> I haven't observed any behavioural difference on actual hardware due
> to this patch, but it avoids a warning from the simulator so it seems
> like the right thing to do.
> ---
>  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index f07d39f..027c72e
> 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> @@ -1928,7 +1928,7 @@ brw_blorp_blit_program::texture_lookup(struct brw_reg
> dst, }
> 
>     brw_SAMPLE(&func,
> -              retype(dst, BRW_REGISTER_TYPE_F) /* dest */,
> +              retype(dst, BRW_REGISTER_TYPE_UW) /* dest */,
>                base_mrf /* msg_reg_nr */,
>                brw_message_reg(base_mrf) /* src0 */,
>                BRW_BLORP_TEXTURE_BINDING_TABLE_INDEX,


More information about the mesa-dev mailing list