mesa/st: add PIPE_CAP_DITHERING
this is for drivers like zink that may or may not handle dithering and so getting blend state changes when this state changes isn't useful Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17043>
This commit is contained in:
parent
8a9f7087a1
commit
371660b877
|
@ -572,6 +572,7 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_ATOMIC_FLOAT_MINMAX``: Atomic float point minimum,
|
||||
maximum, exchange and compare-and-swap support to buffer and shared variables.
|
||||
* ``PIPE_CAP_TGSI_DIV``: Whether opcode DIV is supported
|
||||
* ``PIPE_CAP_DITHERING``: Whether dithering is supported
|
||||
* ``PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD``: Whether texture lookups with
|
||||
explicit LOD is supported in the fragment shader.
|
||||
* ``PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES``: True if the driver supports
|
||||
|
|
|
@ -49,6 +49,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
|
|||
case PIPE_CAP_GRAPHICS:
|
||||
case PIPE_CAP_GL_CLAMP:
|
||||
case PIPE_CAP_MAX_RENDER_TARGETS:
|
||||
case PIPE_CAP_DITHERING:
|
||||
return 1;
|
||||
|
||||
case PIPE_CAP_OCCLUSION_QUERY:
|
||||
|
|
|
@ -1010,6 +1010,7 @@ enum pipe_cap
|
|||
PIPE_CAP_ALLOW_DRAW_OUT_OF_ORDER,
|
||||
PIPE_CAP_MAX_CONSTANT_BUFFER_SIZE_UINT,
|
||||
PIPE_CAP_HARDWARE_GL_SELECT,
|
||||
PIPE_CAP_DITHERING,
|
||||
|
||||
PIPE_CAP_LAST,
|
||||
/* XXX do not add caps after PIPE_CAP_LAST! */
|
||||
|
|
|
@ -283,7 +283,8 @@ st_update_blend( struct st_context *st )
|
|||
/* no blending / logicop */
|
||||
}
|
||||
|
||||
blend->dither = ctx->Color.DitherFlag;
|
||||
if (st->can_dither)
|
||||
blend->dither = ctx->Color.DitherFlag;
|
||||
|
||||
if (_mesa_is_multisample_enabled(ctx) &&
|
||||
!(ctx->DrawBuffer->_IntegerBuffers & 0x1)) {
|
||||
|
|
|
@ -613,6 +613,8 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
|
|||
screen->get_param(screen, PIPE_CAP_INDEP_BLEND_FUNC);
|
||||
st->needs_rgb_dst_alpha_override =
|
||||
screen->get_param(screen, PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND);
|
||||
st->can_dither =
|
||||
screen->get_param(screen, PIPE_CAP_DITHERING);
|
||||
st->lower_flatshade =
|
||||
!screen->get_param(screen, PIPE_CAP_FLATSHADE);
|
||||
st->lower_alpha_test =
|
||||
|
|
|
@ -153,6 +153,7 @@ struct st_context
|
|||
boolean has_single_pipe_stat;
|
||||
boolean has_indep_blend_func;
|
||||
boolean needs_rgb_dst_alpha_override;
|
||||
boolean can_dither;
|
||||
boolean can_bind_const_buffer_as_vertex;
|
||||
boolean lower_flatshade;
|
||||
boolean lower_alpha_test;
|
||||
|
|
Loading…
Reference in New Issue