dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_rg8_nearest_mipmap_linear
dEQP-GLES3.functional.texture.filtering.3d.formats.srgb_rg8_linear_mipmap_linear
dEQP-GLES3.functional.texture.specification.texsubimage2d_pbo.pbo_bounds_2d
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_stencil_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_stencil_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_stencil_only
dEQP-GLES3.functional.ubo.single_nested_struct_mixed_matrix_packing.per_block_buffer.shared_block_row_major_matrix_row_major_matrixarray_row_major_vertex
dEQP-GLES3.functional.ubo.single_nested_struct_mixed_matrix_packing.per_block_buffer.shared_block_row_major_matrix_row_major_matrixarray_row_major_fragment
dEQP-GLES3.functional.ubo.single_nested_struct_mixed_matrix_packing.per_block_buffer.shared_block_row_major_matrix_row_major_matrixarray_row_major_both
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg16f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r32f
dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_r16f
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component32f_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component24_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_basic
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_scale
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_depth_only
+dEQP-GLES3.functional.fbo.blit.depth_stencil.depth_component16_stencil_index8_stencil_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_basic
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth32f_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_scale
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_depth_only
dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_stencil_only
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_basic
-dEQP-GLES3.functional.fbo.blit.depth_stencil.stencil_index8_scale
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_from_default
dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba8_nearest_scale_blit_to_default
#include "es3fFboCompletenessTests.hpp"
#include "glsFboCompletenessTests.hpp"
+#include "deUniquePtr.hpp"
#include <sstream>
using namespace glw;
public:
ES3Checker (const glu::RenderContext& ctx)
: Checker (ctx)
+ , m_ctxInfo (glu::ContextInfo::create(ctx))
, m_numSamples (-1)
, m_depthStencilImage (0)
, m_depthStencilType (GL_NONE) {}
void check (GLenum attPoint, const Attachment& att, const Image* image);
private:
+ de::UniquePtr<glu::ContextInfo> m_ctxInfo;
+
//! The common number of samples of images.
GLsizei m_numSamples;
}
// "Depth and stencil attachments, if present, are the same image."
- if (attPoint == GL_DEPTH_ATTACHMENT || attPoint == GL_STENCIL_ATTACHMENT)
+ if (!m_ctxInfo->isExtensionSupported("GL_EXT_separate_depth_stencil")
+ && (attPoint == GL_DEPTH_ATTACHMENT || attPoint == GL_STENCIL_ATTACHMENT))
{
if (m_depthStencilImage == 0)
{
#include "es3fFboTestCase.hpp"
#include "es3fFboTestUtil.hpp"
#include "gluTextureUtil.hpp"
+#include "gluContextInfo.hpp"
#include "tcuTextureUtil.hpp"
#include "tcuVectorUtil.hpp"
#include "tcuTestLog.hpp"
class BlitDepthStencilCase : public FboTestCase
{
public:
- BlitDepthStencilCase (Context& context, const char* name, const char* desc, deUint32 format, deUint32 srcBuffers, const IVec2& srcSize, const IVec4& srcRect, deUint32 dstBuffers, const IVec2& dstSize, const IVec4& dstRect, deUint32 copyBuffers)
+ BlitDepthStencilCase (Context& context, const char* name, const char* desc, deUint32 depthFormat, deUint32 stencilFormat, deUint32 srcBuffers, const IVec2& srcSize, const IVec4& srcRect, deUint32 dstBuffers, const IVec2& dstSize, const IVec4& dstRect, deUint32 copyBuffers)
: FboTestCase (context, name, desc)
- , m_format (format)
+ , m_depthFormat (depthFormat)
+ , m_stencilFormat(stencilFormat)
, m_srcBuffers (srcBuffers)
, m_srcSize (srcSize)
, m_srcRect (srcRect)
protected:
void preCheck (void)
{
- checkFormatSupport(m_format);
+ if (m_depthFormat != GL_NONE)
+ checkFormatSupport(m_depthFormat);
+ if (m_stencilFormat != GL_NONE)
+ checkFormatSupport(m_stencilFormat);
+ if (!m_context.getContextInfo().isExtensionSupported("GL_EXT_separate_depth_stencil")
+ && m_depthFormat != GL_NONE && m_stencilFormat != GL_NONE)
+ throw tcu::NotSupportedError("Separate depth and stencil buffers not supported");
}
void render (tcu::Surface& dst)
deUint32 dstFbo = 0;
deUint32 srcColorRbo = 0;
deUint32 dstColorRbo = 0;
- deUint32 srcDepthStencilRbo = 0;
- deUint32 dstDepthStencilRbo = 0;
+ deUint32 srcDepthRbo = 0;
+ deUint32 srcStencilRbo = 0;
+ deUint32 dstDepthRbo = 0;
+ deUint32 dstStencilRbo = 0;
// setup shaders
gradShader.setGradient(*getCurrentContext(), gradShaderID, Vec4(0.0f), Vec4(1.0f));
{
deUint32& fbo = ndx ? dstFbo : srcFbo;
deUint32& colorRbo = ndx ? dstColorRbo : srcColorRbo;
- deUint32& depthStencilRbo = ndx ? dstDepthStencilRbo : srcDepthStencilRbo;
+ deUint32& depthRbo = ndx ? dstDepthRbo : srcDepthRbo;
+ deUint32& stencilRbo = ndx ? dstStencilRbo : srcStencilRbo;
deUint32 bufs = ndx ? m_dstBuffers : m_srcBuffers;
const IVec2& size = ndx ? m_dstSize : m_srcSize;
glGenFramebuffers(1, &fbo);
glGenRenderbuffers(1, &colorRbo);
- glGenRenderbuffers(1, &depthStencilRbo);
glBindRenderbuffer(GL_RENDERBUFFER, colorRbo);
glRenderbufferStorage(GL_RENDERBUFFER, colorFormat, size.x(), size.y());
- glBindRenderbuffer(GL_RENDERBUFFER, depthStencilRbo);
- glRenderbufferStorage(GL_RENDERBUFFER, m_format, size.x(), size.y());
+ if (m_depthFormat != GL_NONE) {
+ glGenRenderbuffers(1, &depthRbo);
+ glBindRenderbuffer(GL_RENDERBUFFER, depthRbo);
+ glRenderbufferStorage(GL_RENDERBUFFER, m_depthFormat, size.x(), size.y());
+ }
+
+ if (m_stencilFormat != GL_NONE) {
+ glGenRenderbuffers(1, &stencilRbo);
+ glBindRenderbuffer(GL_RENDERBUFFER, stencilRbo);
+ glRenderbufferStorage(GL_RENDERBUFFER, m_stencilFormat, size.x(), size.y());
+ }
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRbo);
if (bufs & GL_DEPTH_BUFFER_BIT)
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthStencilRbo);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthRbo);
if (bufs & GL_STENCIL_BUFFER_BIT)
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, depthStencilRbo);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER,
+ m_stencilFormat == GL_NONE? depthRbo : stencilRbo);
checkError();
checkFramebufferStatus(GL_FRAMEBUFFER);
}
private:
- deUint32 m_format;
+ deUint32 m_depthFormat;
+ deUint32 m_stencilFormat;
deUint32 m_srcBuffers;
IVec2 m_srcSize;
IVec4 m_srcRect;
static const deUint32 depthStencilFormats[] =
{
+ GL_NONE,
GL_DEPTH_COMPONENT32F,
GL_DEPTH_COMPONENT24,
GL_DEPTH_COMPONENT16,
GL_DEPTH32F_STENCIL8,
- GL_DEPTH24_STENCIL8,
+ GL_DEPTH24_STENCIL8
+ };
+
+ static const deUint32 stencilFormats[] =
+ {
+ GL_NONE,
GL_STENCIL_INDEX8
};
tcu::TestCaseGroup* depthStencilGroup = new tcu::TestCaseGroup(m_testCtx, "depth_stencil", "Depth and stencil blits");
addChild(depthStencilGroup);
- for (int fmtNdx = 0; fmtNdx < DE_LENGTH_OF_ARRAY(depthStencilFormats); fmtNdx++)
+ for (int dFmtNdx = 0; dFmtNdx < DE_LENGTH_OF_ARRAY(depthStencilFormats); dFmtNdx++)
{
- deUint32 format = depthStencilFormats[fmtNdx];
- tcu::TextureFormat texFmt = glu::mapGLInternalFormat(format);
- string fmtName = getFormatName(format);
- bool depth = texFmt.order == tcu::TextureFormat::D || texFmt.order == tcu::TextureFormat::DS;
- bool stencil = texFmt.order == tcu::TextureFormat::S || texFmt.order == tcu::TextureFormat::DS;
- deUint32 buffers = (depth ? GL_DEPTH_BUFFER_BIT : 0) | (stencil ? GL_STENCIL_BUFFER_BIT : 0);
+ for (int sFmtNdx = 0; sFmtNdx < DE_LENGTH_OF_ARRAY(stencilFormats); sFmtNdx++)
+ {
+ deUint32 depthFormat = depthStencilFormats[dFmtNdx];
+ deUint32 stencilFormat = stencilFormats[sFmtNdx];
+ bool depth = false;
+ bool stencil = false;
+ string fmtName;
- depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_basic").c_str(), "", format, buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers));
- depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_scale").c_str(), "", format, buffers, IVec2(127, 119), IVec4(10, 30, 100, 70), buffers, IVec2(111, 130), IVec4(20, 5, 80, 130), buffers));
+ if (depthFormat != GL_NONE)
+ {
+ tcu::TextureFormat info = glu::mapGLInternalFormat(depthFormat);
- if (depth && stencil)
- {
- depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_depth_only").c_str(), "", format, buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), GL_DEPTH_BUFFER_BIT));
- depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_stencil_only").c_str(), "", format, buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), GL_STENCIL_BUFFER_BIT));
+ fmtName += getFormatName(depthFormat);
+ if (info.order == tcu::TextureFormat::D || info.order == tcu::TextureFormat::DS)
+ depth = true;
+ if (info.order == tcu::TextureFormat::DS)
+ stencil = true;
+ }
+
+ if (stencilFormat != GL_NONE)
+ {
+ // Do not try separate stencil along with a combined depth/stencil
+ if (stencil)
+ continue;
+
+ if (depthFormat != GL_NONE)
+ fmtName += "_";
+ fmtName += getFormatName(stencilFormat);
+ stencil = true;
+ }
+
+ if (!stencil && !depth)
+ continue;
+
+ deUint32 buffers = (depth ? GL_DEPTH_BUFFER_BIT : 0) | (stencil ? GL_STENCIL_BUFFER_BIT : 0);
+
+ depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_basic").c_str(), "", depthFormat, stencilFormat, buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers));
+ depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_scale").c_str(), "", depthFormat, stencilFormat, buffers, IVec2(127, 119), IVec4(10, 30, 100, 70), buffers, IVec2(111, 130), IVec4(20, 5, 80, 130), buffers));
+
+ if (depth && stencil)
+ {
+ depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_depth_only").c_str(), "", depthFormat, stencilFormat, buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), GL_DEPTH_BUFFER_BIT));
+ depthStencilGroup->addChild(new BlitDepthStencilCase(m_context, (fmtName + "_stencil_only").c_str(), "", depthFormat, stencilFormat, buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), buffers, IVec2(128, 128), IVec4(0, 0, 128, 128), GL_STENCIL_BUFFER_BIT));
+ }
}
}
}