glsl: use util_snprintf()
Instead of plain snprintf(). To fix the MSVC 2013 build.
Fixes: 6ff0c6f4eb
("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times")
Cc: Marek Olšák <marek.olsak@amd.com>
Cc: Brian Paul <brianp@vmware.com>
Cc: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user