mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
glsl: tidy up glsl_to_nir() params
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32239>
This commit is contained in:
parent
cbb3bb5c7b
commit
8ac81c5bb4
3 changed files with 9 additions and 9 deletions
|
|
@ -2499,7 +2499,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
|
|||
if (shader->CompileStatus == COMPILE_SUCCESS) {
|
||||
memcpy(shader->compiled_source_blake3, source_blake3, BLAKE3_OUT_LEN);
|
||||
|
||||
shader->nir = glsl_to_nir(&ctx->Const, &shader->ir, NULL, shader->Stage,
|
||||
shader->nir = glsl_to_nir(&ctx->Const, shader, NULL,
|
||||
options->NirOptions, source_blake3);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,22 +177,22 @@ private:
|
|||
|
||||
nir_shader *
|
||||
glsl_to_nir(const struct gl_constants *consts,
|
||||
struct exec_list **ir, shader_info *si, gl_shader_stage stage,
|
||||
struct gl_shader *gl_shader, shader_info *si,
|
||||
const nir_shader_compiler_options *options,
|
||||
const uint8_t *src_blake3)
|
||||
{
|
||||
MESA_TRACE_FUNC();
|
||||
|
||||
nir_shader *shader = nir_shader_create(NULL, stage, options, si);
|
||||
nir_shader *shader = nir_shader_create(NULL, gl_shader->Stage, options, si);
|
||||
|
||||
nir_visitor v1(consts, shader, src_blake3);
|
||||
nir_function_visitor v2(&v1);
|
||||
v2.run(*ir);
|
||||
visit_exec_list(*ir, &v1);
|
||||
v2.run(gl_shader->ir);
|
||||
visit_exec_list(gl_shader->ir, &v1);
|
||||
|
||||
/* The GLSL IR won't be needed anymore. */
|
||||
ralloc_free(*ir);
|
||||
*ir = NULL;
|
||||
ralloc_free(gl_shader->ir);
|
||||
gl_shader->ir = NULL;
|
||||
|
||||
nir_validate_shader(shader, "after glsl to nir, before function inline");
|
||||
if (should_print_nir(shader)) {
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ extern "C" {
|
|||
|
||||
struct gl_context;
|
||||
struct gl_constants;
|
||||
struct gl_shader;
|
||||
struct gl_shader_program;
|
||||
|
||||
nir_shader *glsl_to_nir(const struct gl_constants *consts,
|
||||
struct exec_list **ir, shader_info *si,
|
||||
gl_shader_stage stage,
|
||||
struct gl_shader *shader, shader_info *si,
|
||||
const nir_shader_compiler_options *options,
|
||||
const uint8_t *src_blake3);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue