diff options
Diffstat (limited to 'tests')
53 files changed, 658 insertions, 390 deletions
diff --git a/tests/cases/i32_mem.ll b/tests/cases/i24_mem_ta2.ll index e50014ca..e50014ca 100644 --- a/tests/cases/i32_mem.ll +++ b/tests/cases/i24_mem_ta2.ll diff --git a/tests/cases/i32_mem.txt b/tests/cases/i24_mem_ta2.txt index 683e58e2..683e58e2 100644 --- a/tests/cases/i32_mem.txt +++ b/tests/cases/i24_mem_ta2.txt diff --git a/tests/cases/structphiparam.ll b/tests/cases/structphiparam.ll new file mode 100644 index 00000000..117bdf77 --- /dev/null +++ b/tests/cases/structphiparam.ll @@ -0,0 +1,36 @@ +; ModuleID = '/dev/shm/tmp/src.cpp.o' +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32" +target triple = "i386-pc-linux-gnu" + +@.str = private unnamed_addr constant [15 x i8] c"hello, %d %d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] +@_dispatchTable = internal global i64 0 + +define i32 @doit(i32 %x, { i32, i32 } %y) { + %y0 = extractvalue { i32, i32 } %y, 0 + %y1 = extractvalue { i32, i32 } %y, 1 + %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i32 %y0, i32 %y1) ; [#uses=0 type=i32] [debug line = 5:13] + ret i32 0 +} + +define i32 @main(i32 %argc) { +entry: + %retval = alloca i32, align 4 ; [#uses=1 type=i32*] + %myi64 = alloca i64, align 4 + %comp = alloca { i32, i32 }, align 4 ; [#uses=1] + store i32 0, i32* %retval + %should = icmp ne i32 %argc, 1337 + br i1 %should, label %cond.end, label %cond.null + +cond.null: + br label %cond.end + +cond.end: ; preds = %cond.false, %cond.true + %cond = phi { i32, i32 } [ { i32 zext (i8 111 to i32), i32 6 }, %entry ], [ zeroinitializer, %cond.null ] ; [#uses=1] + store { i32, i32 } %cond, { i32, i32 }* %comp + %call = call i32 (i32, { i32, i32 })* @doit(i32 1, { i32, i32 } %cond) ; + ret i32 0 ; [debug line = 6:13] +} + +; [#uses=1] +declare i32 @printf(i8*, ...) + diff --git a/tests/cases/structphiparam.txt b/tests/cases/structphiparam.txt new file mode 100644 index 00000000..f5af49f1 --- /dev/null +++ b/tests/cases/structphiparam.txt @@ -0,0 +1 @@ +hello, 111 6! diff --git a/tests/cube_explosion.c b/tests/cube_explosion.c index 3f55b3c6..0c6eb674 100644 --- a/tests/cube_explosion.c +++ b/tests/cube_explosion.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -230,8 +216,6 @@ int main(int argc, char *argv[]) glDeleteTextures(1, &texture); assert(!glIsTexture(texture)); // but not anymore - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cube_explosion.png b/tests/cube_explosion.png Binary files differnew file mode 100644 index 00000000..58a16f2b --- /dev/null +++ b/tests/cube_explosion.png diff --git a/tests/cubegeom.c b/tests/cubegeom.c index 787b8373..949a1f9a 100644 --- a/tests/cubegeom.c +++ b/tests/cubegeom.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { int temp; // testing @@ -308,9 +294,7 @@ int main(int argc, char *argv[]) // END SDL_GL_SwapBuffers(); - - verify(); - + #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom.png b/tests/cubegeom.png Binary files differnew file mode 100644 index 00000000..1c6a7fd5 --- /dev/null +++ b/tests/cubegeom.png diff --git a/tests/cubegeom_color.png b/tests/cubegeom_color.png Binary files differnew file mode 100644 index 00000000..a1d15438 --- /dev/null +++ b/tests/cubegeom_color.png diff --git a/tests/cubegeom_color2.c b/tests/cubegeom_color2.c index 5294329d..76d71d00 100644 --- a/tests/cubegeom_color2.c +++ b/tests/cubegeom_color2.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -287,8 +273,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_color2.png b/tests/cubegeom_color2.png Binary files differnew file mode 100644 index 00000000..ee78eb63 --- /dev/null +++ b/tests/cubegeom_color2.png diff --git a/tests/cubegeom_fog.c b/tests/cubegeom_fog.c index 9c04a55d..cae6ca2d 100644 --- a/tests/cubegeom_fog.c +++ b/tests/cubegeom_fog.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -295,8 +281,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_fog.png b/tests/cubegeom_fog.png Binary files differnew file mode 100644 index 00000000..c88e5a14 --- /dev/null +++ b/tests/cubegeom_fog.png diff --git a/tests/cubegeom_glew.c b/tests/cubegeom_glew.c index 22ef5d74..a3d86a40 100644 --- a/tests/cubegeom_glew.c +++ b/tests/cubegeom_glew.c @@ -19,20 +19,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { int temp; // testing @@ -297,8 +283,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - + #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_mt.c b/tests/cubegeom_mt.c index 464de7cc..b4ad28a7 100644 --- a/tests/cubegeom_mt.c +++ b/tests/cubegeom_mt.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -288,8 +274,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_mt.png b/tests/cubegeom_mt.png Binary files differnew file mode 100644 index 00000000..47649cdc --- /dev/null +++ b/tests/cubegeom_mt.png diff --git a/tests/cubegeom_normal.c b/tests/cubegeom_normal.c index d128fef2..02655edf 100644 --- a/tests/cubegeom_normal.c +++ b/tests/cubegeom_normal.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -283,8 +269,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal.png b/tests/cubegeom_normal.png Binary files differnew file mode 100644 index 00000000..7e3b35d1 --- /dev/null +++ b/tests/cubegeom_normal.png diff --git a/tests/cubegeom_normal_dap.c b/tests/cubegeom_normal_dap.c index f811c586..752911a8 100644 --- a/tests/cubegeom_normal_dap.c +++ b/tests/cubegeom_normal_dap.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -279,8 +265,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - + #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far.c b/tests/cubegeom_normal_dap_far.c index f954b3c7..35a068d9 100644 --- a/tests/cubegeom_normal_dap_far.c +++ b/tests/cubegeom_normal_dap_far.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -277,8 +263,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far_glda.c b/tests/cubegeom_normal_dap_far_glda.c index a4b4975b..849245b8 100644 --- a/tests/cubegeom_normal_dap_far_glda.c +++ b/tests/cubegeom_normal_dap_far_glda.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -268,8 +254,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far_glda.png b/tests/cubegeom_normal_dap_far_glda.png Binary files differnew file mode 100644 index 00000000..815efeb9 --- /dev/null +++ b/tests/cubegeom_normal_dap_far_glda.png diff --git a/tests/cubegeom_normal_dap_far_glda_quad.c b/tests/cubegeom_normal_dap_far_glda_quad.c index aa6383b8..93c157a4 100644 --- a/tests/cubegeom_normal_dap_far_glda_quad.c +++ b/tests/cubegeom_normal_dap_far_glda_quad.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -268,8 +254,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far_glda_quad.png b/tests/cubegeom_normal_dap_far_glda_quad.png Binary files differnew file mode 100644 index 00000000..8683b0ed --- /dev/null +++ b/tests/cubegeom_normal_dap_far_glda_quad.png diff --git a/tests/cubegeom_normal_dap_far_range.c b/tests/cubegeom_normal_dap_far_range.c index eb54c22a..17691ce9 100644 --- a/tests/cubegeom_normal_dap_far_range.c +++ b/tests/cubegeom_normal_dap_far_range.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -277,8 +263,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_normal_dap_far_range.png b/tests/cubegeom_normal_dap_far_range.png Binary files differnew file mode 100644 index 00000000..7e3b35d1 --- /dev/null +++ b/tests/cubegeom_normal_dap_far_range.png diff --git a/tests/cubegeom_pre.c b/tests/cubegeom_pre.c index 8001a2b8..fb1a5e02 100644 --- a/tests/cubegeom_pre.c +++ b/tests/cubegeom_pre.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -295,8 +281,7 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - + #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre.png b/tests/cubegeom_pre.png Binary files differnew file mode 100644 index 00000000..0a8c95cb --- /dev/null +++ b/tests/cubegeom_pre.png diff --git a/tests/cubegeom_pre2.c b/tests/cubegeom_pre2.c index ae8dcf9f..51961bf7 100644 --- a/tests/cubegeom_pre2.c +++ b/tests/cubegeom_pre2.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -334,8 +320,6 @@ int main(int argc, char *argv[]) // END SDL_GL_SwapBuffers(); - - verify(); #if !EMSCRIPTEN SDL_Delay(1500); diff --git a/tests/cubegeom_pre2.png b/tests/cubegeom_pre2.png Binary files differnew file mode 100644 index 00000000..0a8c95cb --- /dev/null +++ b/tests/cubegeom_pre2.png diff --git a/tests/cubegeom_pre2_vao.c b/tests/cubegeom_pre2_vao.c index 98bedd54..cba262ff 100644 --- a/tests/cubegeom_pre2_vao.c +++ b/tests/cubegeom_pre2_vao.c @@ -33,20 +33,6 @@ PFNGLGENVERTEXARRAYSPROC glGenVertexArrays_ = NULL; PFNGLBINDVERTEXARRAYPROC glBindVertexArray_ = NULL; PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays_ = NULL; -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -367,8 +353,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre2_vao2.c b/tests/cubegeom_pre2_vao2.c index e3ab4d62..3784006c 100644 --- a/tests/cubegeom_pre2_vao2.c +++ b/tests/cubegeom_pre2_vao2.c @@ -33,20 +33,6 @@ PFNGLGENVERTEXARRAYSPROC glGenVertexArrays_ = NULL; PFNGLBINDVERTEXARRAYPROC glBindVertexArray_ = NULL; PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays_ = NULL; -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -368,8 +354,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre2_vao2.png b/tests/cubegeom_pre2_vao2.png Binary files differnew file mode 100644 index 00000000..1e18bcd9 --- /dev/null +++ b/tests/cubegeom_pre2_vao2.png diff --git a/tests/cubegeom_pre3.c b/tests/cubegeom_pre3.c index a1f811b6..4ba2a779 100644 --- a/tests/cubegeom_pre3.c +++ b/tests/cubegeom_pre3.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % 4 != 3) sum += x * data[x]; - } -#if EMSCRIPTEN - int result = sum; - REPORT_RESULT(); -#endif -} - int main(int argc, char *argv[]) { SDL_Surface *screen; @@ -335,8 +321,6 @@ int main(int argc, char *argv[]) SDL_GL_SwapBuffers(); - verify(); - #if !EMSCRIPTEN SDL_Delay(1500); #endif diff --git a/tests/cubegeom_pre_vao.c b/tests/cubegeom_pre_vao.c index f1d35fb5..cae68cfc 100644 --- a/tests/cubegeom_pre_vao.c +++ b/tests/cubegeom_pre_vao.c @@ -29,20 +29,6 @@ REDISTRIBUTION OF THIS SOFTWARE. #include <string.h> #include <assert.h> -void verify() { - int width = 640, height = 480; - unsigned char *data = (unsigned char*)malloc(width*height*4); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data); - int sum = 0; - for (int x = 0; x < width*height*4; x++) { - if (x % |