lavapipe: add option to enable snorm blending
This is disabled by default because it fails CTS, however this may still be useful (as it generally works), hence use LVP_SNORM_BLEND env var to enable it. Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Brian Paul <brian.paul@broadcom.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29587>
This commit is contained in:
committed by
Marge Bot
parent
9654aa4c31
commit
eead805919
@@ -1238,6 +1238,9 @@ lvp_physical_device_init(struct lvp_physical_device *device,
|
||||
device->vk.supported_extensions.EXT_image_drm_format_modifier = true;
|
||||
#endif
|
||||
|
||||
/* SNORM blending on llvmpipe fails CTS - disable by default */
|
||||
device->snorm_blend = debug_get_bool_option("LVP_SNORM_BLEND", false);
|
||||
|
||||
lvp_get_features(device, &device->vk.supported_features);
|
||||
lvp_get_properties(device, &device->vk.properties);
|
||||
|
||||
|
||||
@@ -162,9 +162,8 @@ lvp_physical_device_get_format_properties(struct lvp_physical_device *physical_d
|
||||
if (pscreen->is_format_supported(pscreen, pformat, PIPE_TEXTURE_2D, 0, 0,
|
||||
PIPE_BIND_RENDER_TARGET)) {
|
||||
features |= VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT;
|
||||
/* SNORM blending on llvmpipe fails CTS - disable for now */
|
||||
if (!util_format_is_snorm(pformat) &&
|
||||
!util_format_is_pure_integer(pformat))
|
||||
if (!util_format_is_pure_integer(pformat) &&
|
||||
!(util_format_is_snorm(pformat) && !physical_device->snorm_blend))
|
||||
features |= VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ struct lvp_physical_device {
|
||||
struct pipe_screen *pscreen;
|
||||
const nir_shader_compiler_options *drv_options[LVP_SHADER_STAGES];
|
||||
uint32_t max_images;
|
||||
bool snorm_blend;
|
||||
|
||||
struct vk_sync_timeline_type sync_timeline_type;
|
||||
const struct vk_sync_type *sync_types[3];
|
||||
|
||||
Reference in New Issue
Block a user