Module: Mesa
Branch: 11.0
Commit: d126fffe9d22223cb2c4e0eef329b028870d48af
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d126fffe9d22223cb2c4e0eef329b028870d48af

Author: Marek Olšák <[email protected]>
Date:   Thu Dec 10 13:15:50 2015 +0100

tgsi/scan: add flag colors_written

This is a prerequisite for the following r600g fix.

Cc: 11.0 11.1 <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
(cherry picked from commit eb4813a9524e1a61f46bf45150adb1bd78564863)

---

 src/gallium/auxiliary/tgsi/tgsi_scan.c |    3 +++
 src/gallium/auxiliary/tgsi/tgsi_scan.h |    1 +
 2 files changed, 4 insertions(+)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c 
b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 7523baf..98a5fec 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -258,6 +258,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
                   info->output_semantic_index[reg] = (ubyte) semIndex;
                   info->num_outputs++;
 
+                  if (semName == TGSI_SEMANTIC_COLOR)
+                     info->colors_written |= 1 << semIndex;
+
                   if (procType == TGSI_PROCESSOR_VERTEX ||
                       procType == TGSI_PROCESSOR_GEOMETRY ||
                       procType == TGSI_PROCESSOR_TESS_CTRL ||
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h 
b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index b81bdd7..6301f91 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -76,6 +76,7 @@ struct tgsi_shader_info
 
    uint opcode_count[TGSI_OPCODE_LAST];  /**< opcode histogram */
 
+   ubyte colors_written;
    boolean reads_position; /**< does fragment shader read position? */
    boolean reads_z; /**< does fragment shader read depth? */
    boolean writes_z;  /**< does fragment shader write Z value? */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to