aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-11-18 23:03:38 -0700
committerMcCabe Maxsted2009-11-18 23:03:38 -0700
commit1fde9651c1266edcfd9513bfd758986ebca0f6b2 (patch)
tree55454b21ae759bc9d8fbe7cb2d802cffa48fadff
parentRemoved old unused reference to gProductName in windows updater (diff)
parentMerge remote branch 'mccabe/next' into next (diff)
downloadmeta-impy-1fde9651c1266edcfd9513bfd758986ebca0f6b2.zip
meta-impy-1fde9651c1266edcfd9513bfd758986ebca0f6b2.tar.gz
meta-impy-1fde9651c1266edcfd9513bfd758986ebca0f6b2.tar.bz2
meta-impy-1fde9651c1266edcfd9513bfd758986ebca0f6b2.tar.xz
Merge commit 'jacek/next' into next
-rw-r--r--ChangeLog.txt24
-rw-r--r--linden/doc/contributions.txt1
-rw-r--r--linden/indra/llcommon/llfasttimer.cpp35
-rw-r--r--linden/indra/llcommon/llfasttimer.h1
-rw-r--r--linden/indra/newview/llviewermenu.cpp1
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml10
6 files changed, 60 insertions, 12 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index d0473f0..33c9aac 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,5 +1,29 @@
12009-11-18 Jacek Antonelli <jacek.antonelli@gmail.com> 12009-11-18 Jacek Antonelli <jacek.antonelli@gmail.com>
2 2
3 * SNOW-108: Fast timers fail on non i386 systems
4 Patch by Robin Cornelius
5
6 modified: doc/contributions.txt
7 modified: indra/llcommon/llfasttimer.cpp
8 modified: indra/llcommon/llfasttimer.h
9
10
11 * Added "File > Export Selected Objects..."
12
13 modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
14
15
16 * Added "(L$[COST] per texture)" to "Import + Upload..."
17
18 modified: linden/indra/newview/llviewermenu.cpp
19 modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
20
21
22 * Renamed menu items: "Import Object..." and "Import + Upload..."
23
24 modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
25
26
3 * Fixed a compile blocker in LLVoSky::stepCurrent(). 27 * Fixed a compile blocker in LLVoSky::stepCurrent().
4 28
5 modified: linden/indra/newview/llvosky.h 29 modified: linden/indra/newview/llvosky.h
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index 64304dc..e99bd78 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -347,6 +347,7 @@ princess niven
347Renault Clio 347Renault Clio
348 VWR-1976 348 VWR-1976
349Robin Cornelius 349Robin Cornelius
350 SNOW-108
350 VWR-2488 351 VWR-2488
351Ryozu Kojima 352Ryozu Kojima
352 VWR-287 353 VWR-287
diff --git a/linden/indra/llcommon/llfasttimer.cpp b/linden/indra/llcommon/llfasttimer.cpp
index 3304528..9253f2b 100644
--- a/linden/indra/llcommon/llfasttimer.cpp
+++ b/linden/indra/llcommon/llfasttimer.cpp
@@ -63,6 +63,12 @@ int LLFastTimer::sResetHistory = 0;
63 63
64F64 LLFastTimer::sCPUClockFrequency = 0.0; 64F64 LLFastTimer::sCPUClockFrequency = 0.0;
65 65
66#if LL_LINUX || LL_SOLARIS
67U64 LLFastTimer::sClockResolution = 1e9; // Nanosecond resolution
68#else
69U64 LLFastTimer::sClockResolution = 1e6; // Microsecond resolution
70#endif
71
66////////////////////////////////////////////////////////////////////////////// 72//////////////////////////////////////////////////////////////////////////////
67 73
68// 74//
@@ -90,17 +96,26 @@ U64 get_cpu_clock_count()
90 96
91#endif // LL_WINDOWS 97#endif // LL_WINDOWS
92 98
93 99#if LL_LINUX || LL_SOLARIS
94#if (LL_LINUX || LL_SOLARIS) && (defined(__i386__) || defined(__amd64__)) 100// Try to use the MONOTONIC clock if available, this is a constant time counter
101// with nanosecond resolution (but not necessarily accuracy) and attempts are made
102// to synchronize this value between cores at kernel start. It should not be effected
103// by CPU frequency. If not available use the REALTIME clock, but this may be effected by
104// NTP adjustments or other user activity effecting the system time.
95U64 get_cpu_clock_count() 105U64 get_cpu_clock_count()
96{ 106{
97 U64 x; 107 struct timespec tp;
98 __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); 108
99 return x; 109#ifdef CLOCK_MONOTONIC
100} 110 clock_gettime(CLOCK_MONOTONIC,&tp);
111#else
112 clock_gettime(CLOCK_REALTIME,&tp);
101#endif 113#endif
114 return (tp.tv_sec*LLFastTimer::sClockResolution)+tp.tv_nsec;
115}
116#endif // (LL_LINUX || LL_SOLARIS))
102 117
103#if LL_DARWIN || (LL_SOLARIS && defined(__sparc__)) 118#if LL_DARWIN
104// 119//
105// Mac implementation of CPU clock 120// Mac implementation of CPU clock
106// 121//
@@ -115,13 +130,13 @@ U64 get_cpu_clock_count()
115////////////////////////////////////////////////////////////////////////////// 130//////////////////////////////////////////////////////////////////////////////
116 131
117//static 132//static
118#if LL_LINUX || LL_DARWIN || LL_SOLARIS 133#if LL_DARWIN || LL_LINUX || LL_SOLARIS
119// Both Linux and Mac use gettimeofday for accurate time 134// Both Linux and Mac use gettimeofday for accurate time
120U64 LLFastTimer::countsPerSecond() 135U64 LLFastTimer::countsPerSecond()
121{ 136{
122 return 1000000; // microseconds, so 1 Mhz. 137 return sClockResolution; // microseconds, so 1 Mhz.
123} 138}
124#else 139#else
125U64 LLFastTimer::countsPerSecond() 140U64 LLFastTimer::countsPerSecond()
126{ 141{
127 if (!sCPUClockFrequency) 142 if (!sCPUClockFrequency)
diff --git a/linden/indra/llcommon/llfasttimer.h b/linden/indra/llcommon/llfasttimer.h
index a32da18..2e66496 100644
--- a/linden/indra/llcommon/llfasttimer.h
+++ b/linden/indra/llcommon/llfasttimer.h
@@ -238,6 +238,7 @@ public:
238 static int sPauseHistory; 238 static int sPauseHistory;
239 static int sResetHistory; 239 static int sResetHistory;
240 static F64 sCPUClockFrequency; 240 static F64 sCPUClockFrequency;
241 static U64 sClockResolution;
241 242
242private: 243private:
243 EFastTimerType mType; 244 EFastTimerType mType;
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index ecf6fcb..895f488 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -676,6 +676,7 @@ void init_menus()
676 gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost); 676 gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost);
677 gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost); 677 gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost);
678 gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost); 678 gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost);
679 gMenuHolder->childSetLabelArg("ImportUpload", "[COST]", upload_cost);
679 680
680 gAFKMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Away", TRUE); 681 gAFKMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Away", TRUE);
681 gBusyMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Busy", TRUE); 682 gBusyMenu = gMenuBarView->getChild<LLMenuItemCallGL>("Set Busy", TRUE);
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 1b36bca..078fb56 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -29,15 +29,21 @@
29 <on_click function="File.UploadBulk" userdata="" /> 29 <on_click function="File.UploadBulk" userdata="" />
30 </menu_item_call> 30 </menu_item_call>
31 <menu_item_separator /> 31 <menu_item_separator />
32 <menu_item_call name="Import" label="Import" enabled="false"> 32 <menu_item_call name="Import" label="Import Object..." enabled="false">
33 <on_click function="Object.Import" /> 33 <on_click function="Object.Import" />
34 <on_enable function="Object.EnableImport" /> 34 <on_enable function="Object.EnableImport" />
35 </menu_item_call> 35 </menu_item_call>
36 <menu_item_call name="Upload + Import" label="Upload + Import" 36 <menu_item_call name="ImportUpload"
37 label="Import + Upload... (L$[COST] per texture)"
37 enabled="false"> 38 enabled="false">
38 <on_click function="Object.ImportUpload" /> 39 <on_click function="Object.ImportUpload" />
39 <on_enable function="Object.EnableImport" /> 40 <on_enable function="Object.EnableImport" />
40 </menu_item_call> 41 </menu_item_call>
42 <menu_item_call name="Export" label="Export Selected Objects..."
43 enabled="false">
44 <on_click function="Object.Export" />
45 <on_enable function="Object.EnableExport" />
46 </menu_item_call>
41 <menu_item_separator /> 47 <menu_item_separator />
42 <menu_item_call name="Close Window" 48 <menu_item_call name="Close Window"
43 label="Close Window" 49 label="Close Window"