[Piglit] [PATCH 06/17] ext_framebuffer_multisample: blit-flipped also against RGBA16F/32F
Topi Pohjolainen
topi.pohjolainen at gmail.com
Tue Jul 18 19:16:31 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
tests/all.py | 8 +++++---
tests/spec/ext_framebuffer_multisample/blit-flipped.cpp | 16 +++++++++-------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/tests/all.py b/tests/all.py
index 98b78ea89..1411a87b5 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -3072,9 +3072,11 @@ with profile.test_list.group_manager(
'clip-and-scissor-blit {} {}'.format(sample_count, blit_type))
for flip_direction in ('x', 'y'):
- g(['ext_framebuffer_multisample-blit-flipped', sample_count,
- flip_direction],
- 'blit-flipped {} {}'.format(sample_count, flip_direction))
+ for fmt in ('GL_RGBA', 'GL_RGBA16F', 'GL_RGBA32F'):
+ g(['ext_framebuffer_multisample-blit-flipped', sample_count,
+ fmt, flip_direction],
+ 'blit-flipped {} {} {}'.format(
+ sample_count, fmt, flip_direction))
for buffer_type in ('color', 'depth', 'stencil'):
g(['ext_framebuffer_multisample-clear', sample_count, buffer_type],
diff --git a/tests/spec/ext_framebuffer_multisample/blit-flipped.cpp b/tests/spec/ext_framebuffer_multisample/blit-flipped.cpp
index 5380d0542..016ea8e58 100644
--- a/tests/spec/ext_framebuffer_multisample/blit-flipped.cpp
+++ b/tests/spec/ext_framebuffer_multisample/blit-flipped.cpp
@@ -72,7 +72,7 @@ static GLint srcX0, srcY0, srcX1, srcY1;
static void
print_usage_and_exit(char *prog_name)
{
- printf("Usage: %s <num_samples> <flip_direction>\n"
+ printf("Usage: %s <num_samples> <format> <flip_direction>\n"
" where <flip_direction> is either x or y\n",
prog_name);
piglit_report_result(PIGLIT_FAIL);
@@ -81,7 +81,7 @@ print_usage_and_exit(char *prog_name)
void
piglit_init(int argc, char **argv)
{
- if (argc != 3)
+ if (argc != 4)
print_usage_and_exit(argv[0]);
/* 1st arg: num_samples */
@@ -90,13 +90,15 @@ piglit_init(int argc, char **argv)
if (endptr != argv[1] + strlen(argv[1]))
print_usage_and_exit(argv[0]);
- /* 2nd arg: flip_direction */
- if (strcmp(argv[2], "x") == 0) {
+ GLenum color_internal_format = piglit_get_gl_enum_from_name(argv[2]);
+
+ /* 3rd arg: flip_direction */
+ if (strcmp(argv[3], "x") == 0) {
srcX0 = pattern_width;
srcX1 = 0;
srcY0 = 0;
srcY1 = pattern_height;
- } else if (strcmp(argv[2], "y") == 0) {
+ } else if (strcmp(argv[3], "y") == 0) {
srcX0 = 0;
srcX1 = pattern_width;
srcY0 = pattern_height;
@@ -115,11 +117,11 @@ piglit_init(int argc, char **argv)
if (num_samples > max_samples)
piglit_report_result(PIGLIT_SKIP);
- singlesampled_fbo.setup(FboConfig(GL_RGBA, 0,
+ singlesampled_fbo.setup(FboConfig(color_internal_format, 0,
pattern_width,
pattern_height));
- multisampled_fbo.setup(FboConfig(GL_RGBA, num_samples,
+ multisampled_fbo.setup(FboConfig(color_internal_format, num_samples,
pattern_width,
pattern_height));
--
2.11.0
More information about the Piglit
mailing list