[Mesa-dev] [PATCH mesa] i965/blorp: add missing braces

Pohjolainen, Topi topi.pohjolainen at intel.com
Wed Jul 6 17:40:06 UTC 2016


On Wed, Jul 06, 2016 at 05:36:54PM +0100, Eric Engestrom wrote:
> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> 
> I know nothing about blorp, but GCC6 noticed the weird indentation, and my best
> guess looking at the code is that there are missing braces.
> 
>   CC       gen7_blorp.lo
> gen7_blorp.c: In function ???gen7_blorp_exec???:
> gen7_blorp.c:797:4: warning: this ???if??? clause does not guard... [-Wmisleading-indentation]
>     if (params->wm_prog_data)
>     ^~
> gen7_blorp.c:800:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ???if???
>        gen7_blorp_emit_constant_ps_disable(brw);
>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> If this is wrong, then the second line should be de-indented.

It should be indented. I have just pushed patches removing push constant
support in blorp. It seems I missed that when I made the push constant
disabling unconditional.

> 
> ---
>  src/mesa/drivers/dri/i965/gen7_blorp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
> index 7201549..f40e445 100644
> --- a/src/mesa/drivers/dri/i965/gen7_blorp.c
> +++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
> @@ -794,10 +794,11 @@ gen7_blorp_exec(struct brw_context *brw,
>     gen6_blorp_emit_clip_disable(brw);
>     gen7_blorp_emit_sf_config(brw, params);
>     gen7_blorp_emit_wm_config(brw, params);
> -   if (params->wm_prog_data)
> +   if (params->wm_prog_data) {
>        gen7_blorp_emit_binding_table_pointers_ps(brw, wm_bind_bo_offset);
>  
>        gen7_blorp_emit_constant_ps_disable(brw);
> +   }
>  
>     if (params->src.mt) {
>        const uint32_t sampler_offset =
> -- 
> 2.9.0
> 


More information about the mesa-dev mailing list