r600g: Simplify out a couple of unnecessary branches
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>
Tue, 1 Sep 2015 08:38:34 +0000 (18:38 +1000)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 1 Sep 2015 19:55:23 +0000 (21:55 +0200)
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/gallium/drivers/r600/r600_shader.c

index b7d7828..1ab389c 100644 (file)
@@ -1966,13 +1966,9 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
 
        ctx.nliterals = 0;
        ctx.literals = NULL;
-       shader->fs_write_all = FALSE;
-       if (ctx.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS])
-               shader->fs_write_all = TRUE;
 
-       shader->vs_position_window_space = FALSE;
-       if (ctx.info.properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION])
-               shader->vs_position_window_space = TRUE;
+       shader->fs_write_all = ctx.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS];
+       shader->vs_position_window_space = ctx.info.properties[TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION];
 
        if (shader->vs_as_gs_a)
                vs_add_primid_output(&ctx, key.vs.prim_id_out);