Mesa (master): glsl_to_tgsi: Set TGSI_PROPERTY_FS_BLEND_EQUATION_ADVANCED

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 17 06:37:07 UTC 2020


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

Author: Elie Tournier <tournier.elie at gmail.com>
Date:   Wed Jun 10 11:29:24 2020 +0100

glsl_to_tgsi: Set TGSI_PROPERTY_FS_BLEND_EQUATION_ADVANCED

In virgl, when fbfetch extention is not available but blend_equation_advanced is,
we didn't call lower_blend_equation_advanced. So we need to pass the blend value
to the host in order to recreate the shader correctly.

Signed-off-by: Elie Tournier <elie.tournier at collabora.com>
Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>

---

 src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index f2f1de316fc..bc032f4c751 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6813,6 +6813,12 @@ st_translate_program(
             goto out;
          }
       }
+
+      if (program->shader->Program->sh.fs.BlendSupport)
+         ureg_property(ureg,
+                       TGSI_PROPERTY_FS_BLEND_EQUATION_ADVANCED,
+                       program->shader->Program->sh.fs.BlendSupport);
+
    }
    else if (procType == PIPE_SHADER_VERTEX) {
       for (i = 0; i < numOutputs; i++) {



More information about the mesa-commit mailing list