mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 21:58:26 +02:00
mesa/st: remove redundant has_stencil_export from st_context
This cap is a direct alias of screen->caps.shader_stencil_export. Replace all st_context usages with the screen cap directly. Reviewed-by: Marek Olšák <maraeo@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
This commit is contained in:
parent
e2e7fce6e9
commit
4fd17e53f3
3 changed files with 3 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue