diff options
author | Eric Anholt <eric@anholt.net> | 2015-01-11 15:11:52 +1300 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-03-25 12:46:18 -0700 |
commit | c4c2d33b2ae89c5dd53311f8658e1d676ffd9bfa (patch) | |
tree | 591842d462032ebac57dfa97ca0cc1b0a5f83670 | |
parent | 384a93dce58404f6ed08a141391c35a32d230482 (diff) |
arb_color_buffer_float: Actually use the enum names.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r-- | tests/spec/arb_color_buffer_float/common.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/spec/arb_color_buffer_float/common.h b/tests/spec/arb_color_buffer_float/common.h index c0b0159f8..bc3bf45ce 100644 --- a/tests/spec/arb_color_buffer_float/common.h +++ b/tests/spec/arb_color_buffer_float/common.h @@ -172,17 +172,21 @@ static GLboolean run_test() } else { - unsigned mrt_modes = piglit_is_extension_supported("GL_ARB_draw_buffers") ? (piglit_is_extension_supported("GL_ARB_texture_float") ? 3 : 2) : 1; - unsigned first_mrt_mode = (test_mode == TEST_MRT) ? 1 : 0; + enum test_mode_type mrt_modes = (piglit_is_extension_supported("GL_ARB_draw_buffers") ? + (piglit_is_extension_supported("GL_ARB_texture_float") ? + TEST_SRT_MRT : + TEST_MRT) : + TEST_SRT); + enum test_mode_type first_mrt_mode = (test_mode == TEST_MRT) ? TEST_SRT : TEST_NO_RT; for (mrt_mode = first_mrt_mode; mrt_mode < mrt_modes; ++mrt_mode) { fixed1 = fixed; - if (mrt_mode) + if (mrt_mode != TEST_NO_RT) { GLenum bufs[2] = {GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1}; unsigned format1; - if (mrt_mode == 1) + if (mrt_mode == TEST_SRT) format1 = format; else { @@ -213,7 +217,7 @@ static GLboolean run_test() status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - if (mrt_mode == 2) + if (mrt_mode == TEST_MRT) printf("Dishomogeneous framebuffer is incomplete, skipping dishomogeneous tests (status = 0x%04x)\n", status); else { @@ -238,7 +242,7 @@ static GLboolean run_test() pass = test() && pass; skip_mrt: - if (mrt_mode) + if (mrt_mode != TEST_NO_RT) { glDrawBuffer(GL_COLOR_ATTACHMENT0); |