diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2008-02-12 21:28:58 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2008-02-12 21:28:58 -0800 |
commit | 818140c39f7818755070e3b853956b818c842f2e (patch) | |
tree | 125f0cc6407d6bfcdfa6c804bcecf69829117682 | |
parent | 7b431be3d35cd1e1864ba8e09730498b9dc25a82 (diff) |
1.0-97551.0-9755
-rw-r--r-- | src/gtk+-2.x/ctkdisplayconfig.c | 20 | ||||
-rw-r--r-- | src/gtk+-2.x/ctkdisplaydevice-dfp.c | 2 | ||||
-rw-r--r-- | src/gtk+-2.x/ctkmultisample.c | 34 | ||||
-rw-r--r-- | src/libXNVCtrl/NVCtrl.h | 6 | ||||
-rw-r--r-- | src/libXNVCtrl/libXNVCtrl.a | bin | 17180 -> 17180 bytes | |||
-rw-r--r-- | src/query-assign.c | 44 |
6 files changed, 86 insertions, 20 deletions
diff --git a/src/gtk+-2.x/ctkdisplayconfig.c b/src/gtk+-2.x/ctkdisplayconfig.c index 18cb851..17efc31 100644 --- a/src/gtk+-2.x/ctkdisplayconfig.c +++ b/src/gtk+-2.x/ctkdisplayconfig.c @@ -1370,6 +1370,8 @@ static int generate_xconf_metamode_str(CtkDisplayConfig *ctk_object, int metamode_idx; nvMetaModePtr metamode; int len = 0; + int start_width; + int start_height; int vendrel = NvCtrlGetVendorRelease(ctk_object->handle); char *vendstr = NvCtrlGetServerVendor(ctk_object->handle); @@ -1398,6 +1400,11 @@ static int generate_xconf_metamode_str(CtkDisplayConfig *ctk_object, metamode_strs = get_screen_metamode_str(screen, screen->cur_metamode_idx, 1); len = strlen(metamode_strs); + start_width = screen->cur_metamode->edim[W]; + start_height = screen->cur_metamode->edim[H]; + } else { + start_width = screen->metamodes->edim[W]; + start_height = screen->metamodes->edim[H]; } for (metamode_idx = 0, metamode = screen->metamodes; @@ -1414,6 +1421,17 @@ static int generate_xconf_metamode_str(CtkDisplayConfig *ctk_object, (metamode_idx == screen->cur_metamode_idx)) continue; + /* XXX In basic mode, only write out metamodes that are smaller than + * the starting (selected) metamode. This is to work around + * a bug in XRandR where starting with a root window that is + * smaller that the bounding box of all the metamodes will result + * in an unwanted panning domain being setup for the first mode. + */ + if ((!ctk_object->advanced_mode) && + ((metamode->edim[W] > start_width) || + (metamode->edim[H] > start_height))) + continue; + metamode_str = get_screen_metamode_str(screen, metamode_idx, 1); if (!metamode_str) continue; @@ -7893,7 +7911,7 @@ static void preprocess_metamodes(nvScreenPtr screen, char *metamode_strs) metamode; metamode = metamode->next, metamode_idx++) { - /* Generate the metamore's string */ + /* Generate the metamode's string */ free(metamode->string); metamode->string = get_screen_metamode_str(screen, metamode_idx, 0); if (!metamode->string) continue; diff --git a/src/gtk+-2.x/ctkdisplaydevice-dfp.c b/src/gtk+-2.x/ctkdisplaydevice-dfp.c index f5ec919..01a3d7b 100644 --- a/src/gtk+-2.x/ctkdisplaydevice-dfp.c +++ b/src/gtk+-2.x/ctkdisplaydevice-dfp.c @@ -421,7 +421,7 @@ GtkWidget* ctk_display_device_dfp_new(NvCtrlAttributeHandle *handle, (gpointer) ctk_display_device_dfp); radio0 = make_scaling_radio_button - (ctk_display_device_dfp, vbox, NULL, "Streched", + (ctk_display_device_dfp, vbox, NULL, "Stretched", NV_CTRL_GPU_SCALING_METHOD_STRETCHED); radio1 = make_scaling_radio_button diff --git a/src/gtk+-2.x/ctkmultisample.c b/src/gtk+-2.x/ctkmultisample.c index 5bd7b91..d2cb367 100644 --- a/src/gtk+-2.x/ctkmultisample.c +++ b/src/gtk+-2.x/ctkmultisample.c @@ -154,6 +154,7 @@ static const char *__texture_sharpening_help = #define __FSAA_8xQ (1 << (__FSAA + NV_CTRL_FSAA_MODE_8xQ)) #define __FSAA_16xS (1 << (__FSAA + NV_CTRL_FSAA_MODE_16xS)) #define __FSAA_16xQ (1 << (__FSAA + NV_CTRL_FSAA_MODE_16xQ)) +#define __FSAA_32xS (1 << (__FSAA + NV_CTRL_FSAA_MODE_32xS)) #define __FSAA_ENHANCE (1 << (__FSAA + NV_CTRL_FSAA_MODE_MAX +1)) #define FRAME_PADDING 5 @@ -629,7 +630,8 @@ static const gchar *get_multisample_mode_name(gint multisample_mode) "8xS", /* FSAA_MODE_8xS */ "8xQ", /* FSAA_MODE_8xQ */ "16xS", /* FSAA_MODE_16xS */ - "16xQ" /* FSAA_MODE_16xQ */ + "16xQ", /* FSAA_MODE_16xQ */ + "32xS" /* FSAA_MODE_32xS */ }; if ((multisample_mode < NV_CTRL_FSAA_MODE_NONE) || @@ -1324,7 +1326,7 @@ GtkTextBuffer *ctk_multisample_create_help(GtkTextTagTable *table, ctk_help_para(b, &i, "Enhance Application Settings will make " "applications that are requesting some type of " "antialiasing to use the mode selected by the " - "slider ."); + "slider."); } else { ctk_help_para(b, &i, __aa_override_app_help); } @@ -1407,6 +1409,34 @@ GtkTextBuffer *ctk_multisample_create_help(GtkTextTagTable *table, "mode. This mode offers better image quality than " "the 8x mode."); } + + if (ctk_multisample->active_attributes & __FSAA_8xQ) { + ctk_help_term(b, &i, "8xQ"); + ctk_help_para(b, &i, "This enables antialiasing using the 8xQ " + "mode. This mode offers better image quality than " + "the 8x mode."); + } + + if (ctk_multisample->active_attributes & __FSAA_16xS) { + ctk_help_term(b, &i, "16xS"); + ctk_help_para(b, &i, "This enables antialiasing using the 16xS " + "mode. This mode offers better image quality than " + "the 16x mode."); + } + + if (ctk_multisample->active_attributes & __FSAA_16xQ) { + ctk_help_term(b, &i, "16xQ"); + ctk_help_para(b, &i, "This enables antialiasing using the 16xQ " + "mode. This mode offers better image quality than " + "the 16x mode."); + } + + if (ctk_multisample->active_attributes & __FSAA_32xS) { + ctk_help_term(b, &i, "32xS"); + ctk_help_para(b, &i, "This enables antialiasing using the 32xS " + "mode. This mode offers better image quality than " + "the 16x mode."); + } } if (ctk_multisample->active_attributes & __LOG_ANISO_RANGE) { diff --git a/src/libXNVCtrl/NVCtrl.h b/src/libXNVCtrl/NVCtrl.h index c27c2a8..58fd564 100644 --- a/src/libXNVCtrl/NVCtrl.h +++ b/src/libXNVCtrl/NVCtrl.h @@ -233,7 +233,8 @@ #define NV_CTRL_FSAA_MODE_8xQ 10 #define NV_CTRL_FSAA_MODE_16xS 11 #define NV_CTRL_FSAA_MODE_16xQ 12 -#define NV_CTRL_FSAA_MODE_MAX NV_CTRL_FSAA_MODE_16xQ +#define NV_CTRL_FSAA_MODE_32xS 13 +#define NV_CTRL_FSAA_MODE_MAX NV_CTRL_FSAA_MODE_32xS /* @@ -623,9 +624,6 @@ * NV_CTRL_FLIPPING_ALLOWED - when TRUE, OpenGL will swap by flipping * when possible; when FALSE, OpenGL will alway swap by blitting. XXX * can this be enabled dynamically? - * - * This attribute will not be available when flipping is not possible, such - * as when the NoFlip X config file option is enabled. */ #define NV_CTRL_FLIPPING_ALLOWED 40 /* RW-X */ diff --git a/src/libXNVCtrl/libXNVCtrl.a b/src/libXNVCtrl/libXNVCtrl.a Binary files differindex 9596949..1aae24f 100644 --- a/src/libXNVCtrl/libXNVCtrl.a +++ b/src/libXNVCtrl/libXNVCtrl.a diff --git a/src/query-assign.c b/src/query-assign.c index 13e3ffd..93d9748 100644 --- a/src/query-assign.c +++ b/src/query-assign.c @@ -1280,10 +1280,18 @@ int nv_process_parsed_attribute(ParsedAttribute *a, CtrlHandles *h, (a->display_device_mask); tmp_d_str1 = display_device_mask_to_display_device_name(t->d); - nv_error_msg("Invalid display device %s specified " - "%s (the currently enabled display devices " - "are %s on %s).", - tmp_d_str0, whence, tmp_d_str1, t->name); + if (tmp_d_str1 && (*tmp_d_str1 != '\0')) { + nv_error_msg("Invalid display device %s specified " + "%s (the currently enabled display devices " + "are %s on %s).", + tmp_d_str0, whence, tmp_d_str1, t->name); + } else { + nv_error_msg("Invalid display device %s specified " + "%s (there are currently no enabled display " + "devices on %s).", + tmp_d_str0, whence, t->name); + } + free(tmp_d_str0); free(tmp_d_str1); @@ -1384,7 +1392,8 @@ int nv_process_parsed_attribute(ParsedAttribute *a, CtrlHandles *h, * * Also, when setting frame lock attributes on non-frame lock targets, * make sure frame lock is disabled. (Of course, don't check this for - * the "enable frame lock" attribute.) + * the "enable frame lock" attribute, and special case the "Test + * Signal" attribute.) */ if ((a->flags & NV_PARSER_TYPE_FRAMELOCK) && @@ -1409,7 +1418,7 @@ int nv_process_parsed_attribute(ParsedAttribute *a, CtrlHandles *h, continue; } - /* Don't assign if frame lock is enabled */ + /* Do assignments based on the frame lock sync status */ if (assign && (a->attr != NV_CTRL_FRAMELOCK_SYNC)) { int enabled; @@ -1424,8 +1433,16 @@ int nv_process_parsed_attribute(ParsedAttribute *a, CtrlHandles *h, NvCtrlAttributesStrError(status)); continue; } - - if (enabled != NV_CTRL_FRAMELOCK_SYNC_DISABLE) { + + if (a->attr == NV_CTRL_FRAMELOCK_TEST_SIGNAL) { + if (enabled != NV_CTRL_FRAMELOCK_SYNC_ENABLE) { + nv_error_msg("The attribute '%s' specified %s cannot " + "be assigned; frame lock sync is " + "currently disabled on %s.", + a->name, whence, t->name); + continue; + } + } else if (enabled != NV_CTRL_FRAMELOCK_SYNC_DISABLE) { nv_error_msg("The attribute '%s' specified %s cannot be " "assigned; frame lock sync is currently " "enabled on %s.", @@ -1442,7 +1459,8 @@ int nv_process_parsed_attribute(ParsedAttribute *a, CtrlHandles *h, mask = (1 << bit); if (((mask & display_devices) == 0x0) && - (targetTypeTable[target_type_index].uses_display_devices)) { + (targetTypeTable[target_type_index].uses_display_devices) && + (t->d)) { continue; } @@ -1480,12 +1498,14 @@ int nv_process_parsed_attribute(ParsedAttribute *a, CtrlHandles *h, /* * if this attribute is not per-display device, or this - * target does not know about display devices, then once - * through this loop is enough. + * target does not know about display devices, or this target + * does not have display devices, then once through this loop + * is enough. */ if ((!(valid.permissions & ATTRIBUTE_TYPE_DISPLAY)) || - (!(targetTypeTable[target_type_index].uses_display_devices))) { + (!(targetTypeTable[target_type_index].uses_display_devices)) || + (!(t->d))) { break; } |