diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2021-04-07 10:34:57 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-04-08 09:33:59 +0000 |
commit | 49cb1fac138c6c79079195ceba1d247afe2261bb (patch) | |
tree | 9bcc513965547e78d25bde8067a3c1d2a9ed0745 | |
parent | 49be175a4bc0b34fdae0ef88f7fc4f73efafa4da (diff) |
draw: fix pstipple, aaline and aapoint without LLVM
Because of nir_to_tgsi, LLVM is not required here.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: d0f8fe59091 ("softpipe: Switch to using NIR as the shader format from mesa/st.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10072>
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_aaline.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_aapoint.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 2 |
3 files changed, 0 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index 8ba95a033bf..49d5c65b60d 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -318,7 +318,6 @@ generate_aaline_fs(struct aaline_stage *aaline) static boolean generate_aaline_fs_nir(struct aaline_stage *aaline) { -#ifdef DRAW_LLVM_AVAILABLE struct pipe_context *pipe = aaline->stage.draw->pipe; const struct pipe_shader_state *orig_fs = &aaline->fs->state; struct pipe_shader_state aaline_fs; @@ -334,9 +333,6 @@ generate_aaline_fs_nir(struct aaline_stage *aaline) return FALSE; return TRUE; -#else - return FALSE; -#endif } /** @@ -644,10 +640,8 @@ aaline_create_fs_state(struct pipe_context *pipe, aafs->state.type = fs->type; if (fs->type == PIPE_SHADER_IR_TGSI) aafs->state.tokens = tgsi_dup_tokens(fs->tokens); -#ifdef DRAW_LLVM_AVAILABLE else aafs->state.ir.nir = nir_shader_clone(NULL, fs->ir.nir); -#endif /* pass-through */ aafs->driver_fs = aaline->driver_create_fs_state(pipe, fs); diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c index 8b1f7281fa5..08adcddf617 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c @@ -411,7 +411,6 @@ fail: static boolean generate_aapoint_fs_nir(struct aapoint_stage *aapoint) { -#ifdef DRAW_LLVM_AVAILABLE struct pipe_context *pipe = aapoint->stage.draw->pipe; const struct pipe_shader_state *orig_fs = &aapoint->fs->state; struct pipe_shader_state aapoint_fs; @@ -429,7 +428,6 @@ generate_aapoint_fs_nir(struct aapoint_stage *aapoint) return TRUE; fail: -#endif return FALSE; } @@ -748,10 +746,8 @@ aapoint_create_fs_state(struct pipe_context *pipe, aafs->state.type = fs->type; if (fs->type == PIPE_SHADER_IR_TGSI) aafs->state.tokens = tgsi_dup_tokens(fs->tokens); -#ifdef DRAW_LLVM_AVAILABLE else aafs->state.ir.nir = nir_shader_clone(NULL, fs->ir.nir); -#endif /* pass-through */ aafs->driver_fs = aapoint->driver_create_fs_state(pipe, fs); diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index 65e8bc573d6..eb7ad8bf24f 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -144,11 +144,9 @@ generate_pstip_fs(struct pstip_stage *pstip) if (pstip_fs.tokens == NULL) return FALSE; } else { -#ifdef DRAW_LLVM_AVAILABLE pstip_fs.ir.nir = nir_shader_clone(NULL, orig_fs->ir.nir); nir_lower_pstipple_fs(pstip_fs.ir.nir, &pstip->fs->sampler_unit, 0, wincoord_file == TGSI_FILE_SYSTEM_VALUE); -#endif } assert(pstip->fs->sampler_unit < PIPE_MAX_SAMPLERS); |