mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
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: d0f8fe5909 ("softpipe: Switch to using NIR as the shader format from mesa/st.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10072>
This commit is contained in:
parent
49be175a4b
commit
49cb1fac13
3 changed files with 0 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue