From 28fd6556c30096c415ebeb061d7e90b76d6b547d Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 3 Mar 2017 10:06:24 +1100 Subject: svga: pass NULL to ureg_get_tokens() The number of tokens in never used and the pointer is NULL checked so just pass NULL. Reviewed-by: Brian Paul --- src/gallium/drivers/svga/svga_state_fs.c | 3 +-- src/gallium/drivers/svga/svga_state_vs.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers/svga') diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index 327d17af921..48987445025 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -61,7 +61,6 @@ get_dummy_fragment_shader(void) const struct tgsi_token *tokens; struct ureg_src src; struct ureg_dst dst; - unsigned num_tokens; ureg = ureg_create(PIPE_SHADER_FRAGMENT); if (!ureg) @@ -72,7 +71,7 @@ get_dummy_fragment_shader(void) ureg_MOV(ureg, dst, src); ureg_END(ureg); - tokens = ureg_get_tokens(ureg, &num_tokens); + tokens = ureg_get_tokens(ureg, NULL); ureg_destroy(ureg); diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c index aa351bd1aa5..325ef3ebad4 100644 --- a/src/gallium/drivers/svga/svga_state_vs.c +++ b/src/gallium/drivers/svga/svga_state_vs.c @@ -52,7 +52,6 @@ get_dummy_vertex_shader(void) const struct tgsi_token *tokens; struct ureg_src src; struct ureg_dst dst; - unsigned num_tokens; ureg = ureg_create(PIPE_SHADER_VERTEX); if (!ureg) @@ -63,7 +62,7 @@ get_dummy_vertex_shader(void) ureg_MOV(ureg, dst, src); ureg_END(ureg); - tokens = ureg_get_tokens(ureg, &num_tokens); + tokens = ureg_get_tokens(ureg, NULL); ureg_destroy(ureg); @@ -264,7 +263,6 @@ compile_passthrough_vs(struct svga_context *svga, struct ureg_src src[PIPE_MAX_SHADER_INPUTS]; struct ureg_dst dst[PIPE_MAX_SHADER_OUTPUTS]; struct ureg_program *ureg; - unsigned num_tokens; struct svga_compile_key key; enum pipe_error ret; @@ -313,7 +311,7 @@ compile_passthrough_vs(struct svga_context *svga, ureg_END(ureg); memset(&new_vs, 0, sizeof(new_vs)); - new_vs.base.tokens = ureg_get_tokens(ureg, &num_tokens); + new_vs.base.tokens = ureg_get_tokens(ureg, NULL); tgsi_scan_shader(new_vs.base.tokens, &new_vs.base.info); memset(&key, 0, sizeof(key)); -- cgit v1.2.3