summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam Middlebrook <lmiddlebrook@nvidia.com>2018-09-19 14:31:29 -0700
committerLiam Middlebrook <lmiddlebrook@nvidia.com>2018-09-19 14:31:29 -0700
commit3061600e99d0b2ce72209bcdcd249810d4fc082f (patch)
treebbdcf40fb7348a49b666cbd4196a6b9de09deab1
parentd6223ed1aec453a7c041adbeefa35171deab7adb (diff)
410.57
-rw-r--r--doc/Makefile1
-rw-r--r--doc/nvidia-settings.1.m42
-rw-r--r--doc/version.mk2
-rw-r--r--samples/version.mk2
-rw-r--r--src/Makefile9
-rw-r--r--src/XF86Config-parser/Generate.c19
-rw-r--r--src/XF86Config-parser/xf86Parser.h1
-rw-r--r--src/command-line.c4
-rw-r--r--src/common-utils/common-utils.h2
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig-utils.c6
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.c21
-rw-r--r--src/gtk+-2.x/ctkdisplayconfig.h1
-rw-r--r--src/gtk+-2.x/ctkdisplaylayout.h1
-rw-r--r--src/gtk+-2.x/ctkevent.c3
-rw-r--r--src/gtk+-2.x/ctkopengl.c85
-rw-r--r--src/gtk+-2.x/ctkopengl.h1
-rw-r--r--src/gtk+-2.x/ctkwindow.c6
-rw-r--r--src/gtk+-2.x/ctkwindow.h2
-rw-r--r--src/libXNVCtrl/Makefile6
-rw-r--r--src/libXNVCtrl/NVCtrl.h12
-rw-r--r--src/libXNVCtrl/utils.mk35
-rw-r--r--src/libXNVCtrl/version.mk2
-rw-r--r--src/parse.c5
-rw-r--r--src/version.h2
-rw-r--r--src/version.mk2
-rw-r--r--utils.mk35
-rw-r--r--version.mk2
27 files changed, 167 insertions, 102 deletions
diff --git a/doc/Makefile b/doc/Makefile
index a511322..618f6b8 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -109,7 +109,6 @@ $(MANPAGE_not_gzipped): nvidia-settings.1.m4 $(OPTIONS_1_INC) $(VERSION_MK)
-D__HEADER__=$(AUTO_TEXT) \
-D__BUILD_OS__=$(TARGET_OS) \
-D__VERSION__=$(NVIDIA_VERSION) \
- -D__DATE__="`$(DATE) +%F`" \
-I $(OUTPUTDIR) \
$< > $@
diff --git a/doc/nvidia-settings.1.m4 b/doc/nvidia-settings.1.m4
index 917a48b..b8c35c9 100644
--- a/doc/nvidia-settings.1.m4
+++ b/doc/nvidia-settings.1.m4
@@ -10,7 +10,7 @@ __HEADER__
\\$2 \(la \\$1 \(ra\\$3
..
.if \n[.g] .mso www.tmac
-.TH nvidia\-settings 1 "__DATE__" "nvidia\-settings __VERSION__"
+.TH nvidia\-settings 1 "2018-03-20" "nvidia\-settings __VERSION__"
.SH NAME
nvidia\-settings \- configure the NVIDIA graphics driver
.SH SYNOPSIS
diff --git a/doc/version.mk b/doc/version.mk
index fa110cd..37ee6b6 100644
--- a/doc/version.mk
+++ b/doc/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 396.54
+NVIDIA_VERSION = 410.57
diff --git a/samples/version.mk b/samples/version.mk
index fa110cd..37ee6b6 100644
--- a/samples/version.mk
+++ b/samples/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 396.54
+NVIDIA_VERSION = 410.57
diff --git a/src/Makefile b/src/Makefile
index af7d209..5f42aff 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -124,8 +124,6 @@ VIRTUAL_RESOLUTIONS_DIR ?= $(COMMON_UNIX_DIR)/virtual-resolutions
NVIDIA_SETTINGS = $(OUTPUTDIR)/nvidia-settings
-NVIDIA_SETTINGS_PROGRAM_NAME = "nvidia-settings"
-
NVIDIA_SETTINGS_VERSION := $(NVIDIA_VERSION)
GTK2LIB_NAME = libnvidia-gtk2.so
@@ -212,8 +210,6 @@ SRC += $(addprefix $(COMMON_UTILS_DIR)/,$(COMMON_UTILS_SRC))
include $(VIRTUAL_RESOLUTIONS_DIR)/src.mk
SRC += $(addprefix $(VIRTUAL_RESOLUTIONS_DIR)/,$(VIRTUAL_RESOLUTIONS_SRC))
-SRC += $(STAMP_C)
-
OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
XCP_OBJS = $(call BUILD_OBJECT_LIST,$(XCP_SRC))
@@ -312,9 +308,6 @@ endif
$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
$(foreach src,$(XCP_SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
-# define the rule to generate $(STAMP_C)
-$(eval $(call DEFINE_STAMP_C_RULE, $(OBJS),$(NVIDIA_SETTINGS_PROGRAM_NAME)))
-
# define the rule to build $(XNVCTRL_ARCHIVE)
$(XNVCTRL_ARCHIVE): build-xnvctrl
@@ -322,7 +315,7 @@ build-xnvctrl:
@$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE)
clean clobber:
- rm -rf $(NVIDIA_SETTINGS) *~ $(STAMP_C) \
+ rm -rf $(NVIDIA_SETTINGS) *~ \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d \
$(GTK2LIB) $(GTK3LIB) $(GTK2LIB_DIR) $(GTK3LIB_DIR) \
$(IMAGE_HEADERS)
diff --git a/src/XF86Config-parser/Generate.c b/src/XF86Config-parser/Generate.c
index 9e1db27..b3b84c7 100644
--- a/src/XF86Config-parser/Generate.c
+++ b/src/XF86Config-parser/Generate.c
@@ -1319,7 +1319,8 @@ static int get_xserver_information(const char *versionString,
int *isXorg,
int *autoloadsGLX,
int *supportsExtensionSection,
- int *xineramaPlusCompositeWorks)
+ int *xineramaPlusCompositeWorks,
+ const char **compositeExtensionName)
{
#define XSERVER_VERSION_FORMAT_1 "X Window System Version"
#define XSERVER_VERSION_FORMAT_2 "X.Org X Server"
@@ -1397,6 +1398,18 @@ static int get_xserver_information(const char *versionString,
} else {
*xineramaPlusCompositeWorks = TRUE;
}
+
+ /*
+ * With X.Org xserver version 1.20, the name of the composite
+ * extension was changed from "Composite" to "COMPOSITE". As of
+ * that release extension names are case-sensitive so we must
+ * ensure the correct case is used.
+ */
+ if (major == 1 && minor >= 20) {
+ *compositeExtensionName = "COMPOSITE";
+ } else {
+ *compositeExtensionName = "Composite";
+ }
return TRUE;
@@ -1434,6 +1447,7 @@ void xconfigGetXServerInUse(GenerateOptions *gop)
gop->supports_extension_section = FALSE;
gop->autoloads_glx = FALSE;
gop->xinerama_plus_composite_works = FALSE;
+ gop->compositeExtensionName = NULL;
/* run `X -version` with a PATH that hopefully includes the X binary */
@@ -1463,7 +1477,8 @@ void xconfigGetXServerInUse(GenerateOptions *gop)
&isXorg,
&gop->autoloads_glx,
&gop->supports_extension_section,
- &gop->xinerama_plus_composite_works);
+ &gop->xinerama_plus_composite_works,
+ &gop->compositeExtensionName);
if (found) {
if (isXorg) {
diff --git a/src/XF86Config-parser/xf86Parser.h b/src/XF86Config-parser/xf86Parser.h
index 89c1569..131876e 100644
--- a/src/XF86Config-parser/xf86Parser.h
+++ b/src/XF86Config-parser/xf86Parser.h
@@ -625,6 +625,7 @@ typedef struct {
int supports_extension_section;
int autoloads_glx;
int xinerama_plus_composite_works;
+ const char *compositeExtensionName;
} GenerateOptions;
diff --git a/src/command-line.c b/src/command-line.c
index 6eb6bb1..c81f388 100644
--- a/src/command-line.c
+++ b/src/command-line.c
@@ -45,12 +45,10 @@ static void print_help(void);
* print_version() - print version information
*/
-extern const char *pNV_ID;
-
static void print_version(void)
{
nv_msg(NULL, "");
- nv_msg(NULL, "%s", pNV_ID);
+ nv_msg(NULL, NV_ID_STRING);
nv_msg(TAB, "The NVIDIA X Server Settings tool.");
nv_msg(NULL, "");
nv_msg(TAB, "This program is used to configure the "
diff --git a/src/common-utils/common-utils.h b/src/common-utils/common-utils.h
index 6ef1d06..7d51910 100644
--- a/src/common-utils/common-utils.h
+++ b/src/common-utils/common-utils.h
@@ -132,4 +132,6 @@ typedef enum {
NV_OPTIONAL_BOOL_TRUE = TRUE
} NVOptionalBool;
+#define NV_ID_STRING PROGRAM_NAME ": version " NVIDIA_VERSION
+
#endif /* __COMMON_UTILS_H__ */
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index 40c9c7c..eed9154 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -3340,6 +3340,8 @@ nvPrimeDisplayPtr add_prime_display_from_server(nvScreenPtr screen,
prime->screen_num = atoi(value);
} else if (!strcmp(tok, "name")) {
prime->label = g_strdup(value);
+ } else if (!strcmp(tok, "sync")) {
+ prime->sync = (0 == strcmp(value, "1"));
}
}
tok = strtok(NULL, ",");
@@ -4136,8 +4138,6 @@ nvDisplayPtr layout_get_display(const nvLayoutPtr layout,
* Code adapted from nvidia-xconfig
*/
-extern const char *pNV_ID;
-
static void update_banner(XConfigPtr config)
{
static const char *banner =
@@ -4178,7 +4178,7 @@ static void update_banner(XConfigPtr config)
/* add our prefix lines at the start of the comment */
config->comment = g_strconcat(prefix, banner,
- "# ", pNV_ID, "\n",
+ "# " NV_ID_STRING "\n",
(s ? s : ""),
NULL);
if (s) g_free(s);
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c
index 3a9450d..0af47f7 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.c
+++ b/src/gtk+-2.x/ctkdisplayconfig.c
@@ -2250,6 +2250,17 @@ GtkWidget* ctk_display_config_new(CtrlTarget *ctrl_target,
FALSE, FALSE, 5);
ctk_object->box_prime_display_name = hbox;
+ hbox = gtk_hbox_new(FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
+
+ label = gtk_label_new("Synchronization:");
+ labels = g_slist_append(labels, label);
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
+ ctk_object->lbl_prime_display_sync = gtk_label_new("");
+ gtk_box_pack_start(GTK_BOX(hbox),
+ ctk_object->lbl_prime_display_sync,
+ FALSE, FALSE, 5);
+
g_object_ref(ctk_object->prime_display_page);
gtk_widget_show_all(ctk_object->prime_display_page);
}
@@ -4515,6 +4526,9 @@ static void setup_prime_display_page(CtkDisplayConfig *ctk_object)
gtk_widget_hide(ctk_object->box_prime_display_name);
}
+ gtk_label_set_text(GTK_LABEL(ctk_object->lbl_prime_display_sync),
+ prime->sync ? "On" : "Off");
+
gtk_widget_set_sensitive(ctk_object->prime_display_page, True);
}
@@ -9186,9 +9200,12 @@ static int generateXConfig(CtkDisplayConfig *ctk_object, XConfigPtr *pConfig)
if (!config->extensions) {
config->extensions = nvalloc(sizeof(XConfigExtensionsRec));
}
- xconfigRemoveNamedOption(&(config->extensions->options), "Composite",
+ xconfigRemoveNamedOption(&(config->extensions->options),
+ go.compositeExtensionName,
NULL);
- xconfigAddNewOption(&config->extensions->options, "Composite", "Disable");
+ xconfigAddNewOption(&config->extensions->options,
+ go.compositeExtensionName,
+ "Disable");
nvfree(composite_disabled_str);
}
}
diff --git a/src/gtk+-2.x/ctkdisplayconfig.h b/src/gtk+-2.x/ctkdisplayconfig.h
index 94d4f75..fdc299d 100644
--- a/src/gtk+-2.x/ctkdisplayconfig.h
+++ b/src/gtk+-2.x/ctkdisplayconfig.h
@@ -199,6 +199,7 @@ typedef struct _CtkDisplayConfig
GtkWidget *lbl_prime_display_view;
GtkWidget *lbl_prime_display_name;
+ GtkWidget *lbl_prime_display_sync;
GtkWidget *box_prime_display_name;
diff --git a/src/gtk+-2.x/ctkdisplaylayout.h b/src/gtk+-2.x/ctkdisplaylayout.h
index 0dd6e89..f36c7ab 100644
--- a/src/gtk+-2.x/ctkdisplaylayout.h
+++ b/src/gtk+-2.x/ctkdisplaylayout.h
@@ -303,6 +303,7 @@ typedef struct nvPrimeDisplayRec {
GdkRectangle rect;
char *label;
int screen_num;
+ Bool sync;
} nvPrimeDisplay, *nvPrimeDisplayPtr;
diff --git a/src/gtk+-2.x/ctkevent.c b/src/gtk+-2.x/ctkevent.c
index ec3c0f2..69387b1 100644
--- a/src/gtk+-2.x/ctkevent.c
+++ b/src/gtk+-2.x/ctkevent.c
@@ -346,6 +346,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
MAKE_SIGNAL(NV_CTRL_DISPLAYPORT_CONNECTOR_TYPE);
MAKE_SIGNAL(NV_CTRL_DISPLAYPORT_IS_MULTISTREAM);
MAKE_SIGNAL(NV_CTRL_DISPLAYPORT_SINK_IS_AUDIO_CAPABLE);
+ MAKE_SIGNAL(NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR);
#undef MAKE_SIGNAL
/*
@@ -355,7 +356,7 @@ static void ctk_event_class_init(CtkEventClass *ctk_event_class)
* knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_FRAMELOCK_FIRMWARE_MINOR_VERSION
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR
#warning "There are attributes that do not emit signals!"
#endif
diff --git a/src/gtk+-2.x/ctkopengl.c b/src/gtk+-2.x/ctkopengl.c
index eb71e29..c8836ce 100644
--- a/src/gtk+-2.x/ctkopengl.c
+++ b/src/gtk+-2.x/ctkopengl.c
@@ -48,6 +48,8 @@ static void post_show_sli_visual_indicator_button_toggled(CtkOpenGL *,
static void post_show_multigpu_visual_indicator_button_toggled(CtkOpenGL *,
gboolean);
+static void post_show_graphics_visual_indicator_button_toggled(CtkOpenGL *,
+ gboolean);
static void post_xinerama_stereo_button_toggled(CtkOpenGL *, gboolean);
static void post_stereo_eyes_exchange_button_toggled(CtkOpenGL *, gboolean);
@@ -76,6 +78,8 @@ static void show_sli_visual_indicator_button_toggled (GtkWidget *, gpointer);
static void show_multigpu_visual_indicator_button_toggled (GtkWidget *, gpointer);
+static void show_graphics_visual_indicator_button_toggled (GtkWidget *, gpointer);
+
static void value_changed (GObject *, CtrlEvent *, gpointer);
static const gchar *get_image_settings_string(gint val);
@@ -182,6 +186,14 @@ static const char *__show_multigpu_visual_indicator_help =
"applications that are started after this option is "
"set.";
+static const char *__show_graphics_visual_indicator_help =
+"Enabling this option causes the driver to draw "
+"information about the graphics API in use, such as "
+"instant framerate, vsync status, and whether the "
+"application is blitting or flipping. "
+"This option is applied to applications that are "
+"started after this option is set.";
+
static const char *__stereo_eyes_exchange_help =
"Enabling this option causes OpenGL to draw the left "
"eye image in the right eye and vice versa for stereo "
@@ -214,6 +226,7 @@ static const char *__show_gsync_visual_indicator_help =
#define __ALLOW_GSYNC (1 << 13)
#define __SHOW_GSYNC_VISUAL_INDICATOR (1 << 14)
#define __STEREO_SWAP_MODE (1 << 15)
+#define __SHOW_GRAPHICS_VISUAL_INDICATOR (1 << 16)
@@ -297,6 +310,7 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
gint use_conformant_clamping = 0;
gint show_sli_visual_indicator = 0;
gint show_multigpu_visual_indicator = 0;
+ gint show_graphics_visual_indicator = 0;
ReturnStatus ret_sync_to_vblank;
ReturnStatus ret_flipping_allowed;
@@ -311,6 +325,7 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
ReturnStatus ret_use_conformant_clamping;
ReturnStatus ret_show_sli_visual_indicator;
ReturnStatus ret_show_multigpu_visual_indicator;
+ ReturnStatus ret_show_graphics_visual_indicator;
/* Query OpenGL settings */
@@ -387,6 +402,11 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
NV_CTRL_SHOW_MULTIGPU_VISUAL_INDICATOR,
&show_multigpu_visual_indicator);
+ ret_show_graphics_visual_indicator =
+ NvCtrlGetAttribute(ctrl_target,
+ NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR,
+ &show_graphics_visual_indicator);
+
/* There are no OpenGL settings to change (OpenGL disabled?) */
if ((ret_sync_to_vblank != NvCtrlSuccess) &&
(ret_flipping_allowed != NvCtrlSuccess) &&
@@ -400,7 +420,8 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
(ret_aa_line_gamma != NvCtrlSuccess) &&
(ret_use_conformant_clamping != NvCtrlSuccess) &&
(ret_show_sli_visual_indicator != NvCtrlSuccess) &&
- (ret_show_multigpu_visual_indicator != NvCtrlSuccess)) {
+ (ret_show_multigpu_visual_indicator != NvCtrlSuccess) &&
+ (ret_show_graphics_visual_indicator != NvCtrlSuccess)) {
return NULL;
}
@@ -867,6 +888,34 @@ GtkWidget* ctk_opengl_new(CtrlTarget *ctrl_target,
ctk_opengl->show_multigpu_visual_indicator_button = check_button;
}
+ if (ret_show_graphics_visual_indicator == NvCtrlSuccess) {
+
+ label = gtk_label_new("Enable Graphics API Visual Indicator");
+
+ check_button = gtk_check_button_new();
+ gtk_container_add(GTK_CONTAINER(check_button), label);
+
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check_button),
+ show_graphics_visual_indicator);
+
+ gtk_box_pack_start(GTK_BOX(vbox), check_button, FALSE, FALSE, 0);
+
+ g_signal_connect(G_OBJECT(check_button), "toggled",
+ G_CALLBACK(show_graphics_visual_indicator_button_toggled),
+ (gpointer) ctk_opengl);
+
+ g_signal_connect(G_OBJECT(ctk_event),
+ CTK_EVENT_NAME(NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR),
+ G_CALLBACK(value_changed), (gpointer) ctk_opengl);
+
+ ctk_config_set_tooltip(ctk_config, check_button,
+ __show_graphics_visual_indicator_help);
+
+ ctk_opengl->active_attributes |= __SHOW_GRAPHICS_VISUAL_INDICATOR;
+
+ ctk_opengl->show_graphics_visual_indicator_button = check_button;
+ }
+
gtk_widget_show_all(GTK_WIDGET(object));
/*
@@ -943,6 +992,15 @@ post_show_multigpu_visual_indicator_button_toggled(CtkOpenGL *ctk_opengl,
enabled ? "enabled" : "disabled");
}
+static void
+post_show_graphics_visual_indicator_button_toggled(CtkOpenGL *ctk_opengl,
+ gboolean enabled)
+{
+ ctk_config_statusbar_message(ctk_opengl->ctk_config,
+ "Graphics API Visual Indicator %s.",
+ enabled ? "enabled" : "disabled");
+}
+
static void post_xinerama_stereo_button_toggled(CtkOpenGL *ctk_opengl,
gboolean enabled)
{
@@ -1073,6 +1131,20 @@ static void show_multigpu_visual_indicator_button_toggled(GtkWidget *widget,
post_show_multigpu_visual_indicator_button_toggled(ctk_opengl, enabled);
}
+static void show_graphics_visual_indicator_button_toggled(GtkWidget *widget,
+ gpointer user_data)
+{
+ CtkOpenGL *ctk_opengl = CTK_OPENGL(user_data);
+ CtrlTarget *ctrl_target = ctk_opengl->ctrl_target;
+ gboolean enabled;
+
+ enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+
+ NvCtrlSetAttribute(ctrl_target,
+ NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR, enabled);
+ post_show_graphics_visual_indicator_button_toggled(ctk_opengl, enabled);
+}
+
static void xinerama_stereo_button_toggled(GtkWidget *widget,
gpointer user_data)
{
@@ -1219,6 +1291,12 @@ static void value_changed(GObject *object, CtrlEvent *event, gpointer user_data)
func = G_CALLBACK(show_multigpu_visual_indicator_button_toggled);
post_show_multigpu_visual_indicator_button_toggled(ctk_opengl, value);
break;
+ case NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR:
+ button =
+ GTK_TOGGLE_BUTTON(ctk_opengl->show_graphics_visual_indicator_button);
+ func = G_CALLBACK(show_graphics_visual_indicator_button_toggled);
+ post_show_graphics_visual_indicator_button_toggled(ctk_opengl, value);
+ break;
default:
return;
}
@@ -1873,6 +1951,11 @@ GtkTextBuffer *ctk_opengl_create_help(GtkTextTagTable *table,
"multi-GPU AA and single-GPU AA modes.");
}
+ if (ctk_opengl->active_attributes & __SHOW_GRAPHICS_VISUAL_INDICATOR) {
+ ctk_help_heading(b, &i, "Graphics API Visual Indicator");
+ ctk_help_para(b, &i, "%s", __show_graphics_visual_indicator_help);
+ }
+
ctk_help_finish(b);
return b;
diff --git a/src/gtk+-2.x/ctkopengl.h b/src/gtk+-2.x/ctkopengl.h
index 63ab4f3..dc2528e 100644
--- a/src/gtk+-2.x/ctkopengl.h
+++ b/src/gtk+-2.x/ctkopengl.h
@@ -68,6 +68,7 @@ struct _CtkOpenGL
GtkWidget *aa_line_gamma_scale;
GtkWidget *show_sli_visual_indicator_button;
GtkWidget *show_multigpu_visual_indicator_button;
+ GtkWidget *show_graphics_visual_indicator_button;
gint *stereo_swap_mode_table;
gint stereo_swap_mode_table_size;
diff --git a/src/gtk+-2.x/ctkwindow.c b/src/gtk+-2.x/ctkwindow.c
index 85cbe98..d7fdaa7 100644
--- a/src/gtk+-2.x/ctkwindow.c
+++ b/src/gtk+-2.x/ctkwindow.c
@@ -627,6 +627,7 @@ GtkWidget *ctk_window_new(ParsedAttribute *p, ConfigProperties *conf,
child = ctk_display_config_new(server_target, ctk_config);
if (child) {
+ ctk_window->display_config_widget = child;
add_page(child,
ctk_display_config_create_help(tag_table,
CTK_DISPLAY_CONFIG(child)),
@@ -1358,6 +1359,11 @@ static void save_settings_and_exit(CtkWindow *ctk_window)
}
#endif
+ if (ctk_window->display_config_widget) {
+ CtkDisplayConfig *display_config =
+ CTK_DISPLAY_CONFIG(ctk_window->display_config_widget);
+ layout_free(display_config->layout);
+ }
add_special_config_file_attributes(ctk_window);
gtk_main_quit();
diff --git a/src/gtk+-2.x/ctkwindow.h b/src/gtk+-2.x/ctkwindow.h
index 883bece..caf93ab 100644
--- a/src/gtk+-2.x/ctkwindow.h
+++ b/src/gtk+-2.x/ctkwindow.h
@@ -78,6 +78,8 @@ struct _CtkWindow
GtkTextTagTable *help_tag_table;
GtkTextBuffer *help_text_buffer;
+
+ GtkWidget *display_config_widget;
};
struct _CtkWindowClass
diff --git a/src/libXNVCtrl/Makefile b/src/libXNVCtrl/Makefile
index e4357fd..6942c3e 100644
--- a/src/libXNVCtrl/Makefile
+++ b/src/libXNVCtrl/Makefile
@@ -46,7 +46,6 @@ CFLAGS += -I $(OUTPUTDIR)
CFLAGS += -DPROGRAM_NAME=\"$(LIBXNVCTRL_PROGRAM_NAME)\"
SRC += NVCtrl.c
-SRC += $(STAMP_C)
OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
@@ -65,9 +64,6 @@ $(LIBXNVCTRL) : $(OBJS)
# define the rule to build each object file
$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
-# define the rule to generate $(STAMP_C)
-$(eval $(call DEFINE_STAMP_C_RULE, $(OBJS),$(LIBXNVCTRL_PROGRAM_NAME)))
-
clean:
- rm -rf $(LIBXNVCTRL) *~ $(STAMP_C) \
+ rm -rf $(LIBXNVCTRL) *~ \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h
index f1b8ea7..3f3e3c6 100644
--- a/src/libXNVCtrl/NVCtrl.h
+++ b/src/libXNVCtrl/NVCtrl.h
@@ -3520,7 +3520,17 @@
#define NV_CTRL_FRAMELOCK_FIRMWARE_MINOR_VERSION 427 /* R--F */
-#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_FRAMELOCK_FIRMWARE_MINOR_VERSION
+/*
+ * NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR - when TRUE, graphics APIs will
+ * indicate various runtime information such as flip/blit, vsync status, API
+ * in use.
+ */
+
+#define NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR 428 /* RW-X */
+#define NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR_FALSE 0
+#define NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR_TRUE 1
+
+#define NV_CTRL_LAST_ATTRIBUTE NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR
/**************************************************************************/
diff --git a/src/libXNVCtrl/utils.mk b/src/libXNVCtrl/utils.mk
index 66dbb16..8218e0c 100644
--- a/src/libXNVCtrl/utils.mk
+++ b/src/libXNVCtrl/utils.mk
@@ -74,9 +74,7 @@ PRINTF ?= printf
MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
-WHOAMI ?= whoami
HARDLINK ?= ln -f
-HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
CHMOD ?= chmod
@@ -214,6 +212,8 @@ ifndef NVIDIA_VERSION
$(error NVIDIA_VERSION undefined)
endif
+CFLAGS += -DNVIDIA_VERSION=\"$(NVIDIA_VERSION)\"
+
##############################################################################
# Several of the functions below take an argument that indicates if
@@ -425,37 +425,6 @@ define DEBUG_INFO_RULES
endef
##############################################################################
-# STAMP_C - this is a source file that is generated during the build
-# to capture information about the build environment for the utility.
-#
-# The DEFINE_STAMP_C_RULE function is used to define the rule for
-# generating STAMP_C. First argument is a list of dependencies for
-# STAMP_C (g_stamp.o is filtered out of the list); second argument is
-# the name of the program being built.
-#
-# The includer of utils.mk should add $(STAMP_C) to its list of source
-# files
-##############################################################################
-
-STAMP_C = $(OUTPUTDIR)/g_stamp.c
-
-define DEFINE_STAMP_C_RULE
-
- $$(STAMP_C): $$(filter-out \
- $$(call BUILD_OBJECT_LIST,$$(STAMP_C)),$(1)) \
- $$(VERSION_MK)
- @ $$(RM) $$@
- @ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@
- @ $$(PRINTF) "%s" "$(2): " >> $$@
- @ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
- @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
- @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
- @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@
- @ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
-
-endef
-
-##############################################################################
# Define rules that can be used for embedding a file into an ELF object that
# contains the raw contents of that file and symbols pointing to the embedded
# data.
diff --git a/src/libXNVCtrl/version.mk b/src/libXNVCtrl/version.mk
index fa110cd..37ee6b6 100644
--- a/src/libXNVCtrl/version.mk
+++ b/src/libXNVCtrl/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 396.54
+NVIDIA_VERSION = 410.57
diff --git a/src/parse.c b/src/parse.c
index 712ceb3..4df8024 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -103,7 +103,7 @@ const AttributeTableEntry attributeTable[] = {
{ "ScreenPosition", NV_CTRL_STRING_SCREEN_RECTANGLE, STR_ATTR, {0,0,0,0,1,0}, {}, "Returns the physical X Screen's initial position and size (in absolute coordinates) within the desktop as the \"token=value \" string: \"x=#, y=#, width=#, height=#\"." },
{ "AddMetaMode", NV_CTRL_STRING_OPERATION_ADD_METAMODE, SOP_ATTR, {0,0,0,0,1,1}, {}, "Adds the given MetaMode to the X screen." },
{ "ParseMetaMode", NV_CTRL_STRING_OPERATION_ADD_METAMODE, SOP_ATTR, {0,0,0,0,1,1}, {}, "Parses and validates a given MetaMode." },
- { "PrimeOutputsData", NV_CTRL_STRING_PRIME_OUTPUTS_DATA , STR_ATTR, {0,0,0,0,1,1}, {}, "Lists configured PRIME displays' configuration information." },
+ { "PrimeOutputsData", NV_CTRL_STRING_PRIME_OUTPUTS_DATA , STR_ATTR, {0,0,0,0,1,0}, {}, "Lists configured PRIME displays' configuration information." },
/* OpenGL */
{ "SyncToVBlank", NV_CTRL_SYNC_TO_VBLANK, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables sync to vertical blanking for OpenGL clients. This setting only takes effect on OpenGL clients started after it is set." },
@@ -131,6 +131,7 @@ const AttributeTableEntry attributeTable[] = {
{ "AllowGSYNC", NV_CTRL_GSYNC_ALLOWED, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Enables or disables the use of G-SYNC when available." },
{ "ShowGSYNCVisualIndicator", NV_CTRL_SHOW_GSYNC_VISUAL_INDICATOR, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If this is enabled (1), the driver will draw an indicator showing whether G-SYNC is in use, when an application is swapping using flipping." },
{ "StereoSwapMode", NV_CTRL_STEREO_SWAP_MODE, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Controls the swap mode when Quad-Buffered stereo is used." },
+ { "ShowGraphicsVisualIndicator", NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR, INT_ATTR, {0,0,0,0,0,0}, { .int_flags = {0,0,0,0,0,0,0} }, "If this is enabled (1), the driver will draw information about the graphics API in use into a \"visual indicator\" inside application windows. This setting only takes effect on clients started after it is set." },
/* GPU */
{ "BusType", NV_CTRL_BUS_TYPE, INT_ATTR, {0,0,0,0,1,0}, { .int_flags = {0,0,0,0,0,0,0} }, "Returns the type of bus connecting the specified device to the computer. If the target is an X screen, then it uses the GPU driving the X screen as the device." },
@@ -391,7 +392,7 @@ const int attributeTableLen = ARRAY_LEN(attributeTable);
* the last attribute that the table knows about.
*/
-#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_FRAMELOCK_FIRMWARE_MINOR_VERSION
+#if NV_CTRL_LAST_ATTRIBUTE != NV_CTRL_SHOW_GRAPHICS_VISUAL_INDICATOR
#warning "Have you forgotten to add a new integer attribute to attributeTable?"
#endif
diff --git a/src/version.h b/src/version.h
index 1708f8c..29693a7 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define NVIDIA_VERSION "396.54"
+#define NVIDIA_VERSION "410.57"
diff --git a/src/version.mk b/src/version.mk
index fa110cd..37ee6b6 100644
--- a/src/version.mk
+++ b/src/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 396.54
+NVIDIA_VERSION = 410.57
diff --git a/utils.mk b/utils.mk
index 66dbb16..8218e0c 100644
--- a/utils.mk
+++ b/utils.mk
@@ -74,9 +74,7 @@ PRINTF ?= printf
MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
-WHOAMI ?= whoami
HARDLINK ?= ln -f
-HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
CHMOD ?= chmod
@@ -214,6 +212,8 @@ ifndef NVIDIA_VERSION
$(error NVIDIA_VERSION undefined)
endif
+CFLAGS += -DNVIDIA_VERSION=\"$(NVIDIA_VERSION)\"
+
##############################################################################
# Several of the functions below take an argument that indicates if
@@ -425,37 +425,6 @@ define DEBUG_INFO_RULES
endef
##############################################################################
-# STAMP_C - this is a source file that is generated during the build
-# to capture information about the build environment for the utility.
-#
-# The DEFINE_STAMP_C_RULE function is used to define the rule for
-# generating STAMP_C. First argument is a list of dependencies for
-# STAMP_C (g_stamp.o is filtered out of the list); second argument is
-# the name of the program being built.
-#
-# The includer of utils.mk should add $(STAMP_C) to its list of source
-# files
-##############################################################################
-
-STAMP_C = $(OUTPUTDIR)/g_stamp.c
-
-define DEFINE_STAMP_C_RULE
-
- $$(STAMP_C): $$(filter-out \
- $$(call BUILD_OBJECT_LIST,$$(STAMP_C)),$(1)) \
- $$(VERSION_MK)
- @ $$(RM) $$@
- @ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@
- @ $$(PRINTF) "%s" "$(2): " >> $$@
- @ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
- @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
- @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
- @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@
- @ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
-
-endef
-
-##############################################################################
# Define rules that can be used for embedding a file into an ELF object that
# contains the raw contents of that file and symbols pointing to the embedded
# data.
diff --git a/version.mk b/version.mk
index fa110cd..37ee6b6 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 396.54
+NVIDIA_VERSION = 410.57