[Piglit] [PATCH 1/4] Add variable color_format to configure non-multisample fbo
Anuj Phogat
anuj.phogat at gmail.com
Tue Dec 17 11:30:35 PST 2013
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
tests/util/piglit-fbo.cpp | 3 ++-
tests/util/piglit-fbo.h | 8 ++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/util/piglit-fbo.cpp b/tests/util/piglit-fbo.cpp
index 138b5d3..a85d19d 100644
--- a/tests/util/piglit-fbo.cpp
+++ b/tests/util/piglit-fbo.cpp
@@ -37,6 +37,7 @@ FboConfig::FboConfig(int num_samples, int width, int height)
height(height),
combine_depth_stencil(true),
attach_texture(false),
+ color_format(GL_RGBA),
color_internalformat(GL_RGBA),
depth_internalformat(GL_DEPTH_COMPONENT24),
stencil_internalformat(GL_STENCIL_INDEX8)
@@ -127,7 +128,7 @@ Fbo::try_setup(const FboConfig &new_config)
config.width,
config.height,
0 /* border */,
- GL_RGBA /* format */,
+ config.color_format /* format */,
GL_BYTE /* type */,
NULL /* data */);
glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER,
diff --git a/tests/util/piglit-fbo.h b/tests/util/piglit-fbo.h
index d89d228..17acf4e 100644
--- a/tests/util/piglit-fbo.h
+++ b/tests/util/piglit-fbo.h
@@ -58,6 +58,14 @@ namespace piglit_util_fbo {
bool attach_texture;
/**
+ * Useful if attach_texture is true and color buffer is
+ * non-multisample. Specifies the format that should be used
+ * for the color buffer, or GL_NONE if no color buffer should
+ * be used. Defaults to GL_RGBA.
+ */
+ GLenum color_format;
+
+ /**
* Internalformat that should be used for the color buffer, or
* GL_NONE if no color buffer should be used. Defaults to
* GL_RGBA.
--
1.8.3.1
More information about the Piglit
mailing list