diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 587080864d3..7e3bf1895f9 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -1305,7 +1305,7 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y, write_depth = GL_TRUE; if (write_stencil && - !st->has_stencil_export) { + !st->screen->caps.shader_stencil_export) { /* software fallback */ draw_stencil_pixels(ctx, x, y, width, height, format, type, unpack, pixels); @@ -1692,7 +1692,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, /* fallback if the driver can't do stencil exports */ if (type == GL_DEPTH_STENCIL && - !st->has_stencil_export) { + !st->screen->caps.shader_stencil_export) { st_CopyPixels(ctx, srcx, srcy, width, height, dstx, dsty, GL_STENCIL); st_CopyPixels(ctx, srcx, srcy, width, height, dstx, dsty, GL_DEPTH); return; @@ -1700,7 +1700,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, /* fallback if the driver can't do stencil exports */ if (type == GL_STENCIL && - !st->has_stencil_export) { + !st->screen->caps.shader_stencil_export) { copy_stencil_pixels(ctx, srcx, srcy, width, height, dstx, dsty); return; } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 1fdc815e0d8..49b83de6372 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -532,8 +532,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe, ctx->Const.QueryCounterBits.Timestamp = screen->caps.query_timestamp_bits; - st->has_stencil_export = - screen->caps.shader_stencil_export; st->has_etc1 = screen->is_format_supported(screen, PIPE_FORMAT_ETC1_RGB8, PIPE_TEXTURE_2D, 0, 0, PIPE_BIND_SAMPLER_VIEW); diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index c9d57a35c2a..14b70cf28ac 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -144,7 +144,6 @@ struct st_context GLboolean clamp_frag_color_in_shader; GLboolean clamp_vert_color_in_shader; bool thread_scheduler_disabled; - bool has_stencil_export; /**< can do shader stencil export? */ bool has_time_elapsed; bool has_etc1; bool has_etc2;