diff options
author | Andres Gomez <[email protected]> | 2018-08-01 13:22:00 +0300 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2018-08-02 10:06:44 +0300 |
commit | 9d220fa950850d751fbbbc2cd4ec24d024fcad70 (patch) | |
tree | 267eb39384acf8649af9f5d3a7bb296248be8ab5 /src/compiler/glsl/opt_dead_builtin_varyings.cpp | |
parent | 8fcdb71d8c9e6a0d9d9b70550bb764b654377714 (diff) |
glsl: use util_snprintf()
Instead of plain snprintf(). To fix the MSVC 2013 build.
Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times")
Cc: Marek Olšák <[email protected]>
Cc: Brian Paul <[email protected]>
Cc: Roland Scheidegger <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/compiler/glsl/opt_dead_builtin_varyings.cpp')
-rw-r--r-- | src/compiler/glsl/opt_dead_builtin_varyings.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/glsl/opt_dead_builtin_varyings.cpp b/src/compiler/glsl/opt_dead_builtin_varyings.cpp index 0ce19218606..0cb04b34589 100644 --- a/src/compiler/glsl/opt_dead_builtin_varyings.cpp +++ b/src/compiler/glsl/opt_dead_builtin_varyings.cpp @@ -53,6 +53,7 @@ #include "compiler/glsl_types.h" #include "link_varyings.h" #include "main/mtypes.h" +#include "util/u_string.h" namespace { @@ -322,14 +323,14 @@ public: if (!(external_color_usage & (1 << i))) { if (info->color[i]) { - snprintf(name, 32, "gl_%s_FrontColor%i_dummy", mode_str, i); + util_snprintf(name, 32, "gl_%s_FrontColor%i_dummy", mode_str, i); this->new_color[i] = new (ctx) ir_variable(glsl_type::vec4_type, name, ir_var_temporary); } if (info->backcolor[i]) { - snprintf(name, 32, "gl_%s_BackColor%i_dummy", mode_str, i); + util_snprintf(name, 32, "gl_%s_BackColor%i_dummy", mode_str, i); this->new_backcolor[i] = new (ctx) ir_variable(glsl_type::vec4_type, name, ir_var_temporary); @@ -341,7 +342,7 @@ public: info->fog) { char name[32]; - snprintf(name, 32, "gl_%s_FogFragCoord_dummy", mode_str); + util_snprintf(name, 32, "gl_%s_FogFragCoord_dummy", mode_str); this->new_fog = new (ctx) ir_variable(glsl_type::float_type, name, ir_var_temporary); } @@ -365,13 +366,13 @@ public: if (!(external_usage & (1 << i))) { /* This varying is unused in the next stage. Declare * a temporary instead of an output. */ - snprintf(name, 32, "gl_%s_%s%i_dummy", mode_str, var_name, i); + util_snprintf(name, 32, "gl_%s_%s%i_dummy", mode_str, var_name, i); new_var[i] = new (ctx) ir_variable(glsl_type::vec4_type, name, ir_var_temporary); } else { - snprintf(name, 32, "gl_%s_%s%i", mode_str, var_name, i); + util_snprintf(name, 32, "gl_%s_%s%i", mode_str, var_name, i); new_var[i] = new(ctx) ir_variable(glsl_type::vec4_type, name, this->info->mode); |