st/mesa: skip lower_output_reads when possible
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 18 Nov 2016 19:51:56 +0000 (20:51 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 30 Nov 2016 08:10:02 +0000 (09:10 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 8a247ea68d7a30a14740c8035f330369ffee1498..7720edfb528c464ec9f59515d2f66c62c4703c1b 100644 (file)
@@ -6445,7 +6445,8 @@ get_mesa_program_tgsi(struct gl_context *ctx,
                                                prog->Parameters);
 
    /* Remove reads from output registers. */
-   lower_output_reads(shader->Stage, shader->ir);
+   if (!pscreen->get_param(pscreen, PIPE_CAP_TGSI_CAN_READ_OUTPUTS))
+      lower_output_reads(shader->Stage, shader->ir);
 
    /* Emit intermediate IR for main(). */
    visit_exec_list(shader->ir, v);