[Mesa-dev] [PATCH 10/21] i965/eu: Use current exec size instead of p->compressed in surface message generation.

Alejandro PiƱeiro apinheiro at igalia.com
Wed Jun 1 10:35:47 UTC 2016


Right now using INTEL_DEBUG=shader_time causes a gpu hang (at least on
haswell), and after a git bisect, it started to fail after this patch.

I didn't checked why it happens, just wanted to point it out so you are
aware, in case it could affect other places.

Note that the right now the plan is reimplement this feature, using and
UNTYPED_ATOMIC with exec_size=1, instead of the custom emission of an
untyped atomic (in fact I detected it when resuming that task), so
perhaps the problem will get solved that way.

PS: should this issue being tracked by a bug on freedesktop bugzilla?

[1] https://lists.freedesktop.org/archives/mesa-dev/2015-October/098787.html

On 24/05/16 09:18, Francisco Jerez wrote:
> This was kind of an abuse of p->compressed, dataport send message
> instructions are always uncompressed.  Use the current execution size
> instead since p->compressed is on its way out.
> ---
>  src/mesa/drivers/dri/i965/brw_eu_emit.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> index a649206..10cbbe8 100644
> --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
> +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
> @@ -2886,9 +2886,11 @@ brw_surface_payload_size(struct brw_codegen *p,
>                           bool has_simd4x2,
>                           bool has_simd16)
>  {
> -   if (has_simd4x2 && brw_inst_access_mode(p->devinfo, p->current) == BRW_ALIGN_16)
> +   if (has_simd4x2 &&
> +       brw_inst_access_mode(p->devinfo, p->current) == BRW_ALIGN_16)
>        return 1;
> -   else if (has_simd16 && p->compressed)
> +   else if (has_simd16 &&
> +            brw_inst_exec_size(p->devinfo, p->current) == BRW_EXECUTE_16)
>        return 2 * num_channels;
>     else
>        return num_channels;
> @@ -2907,7 +2909,7 @@ brw_set_dp_untyped_atomic_message(struct brw_codegen *p,
>  
>     if (devinfo->gen >= 8 || devinfo->is_haswell) {
>        if (brw_inst_access_mode(devinfo, p->current) == BRW_ALIGN_1) {
> -         if (!p->compressed)
> +         if (brw_inst_exec_size(devinfo, p->current) == BRW_EXECUTE_8)
>              msg_control |= 1 << 4; /* SIMD8 mode */
>  
>           brw_inst_set_dp_msg_type(devinfo, insn,
> @@ -2920,7 +2922,7 @@ brw_set_dp_untyped_atomic_message(struct brw_codegen *p,
>        brw_inst_set_dp_msg_type(devinfo, insn,
>                                 GEN7_DATAPORT_DC_UNTYPED_ATOMIC_OP);
>  
> -      if (!p->compressed)
> +      if (brw_inst_exec_size(devinfo, p->current) == BRW_EXECUTE_8)
>           msg_control |= 1 << 4; /* SIMD8 mode */
>     }
>  
> @@ -2968,7 +2970,7 @@ brw_set_dp_untyped_surface_read_message(struct brw_codegen *p,
>     unsigned msg_control = 0xf & (0xf << num_channels);
>  
>     if (brw_inst_access_mode(devinfo, p->current) == BRW_ALIGN_1) {
> -      if (p->compressed)
> +      if (brw_inst_exec_size(devinfo, p->current) == BRW_EXECUTE_16)
>           msg_control |= 1 << 4; /* SIMD16 mode */
>        else
>           msg_control |= 2 << 4; /* SIMD8 mode */
> @@ -3012,7 +3014,7 @@ brw_set_dp_untyped_surface_write_message(struct brw_codegen *p,
>     unsigned msg_control = 0xf & (0xf << num_channels);
>  
>     if (brw_inst_access_mode(devinfo, p->current) == BRW_ALIGN_1) {
> -      if (p->compressed)
> +      if (brw_inst_exec_size(devinfo, p->current) == BRW_EXECUTE_16)
>           msg_control |= 1 << 4; /* SIMD16 mode */
>        else
>           msg_control |= 2 << 4; /* SIMD8 mode */




More information about the mesa-dev mailing list