zink: add `zink_emulate_point_smooth` driconf
authorantonino <antonino.maniscalco@collabora.com>
Mon, 6 Mar 2023 11:02:58 +0000 (12:02 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 9 Mar 2023 04:38:24 +0000 (04:38 +0000)
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21731>

src/gallium/drivers/zink/driinfo_zink.h
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_types.h

index 190391b..27a0b24 100644 (file)
@@ -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
index 9d19ada..e3b994f 100644 (file)
@@ -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;
 
index 06827db..ed6365e 100644 (file)
@@ -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];