[Piglit] [PATCH 14/17] ext_framebuffer_multisample: clip-and-scissor also against RGBA16F/32F
Topi Pohjolainen
topi.pohjolainen at gmail.com
Tue Jul 18 19:16:39 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
tests/all.py | 10 ++++++----
.../clip-and-scissor-blit.cpp | 17 ++++++++++-------
2 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/tests/all.py b/tests/all.py
index 78de273c1..589259ea5 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -3064,10 +3064,12 @@ with profile.test_list.group_manager(
sample_count],
'{} {}'.format(test, sample_count))
- for blit_type in ('msaa', 'upsample', 'downsample', 'normal'):
- g(['ext_framebuffer_multisample-clip-and-scissor-blit',
- sample_count, blit_type],
- 'clip-and-scissor-blit {} {}'.format(sample_count, blit_type))
+ for fmt in ('GL_RGBA', 'GL_RGBA16F', 'GL_RGBA32F'):
+ for blit_type in ('msaa', 'upsample', 'downsample', 'normal'):
+ g(['ext_framebuffer_multisample-clip-and-scissor-blit',
+ sample_count, fmt, blit_type],
+ 'clip-and-scissor-blit {} {} {}'.format(
+ sample_count, fmt, blit_type))
for flip_direction in ('x', 'y'):
for fmt in ('GL_RGBA', 'GL_RGBA16F', 'GL_RGBA32F'):
diff --git a/tests/spec/ext_framebuffer_multisample/clip-and-scissor-blit.cpp b/tests/spec/ext_framebuffer_multisample/clip-and-scissor-blit.cpp
index 1b17e9b38..5c29982da 100644
--- a/tests/spec/ext_framebuffer_multisample/clip-and-scissor-blit.cpp
+++ b/tests/spec/ext_framebuffer_multisample/clip-and-scissor-blit.cpp
@@ -315,7 +315,7 @@ do_test(int coord, bool clip_low, test_type_enum test_type,
NORETURN void
print_usage_and_exit(char *prog_name)
{
- printf("Usage: %s <num_samples> <blit_type>\n"
+ printf("Usage: %s <num_samples> <format> <blit_type>\n"
" where <blit_type> is one of:\n"
" msaa\n"
" upsample\n"
@@ -349,26 +349,29 @@ piglit_init(int argc, char **argv)
if (num_samples > max_samples)
piglit_report_result(PIGLIT_SKIP);
+ const GLenum color_internal_format =
+ piglit_get_gl_enum_from_name(argv[2]);
+
int src_samples;
int dst_samples;
- if (strcmp(argv[2], "msaa") == 0) {
+ if (strcmp(argv[3], "msaa") == 0) {
src_samples = dst_samples = num_samples;
- } else if (strcmp(argv[2], "upsample") == 0) {
+ } else if (strcmp(argv[3], "upsample") == 0) {
src_samples = 0;
dst_samples = num_samples;
- } else if (strcmp(argv[2], "downsample") == 0) {
+ } else if (strcmp(argv[3], "downsample") == 0) {
src_samples = num_samples;
dst_samples = 0;
- } else if (strcmp(argv[2], "normal") == 0) {
+ } else if (strcmp(argv[3], "normal") == 0) {
src_samples = dst_samples = 0;
test_mirrored_blits = true;
} else {
print_usage_and_exit(argv[0]);
}
- src_fbo.setup(FboConfig(GL_RGBA, src_samples,
+ src_fbo.setup(FboConfig(color_internal_format, src_samples,
src_size[0], src_size[1]));
- dst_fbo.setup(FboConfig(GL_RGBA, dst_samples,
+ dst_fbo.setup(FboConfig(color_internal_format, dst_samples,
dst_size[0], dst_size[1]));
}
--
2.11.0
More information about the Piglit
mailing list