From: Timothy Arceri Date: Thu, 2 Mar 2017 23:06:24 +0000 (+1100) Subject: svga: pass NULL to ureg_get_tokens() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28fd6556c30096c415ebeb061d7e90b76d6b547d;p=mesa.git 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 --- 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));