diff options
author | Timothy Arceri <[email protected]> | 2017-03-03 10:06:24 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-03-05 08:15:51 +1100 |
commit | 28fd6556c30096c415ebeb061d7e90b76d6b547d (patch) | |
tree | 417cbd22eb9027c27171b884f7ac8561f0a5102b | |
parent | 8e6d67685e10b001e07f92a7a6aaff4fe987b6f2 (diff) |
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 <[email protected]>
-rw-r--r-- | src/gallium/drivers/svga/svga_state_fs.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_state_vs.c | 6 |
2 files changed, 3 insertions, 6 deletions
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)); |