Mesa (master): glsl: Put `sample`-qualified varyings in their own packing classes

Chris Forbes chrisf at kemper.freedesktop.org
Sat Dec 7 04:21:28 UTC 2013


Module: Mesa
Branch: master
Commit: 5d326fa963d4af85af50687ecc7d0eb0a8989fda
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d326fa963d4af85af50687ecc7d0eb0a8989fda

Author: Chris Forbes <chrisf at ijw.co.nz>
Date:   Fri Nov 29 21:28:32 2013 +1300

glsl: Put `sample`-qualified varyings in their own packing classes

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>

---

 src/glsl/link_varyings.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index d2a4fc8..097cee5 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -887,7 +887,7 @@ varying_matches::compute_packing_class(ir_variable *var)
     *
     * Therefore, the packing class depends only on the interpolation type.
     */
-   unsigned packing_class = var->centroid ? 1 : 0;
+   unsigned packing_class = var->centroid | (var->sample << 1);
    packing_class *= 4;
    packing_class += var->interpolation;
    return packing_class;




More information about the mesa-commit mailing list