mesa/glsl: add nir fields to the gl shader structs
Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31137>
This commit is contained in:
committed by
Marge Bot
parent
a9095f0dbf
commit
90e76d34ff
@@ -2447,6 +2447,8 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
|
||||
}
|
||||
|
||||
ralloc_free(shader->ir);
|
||||
ralloc_free(shader->nir);
|
||||
shader->nir = NULL;
|
||||
shader->ir = new(shader) exec_list;
|
||||
if (!state->error && !state->translation_unit.is_empty())
|
||||
_mesa_ast_to_hir(shader->ir, state);
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
|
||||
#include "pipe/p_state.h"
|
||||
|
||||
struct nir_shader;
|
||||
|
||||
/**
|
||||
* Shader information needed by both gl_shader and gl_linked shader.
|
||||
*/
|
||||
@@ -178,6 +180,7 @@ struct gl_shader
|
||||
*/
|
||||
GLbitfield BlendSupport;
|
||||
|
||||
struct nir_shader *nir;
|
||||
struct exec_list *ir;
|
||||
struct glsl_symbol_table *symbols;
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ _mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
|
||||
free((void *)sh->Source);
|
||||
free((void *)sh->FallbackSource);
|
||||
free(sh->Label);
|
||||
ralloc_free(sh->nir);
|
||||
ralloc_free(sh);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user