mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
anv: VK_EXT_legacy_dithering support
Toggle on dithering if it has been enabled on device and is set on the rendering flags used. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19414>
This commit is contained in:
parent
e7ce48557a
commit
2ac5e70fae
3 changed files with 8 additions and 0 deletions
|
|
@ -372,6 +372,7 @@ get_device_extensions(const struct anv_physical_device *device,
|
|||
.EXT_image_view_min_lod = true,
|
||||
.EXT_index_type_uint8 = true,
|
||||
.EXT_inline_uniform_block = true,
|
||||
.EXT_legacy_dithering = true,
|
||||
.EXT_legacy_vertex_attributes = true,
|
||||
.EXT_line_rasterization = true,
|
||||
.EXT_load_store_op_none = true,
|
||||
|
|
@ -937,6 +938,9 @@ get_features(const struct anv_physical_device *pdevice,
|
|||
|
||||
/* VK_EXT_legacy_vertex_attributes */
|
||||
.legacyVertexAttributes = true,
|
||||
|
||||
/* VK_EXT_legacy_dithering */
|
||||
.legacyDithering = true,
|
||||
};
|
||||
|
||||
/* The new DOOM and Wolfenstein games require depthBounds without
|
||||
|
|
|
|||
|
|
@ -1468,6 +1468,7 @@ struct anv_gfx_dynamic_state {
|
|||
bool AlphaToCoverageEnable;
|
||||
bool AlphaToOneEnable;
|
||||
bool IndependentAlphaBlendEnable;
|
||||
bool ColorDitherEnable;
|
||||
struct {
|
||||
bool WriteDisableAlpha;
|
||||
bool WriteDisableRed;
|
||||
|
|
|
|||
|
|
@ -1060,6 +1060,8 @@ genX(cmd_buffer_flush_gfx_runtime_state)(struct anv_cmd_buffer *cmd_buffer)
|
|||
dyn->ms.alpha_to_coverage_enable);
|
||||
SET(BLEND_STATE, blend.AlphaToOneEnable,
|
||||
dyn->ms.alpha_to_one_enable);
|
||||
SET(BLEND_STATE, blend.ColorDitherEnable,
|
||||
cmd_buffer->state.gfx.rendering_flags & VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT);
|
||||
|
||||
bool independent_alpha_blend = false;
|
||||
/* Wa_14018912822, check if we set these during RT setup. */
|
||||
|
|
@ -2149,6 +2151,7 @@ cmd_buffer_gfx_state_emission(struct anv_cmd_buffer *cmd_buffer)
|
|||
INIT(blend, AlphaToCoverageEnable),
|
||||
INIT(blend, AlphaToOneEnable),
|
||||
INIT(blend, IndependentAlphaBlendEnable),
|
||||
INIT(blend, ColorDitherEnable),
|
||||
};
|
||||
GENX(BLEND_STATE_pack)(NULL, dws, &blend_state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue