Mesa (staging/19.1): st/nir: fix arb fragment stage conversion

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 23 11:52:26 UTC 2019


Module: Mesa
Branch: staging/19.1
Commit: 9305d9b1423f999a749aa2ac340558c0f4d4fdc2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9305d9b1423f999a749aa2ac340558c0f4d4fdc2

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Jul 23 10:40:05 2019 +1000

st/nir: fix arb fragment stage conversion

The comment even justifies the wrongness wrongly.

We should be translating to pipe values properly here or else
fragment maps to tess ctrl.

Fixes: 3d7611e9a6c ("st/nir: use NIR for asm programs")
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
(cherry picked from commit 365f24705f9703962b6749f4fafe7cd92d9c60b1)

---

 src/mesa/state_tracker/st_program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 9f6e492d6fb..769b02b24fc 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -428,7 +428,7 @@ static nir_shader *
 st_translate_prog_to_nir(struct st_context *st, struct gl_program *prog,
                          gl_shader_stage stage)
 {
-   enum pipe_shader_type p_stage = stage; /* valid for VS/FS */
+   enum pipe_shader_type p_stage = pipe_shader_type_from_mesa(stage);
    const bool is_scalar =
       st->pipe->screen->get_shader_param(st->pipe->screen, p_stage,
                                          PIPE_SHADER_CAP_SCALAR_ISA);




More information about the mesa-commit mailing list