i965: drop brw->must_use_separate_stencil in favor of devinfo's

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>
This commit is contained in:
Lionel Landwerlin 2017-08-30 09:35:04 +01:00
parent 40d20699b7
commit cbee3b03c9
4 changed files with 5 additions and 4 deletions

View 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;

View 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;

View 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;
}
}

View 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 &&