diff options
author | Rob Clark <robdclark@gmail.com> | 2018-06-17 09:59:38 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-06-19 09:43:09 -0400 |
commit | 9dcce71e603616ee7a54707e932f962cdf8fb20a (patch) | |
tree | 874382698c6e736e9d7bde3af3dd8ef028b38e64 /kmscube.c | |
parent | 063ce5c732598b3855775e59b59d9ddffe4ddb24 (diff) | |
download | kmscube-9dcce71e603616ee7a54707e932f962cdf8fb20a.tar.gz |
add MSAA
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'kmscube.c')
-rw-r--r-- | kmscube.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -50,6 +50,7 @@ static const struct option longopts[] = { {"device", required_argument, 0, 'D'}, {"mode", required_argument, 0, 'M'}, {"modifier", required_argument, 0, 'm'}, + {"samples", required_argument, 0, 's'}, {"video", required_argument, 0, 'V'}, {0, 0, 0, 0} }; @@ -67,6 +68,7 @@ static void usage(const char *name) " nv12-2img - yuv textured (color conversion in shader)\n" " nv12-1img - yuv textured (single nv12 texture)\n" " -m, --modifier=MODIFIER hardcode the selected modifier\n" + " -s, --samples=N use MSAA\n" " -V, --video=FILE video textured cube\n", name); } @@ -77,6 +79,7 @@ int main(int argc, char *argv[]) const char *video = NULL; enum mode mode = SMOOTH; uint64_t modifier = DRM_FORMAT_MOD_LINEAR; + int samples = 0; int atomic = 0; int opt; @@ -111,6 +114,9 @@ int main(int argc, char *argv[]) case 'm': modifier = strtoull(optarg, NULL, 0); break; + case 's': + samples = strtoul(optarg, NULL, 0); + break; case 'V': mode = VIDEO; video = optarg; @@ -138,11 +144,11 @@ int main(int argc, char *argv[]) } if (mode == SMOOTH) - egl = init_cube_smooth(gbm); + egl = init_cube_smooth(gbm, samples); else if (mode == VIDEO) - egl = init_cube_video(gbm, video); + egl = init_cube_video(gbm, video, samples); else - egl = init_cube_tex(gbm, mode); + egl = init_cube_tex(gbm, mode, samples); if (!egl) { printf("failed to initialize EGL\n"); |