st/nir: fix arb fragment stage conversion
authorDave Airlie <airlied@redhat.com>
Tue, 23 Jul 2019 00:40:05 +0000 (10:40 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 23 Jul 2019 01:00:53 +0000 (11:00 +1000)
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@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_program.c

index faada1621ca91dd9a91ce1ceda622f001c75f9c4..7d1ed5634ebbfb93c2ebc516e07b16a4b5abcb16 100644 (file)
@@ -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);