From c32a5b8d0488ed579fabd40ec58f0e2945bfc39d Mon Sep 17 00:00:00 2001 From: antonino Date: Mon, 6 Mar 2023 12:02:58 +0100 Subject: [PATCH] zink: add `zink_emulate_point_smooth` driconf Reviewed-By: Mike Blumenkrantz Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/zink/driinfo_zink.h | 4 ++++ src/gallium/drivers/zink/zink_screen.c | 4 +++- src/gallium/drivers/zink/zink_types.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/driinfo_zink.h b/src/gallium/drivers/zink/driinfo_zink.h index 190391b..27a0b244 100644 --- a/src/gallium/drivers/zink/driinfo_zink.h +++ b/src/gallium/drivers/zink/driinfo_zink.h @@ -10,3 +10,7 @@ DRI_CONF_SECTION_END DRI_CONF_SECTION_PERFORMANCE DRI_CONF_MESA_GLTHREAD(true) DRI_CONF_SECTION_END + +DRI_CONF_SECTION_QUALITY + DRI_CONF_OPT_B(zink_emulate_point_smooth, false, "Enable support for emulated GL_POINT_SMOOTH") +DRI_CONF_SECTION_END diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 9d19ada..e3b994f 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2690,6 +2690,7 @@ zink_internal_create_screen(const struct pipe_screen_config *config) screen->driconf.dual_color_blend_by_location = driQueryOptionb(config->options, "dual_color_blend_by_location"); screen->driconf.glsl_correct_derivatives_after_discard = driQueryOptionb(config->options, "glsl_correct_derivatives_after_discard"); //screen->driconf.inline_uniforms = driQueryOptionb(config->options, "radeonsi_inline_uniforms"); + screen->driconf.emulate_point_smooth = driQueryOptionb(config->options, "zink_emulate_point_smooth"); screen->instance_info.disable_xcb_surface = driQueryOptionb(config->options, "disable_xcb_surface"); } @@ -3035,7 +3036,8 @@ zink_internal_create_screen(const struct pipe_screen_config *config) !screen->driver_workarounds.no_linestipple && !screen->driver_workarounds.no_linesmooth && !screen->driver_workarounds.no_hw_gl_point && - !screen->driver_workarounds.lower_robustImageAccess2; + !screen->driver_workarounds.lower_robustImageAccess2 && + !screen->driconf.emulate_point_smooth; if (!screen->optimal_keys) screen->info.have_EXT_graphics_pipeline_library = false; diff --git a/src/gallium/drivers/zink/zink_types.h b/src/gallium/drivers/zink/zink_types.h index 06827db..ed6365e 100644 --- a/src/gallium/drivers/zink/zink_types.h +++ b/src/gallium/drivers/zink/zink_types.h @@ -1388,6 +1388,7 @@ struct zink_screen { bool dual_color_blend_by_location; bool glsl_correct_derivatives_after_discard; bool inline_uniforms; + bool emulate_point_smooth; } driconf; VkFormatProperties format_props[PIPE_FORMAT_COUNT]; -- 2.7.4