mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
mesa/st: split out builtin shader finish
it's useful to be able to run the nir passes separately Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18198>
This commit is contained in:
parent
95cea62a9b
commit
e7f2f050c4
2 changed files with 11 additions and 3 deletions
|
|
@ -59,6 +59,8 @@ void st_nir_lower_samplers(struct pipe_screen *screen, struct nir_shader *nir,
|
|||
struct gl_program *prog);
|
||||
void st_nir_lower_uniforms(struct st_context *st, struct nir_shader *nir);
|
||||
|
||||
void
|
||||
st_nir_finish_builtin_nir(struct st_context *st, struct nir_shader *nir);
|
||||
struct pipe_shader_state *
|
||||
st_nir_finish_builtin_shader(struct st_context *st,
|
||||
struct nir_shader *nir);
|
||||
|
|
|
|||
|
|
@ -29,9 +29,8 @@
|
|||
#include "compiler/glsl/gl_nir_linker.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
|
||||
struct pipe_shader_state *
|
||||
st_nir_finish_builtin_shader(struct st_context *st,
|
||||
nir_shader *nir)
|
||||
void
|
||||
st_nir_finish_builtin_nir(struct st_context *st, nir_shader *nir)
|
||||
{
|
||||
struct pipe_screen *screen = st->screen;
|
||||
gl_shader_stage stage = nir->info.stage;
|
||||
|
|
@ -75,6 +74,13 @@ st_nir_finish_builtin_shader(struct st_context *st,
|
|||
} else {
|
||||
gl_nir_opts(nir);
|
||||
}
|
||||
}
|
||||
|
||||
struct pipe_shader_state *
|
||||
st_nir_finish_builtin_shader(struct st_context *st,
|
||||
nir_shader *nir)
|
||||
{
|
||||
st_nir_finish_builtin_nir(st, nir);
|
||||
|
||||
struct pipe_shader_state state = {
|
||||
.type = PIPE_SHADER_IR_NIR,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue