summaryrefslogtreecommitdiff
path: root/tests/shaders/fp-long-alu.c
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-10-02 23:32:53 -0700
committerVinson Lee <vlee@vmware.com>2009-10-02 23:32:53 -0700
commit69847cb39bc1119e486f09c6f95a7dc157d233f1 (patch)
tree71f881d1b89241eeec9357fb8a66a20dbb0516bd /tests/shaders/fp-long-alu.c
parent5539eff54bd8da4bb40213912de2c46e2dcfc8df (diff)
fp-long-alu: Fix MSVC build.
Diffstat (limited to 'tests/shaders/fp-long-alu.c')
-rw-r--r--tests/shaders/fp-long-alu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/shaders/fp-long-alu.c b/tests/shaders/fp-long-alu.c
index 1232ba07a..32295b281 100644
--- a/tests/shaders/fp-long-alu.c
+++ b/tests/shaders/fp-long-alu.c
@@ -43,6 +43,10 @@
#include "piglit-util.h"
#include "piglit-framework.h"
+#if defined(_MSC_VER)
+#define snprintf sprintf_s
+#endif
+
int piglit_window_mode = GLUT_RGBA | GLUT_ALPHA;
int piglit_width = 32;
int piglit_height = 32;
@@ -81,6 +85,7 @@ static enum piglit_result test(unsigned int alu_depth)
char buf[128];
GLuint program_object;
unsigned int i;
+ float expected[4] = { 0.0, 0.0, 0.0, 0.0 };
/* Note: This test makes sense up to alu_depth of 65536,
* but current drivers are not exactly efficient with such
@@ -119,7 +124,6 @@ static enum piglit_result test(unsigned int alu_depth)
glDisable(GL_FRAGMENT_PROGRAM_ARB);
pglDeleteProgramsARB(1, &program_object);
- float expected[4] = { 0.0, 0.0, 0.0, 0.0 };
expected[0] = (alu_depth % 16) * 0.0625;
expected[1] = ((alu_depth/16) % 16) * 0.0625;
expected[2] = ((alu_depth/256) % 16) * 0.0625;