[Piglit] [PATCH 03/17] ext_framebuffer_multisample: Allow resolve fbos with different formats
Topi Pohjolainen
topi.pohjolainen at gmail.com
Tue Jul 18 19:16:28 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
.../draw-buffers-common.cpp | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
index 8f0088c97..694931b6d 100644
--- a/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
+++ b/tests/spec/ext_framebuffer_multisample/draw-buffers-common.cpp
@@ -921,23 +921,29 @@ ms_fbo_and_draw_buffers_setup(int samples,
*/
FboConfig resolve_config(GL_RGBA, 0, pattern_width,
num_draw_buffers * pattern_height);
- resolve_fbo.setup(resolve_config);
- /* Create resolve_int_fbo to store downsampled integer draw buffer */
+ /* Create resolve_int_fbo to store downsampled integer draw buffer.
+ * It should be noted that integer formatted tests also write float
+ * formatted attachments and therefore the default GL_RGBA resolve
+ * framebuffer is needed in addition to the integer based.
+ */
if (color_buffer_zero_format == GL_RGBA8I) {
- resolve_config.color_internalformat = GL_RGBA8I;
/* Assuming single integer buffer */
- resolve_config.height = pattern_height;
- resolve_int_fbo.setup(resolve_config);
+ resolve_int_fbo.setup(FboConfig(
+ color_buffer_zero_format, 0,
+ pattern_width, pattern_height));
is_buffer_zero_integer_format = true;
- }
- else if (color_buffer_zero_format != GL_RGBA &&
- color_buffer_zero_format != GL_NONE) {
+ } else if (color_buffer_zero_format == GL_RGBA) {
+ resolve_config.color_internalformat =
+ color_buffer_zero_format;
+ } else if (color_buffer_zero_format != GL_NONE) {
printf("Draw buffer zero format is not"
" supported by test functions.\n");
piglit_report_result(PIGLIT_FAIL);
}
+ resolve_fbo.setup(resolve_config);
+
if (!piglit_check_gl_error(GL_NO_ERROR)) {
printf("Error setting up frame buffer objects\n");
piglit_report_result(PIGLIT_FAIL);
--
2.11.0
More information about the Piglit
mailing list