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:
committed by
Marge Bot
parent
95cea62a9b
commit
e7f2f050c4
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user