i965: drop brw->must_use_separate_stencil in favor of devinfo's
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Aug 2017 08:35:04 +0000 (09:35 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 30 Aug 2017 16:59:18 +0000 (17:59 +0100)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index e732b2c2a41b116e9f7af300b3524208a5a874bf..97030b70bbe179045b6a21148d91a9e7397ea132 100644 (file)
@@ -865,7 +865,6 @@ brwCreateContext(gl_api api,
    brw->needs_unlit_centroid_workaround =
       devinfo->needs_unlit_centroid_workaround;
 
-   brw->must_use_separate_stencil = devinfo->must_use_separate_stencil;
    brw->has_swizzling = screen->hw_has_swizzling;
 
    brw->isl_dev = screen->isl_dev;
index a59977145ce7866cda65355cebf560577e49b275..0ab891680305cb4666990281f3ca4d37cc5567d2 100644 (file)
@@ -748,7 +748,6 @@ struct brw_context
 
    bool has_hiz;
    bool has_separate_stencil;
-   bool must_use_separate_stencil;
    bool has_swizzling;
    bool has_surface_tile_offset;
    bool has_pln;
index 048d72dad8e14eaa0c835534110d8d1e4dafa0c5..46f140c0280165d5e29474587a501b9273598166 100644 (file)
@@ -249,6 +249,7 @@ static mesa_format
 intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat)
 {
    struct brw_context *brw = brw_context(ctx);
+   MAYBE_UNUSED const struct gen_device_info *devinfo = &brw->screen->devinfo;
 
    switch (internalFormat) {
    default:
@@ -270,7 +271,7 @@ intel_renderbuffer_format(struct gl_context * ctx, GLenum internalFormat)
       if (brw->has_separate_stencil) {
         return MESA_FORMAT_S_UINT8;
       } else {
-        assert(!brw->must_use_separate_stencil);
+        assert(!devinfo->must_use_separate_stencil);
         return MESA_FORMAT_Z24_UNORM_S8_UINT;
       }
    }
index 9e2ca5449024f4a1ed586afa80761516ae3eeaf3..75f206a9800a7a24b0839734af24ed1ca3dafb7b 100644 (file)
@@ -315,10 +315,12 @@ needs_separate_stencil(const struct brw_context *brw,
                        struct intel_mipmap_tree *mt,
                        mesa_format format)
 {
+   const struct gen_device_info *devinfo = &brw->screen->devinfo;
+
    if (_mesa_get_format_base_format(format) != GL_DEPTH_STENCIL)
       return false;
 
-   if (brw->must_use_separate_stencil)
+   if (devinfo->must_use_separate_stencil)
       return true;
 
    return brw->has_separate_stencil &&