diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_simple_shaders.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_simple_shaders.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index 3cd2d52c64c..2fcad6fe3d5 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -359,3 +359,10 @@ util_make_fragment_passthrough_shader(struct pipe_context *pipe, return pipe->create_fs_state(pipe, shader); } + +void +util_free_shader(struct pipe_shader_state *shader) +{ + FREE((struct tgsi_token *)shader->tokens); + shader->tokens = NULL; +} diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h b/src/gallium/auxiliary/util/u_simple_shaders.h index 8ca4977d715..99b8d9067d6 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.h +++ b/src/gallium/auxiliary/util/u_simple_shaders.h @@ -60,6 +60,10 @@ util_make_fragment_passthrough_shader(struct pipe_context *pipe, struct pipe_shader_state *shader); +extern void +util_free_shader(struct pipe_shader_state *shader); + + #ifdef __cplusplus } #endif |