Update FBO tests to handle separate depth stencil in ES3
authorThomas Spurden <thomas.spurden@broadcom.com>
Tue, 15 Feb 2022 11:12:00 +0000 (11:12 +0000)
committerThomas Spurden <thomas.spurden@broadcom.com>
Thu, 3 Mar 2022 10:37:12 +0000 (10:37 +0000)
Extends FBO blit tests as they did not have cases for separate depth
stencil at all (as they are ES3 only).

Components: OpenGL
Affects: dEQP-GLES3.functional.fbo.*

Change-Id: Icc6dcd047db3b9c29baed0c5691766fb30242e31

android/cts/master/gles3-master.txt
external/openglcts/data/mustpass/gles/aosp_mustpass/3.2.2.x/gles3-master.txt
external/openglcts/data/mustpass/gles/aosp_mustpass/3.2.3.x/gles3-master.txt
external/openglcts/data/mustpass/gles/aosp_mustpass/3.2.4.x/gles3-master.txt
external/openglcts/data/mustpass/gles/aosp_mustpass/3.2.5.x/gles3-master.txt
external/openglcts/data/mustpass/gles/aosp_mustpass/3.2.6.x/gles3-master.txt
external/openglcts/data/mustpass/gles/aosp_mustpass/master/gles3-master.txt
modules/gles3/functional/es3fFboCompletenessTests.cpp
modules/gles3/functional/es3fFramebufferBlitTests.cpp

index 0820dbe..7a890a5 100644 (file)
@@ -31122,12 +31122,26 @@ dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg32f
 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
@@ -31136,8 +31150,6 @@ dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_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
index 2be891b..928ab58 100644 (file)
@@ -29380,6 +29380,8 @@ dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg32f
 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
@@ -29394,8 +29396,6 @@ dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_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
index 45156af..a75313b 100644 (file)
@@ -31839,6 +31839,8 @@ dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg32f
 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
@@ -31853,8 +31855,6 @@ dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_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
index f9e8ab3..3c4f7d9 100644 (file)
@@ -32437,6 +32437,8 @@ dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg32f
 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
@@ -32451,8 +32453,6 @@ dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_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
index 5f55fe1..40ced24 100644 (file)
@@ -32525,12 +32525,26 @@ dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg32f
 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
@@ -32539,8 +32553,6 @@ dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_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
index 5f55fe1..40ced24 100644 (file)
@@ -32525,12 +32525,26 @@ dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg32f
 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
@@ -32539,8 +32553,6 @@ dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_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
index 488144d..5c9b4f9 100644 (file)
@@ -32543,12 +32543,26 @@ dEQP-GLES3.functional.fbo.blit.conversion.r16f_to_rg32f
 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
@@ -32557,8 +32571,6 @@ dEQP-GLES3.functional.fbo.blit.depth_stencil.depth24_stencil8_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
index 5a07bba..8801db2 100644 (file)
@@ -24,6 +24,7 @@
 #include "es3fFboCompletenessTests.hpp"
 
 #include "glsFboCompletenessTests.hpp"
+#include "deUniquePtr.hpp"
 #include <sstream>
 
 using namespace glw;
@@ -176,12 +177,15 @@ class ES3Checker : public Checker
 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;
 
@@ -225,7 +229,8 @@ void ES3Checker::check (GLenum attPoint, const Attachment& att, const Image* ima
        }
 
        // "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)
                {
index 2ee16b6..3eefe1a 100644 (file)
@@ -25,6 +25,7 @@
 #include "es3fFboTestCase.hpp"
 #include "es3fFboTestUtil.hpp"
 #include "gluTextureUtil.hpp"
+#include "gluContextInfo.hpp"
 #include "tcuTextureUtil.hpp"
 #include "tcuVectorUtil.hpp"
 #include "tcuTestLog.hpp"
@@ -456,9 +457,10 @@ private:
 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)
@@ -472,7 +474,13 @@ public:
 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)
@@ -491,8 +499,10 @@ protected:
                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));
@@ -503,27 +513,37 @@ protected:
                {
                        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);
@@ -596,7 +616,8 @@ protected:
        }
 
 private:
-       deUint32        m_format;
+       deUint32        m_depthFormat;
+       deUint32        m_stencilFormat;
        deUint32        m_srcBuffers;
        IVec2           m_srcSize;
        IVec4           m_srcRect;
@@ -920,11 +941,17 @@ void FramebufferBlitTests::init (void)
 
        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
        };
 
@@ -1042,22 +1069,52 @@ void FramebufferBlitTests::init (void)
                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));
+                               }
                        }
                }
        }