Skip to content

Commit b7924f7

Browse files
authored
Merge pull request #3141 from secondlife/brad/2744-cleanups
#2744 intel fallback cleanups
2 parents 3d33326 + 9a29f07 commit b7924f7

File tree

4 files changed

+76
-28
lines changed

4 files changed

+76
-28
lines changed

indra/lib/python/indra/util/llmanifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def unpacked_finish(self):
637637
'vers':'_'.join(self.args['version'])}
638638
print("Creating unpacked file:", unpacked_file_name)
639639
# could add a gz here but that doubles the time it takes to do this step
640-
tf = tarfile.open(self.src_path_of(unpacked_file_name), 'w:')
640+
tf = tarfile.open(self.build_path_of(unpacked_file_name), 'w:')
641641
# add the entire installation package, at the very top level
642642
tf.add(self.get_dst_prefix(), "")
643643
tf.close()

indra/newview/CMakeLists.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,47 @@ if (WINDOWS)
17991799

18001800
add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon llwebrtc copy_w_viewer_manifest)
18011801

1802+
# Useful for remote debugging or profiling if set to target a shared drive. for example, brad sets it to "dist/secondlife" to deploy under
1803+
# the build tree (and then I share that directory) or "f:/dist/secondlife" to deploy to a network mounted drive (although this can be slow).
1804+
# this will also create an "unpacked" tarball at build-<platform>/newview/unpacked_<platform>_7_1_11_<build num>.tar
1805+
set(LOCAL_DIST_DIR "" CACHE PATH "Path for 'local' unpacked copy of viewer distribution to be deployed to.")
1806+
set(product SecondLife-${ARCH}-${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION})
1807+
if(IS_DIRECTORY ${LOCAL_DIST_DIR})
1808+
add_custom_command(
1809+
OUTPUT ${LOCAL_DIST_DIR}/.${product}.copy_touched
1810+
COMMAND ${PYTHON_EXECUTABLE}
1811+
ARGS
1812+
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1813+
"--actions=\"copy package unpacked\""
1814+
--arch=${ARCH}
1815+
--artwork=${ARTWORK_DIR}
1816+
"--bugsplat=${BUGSPLAT_DB}"
1817+
"--openal=${USE_OPENAL}"
1818+
"--tracy=${USE_TRACY}"
1819+
--build=${CMAKE_CURRENT_BINARY_DIR}
1820+
--buildtype=$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,${CMAKE_BUILD_TYPE}>
1821+
"--channel=${VIEWER_CHANNEL}"
1822+
--configuration=$<CONFIG>
1823+
--dest=${LOCAL_DIST_DIR}
1824+
--grid=${GRID}
1825+
--source=${CMAKE_CURRENT_SOURCE_DIR}
1826+
--versionfile=${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
1827+
--touch=${LOCAL_DIST_DIR}/.${product}.copy_touched
1828+
DEPENDS
1829+
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
1830+
stage_third_party_libs
1831+
llwebrtc
1832+
${CMAKE_CURRENT_BINARY_DIR}/viewer_version.txt
1833+
${COPY_INPUT_DEPENDENCIES}
1834+
${VIEWER_BINARY_NAME}
1835+
COMMENT "Performing viewer_manifest local dist copy"
1836+
)
1837+
1838+
add_custom_target(copy_local_dist_viewer_manifest ALL DEPENDS ${LOCAL_DIST_DIR}/.${product}.copy_touched)
1839+
elseif (NOT LOCAL_DIST_DIR STREQUAL "")
1840+
message(FATAL_ERROR "LOCAL_DIST_DIR ${LOCAL_DIST_DIR} specified but is not valid target directory to copy viewer distribution into. Please create the directory and try again")
1841+
endif () # IS_DIRECTORY ${LOCAL_DIST_DIR}
1842+
18021843
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
18031844
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
18041845
endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)

indra/newview/llfeaturemanager.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@ void LLFeatureManager::applyBaseMasks()
655655
if (gGLManager.mIsIntel)
656656
{
657657
maskFeatures("Intel");
658-
if (gGLManager.mGLVersion < 4.59f)
658+
// check against 3.33 to avoid applying this fallback twice
659+
if (gGLManager.mGLVersion < 4.59f && gGLManager.mGLVersion > 3.33f)
659660
{
660661
// if we don't have OpenGL 4.6 on intel, set it to OpenGL 3.3
661662
// we also want to trigger the GL3 fallbacks on these chipsets
@@ -665,10 +666,12 @@ void LLFeatureManager::applyBaseMasks()
665666
// https://docs.blender.org/manual/en/latest/troubleshooting/gpu/windows/intel.html#legacy-intel-hd-4000-5000
666667
// https://www.intel.com/content/www/us/en/support/articles/000005524/graphics.html
667668
// this will disable things like reflection probes, HDR, FXAA and SMAA
669+
LL_INFOS("RenderInit") << "Applying Intel integrated pre-Haswell fallback. Downgrading feature usage to OpenGL 3.3" << LL_ENDL;
668670
gGLManager.mGLVersion = llmin(gGLManager.mGLVersion, 3.33f);
669-
// and select GLSL version for OpenGL 3.3
671+
gGLManager.mGLVersionString += " 3.3 fallback"; // for ViewerStats reporting
672+
// and select GLSL version for OpenGL 3.2
670673
gGLManager.mGLSLVersionMajor = 3;
671-
gGLManager.mGLSLVersionMinor = 30;
674+
gGLManager.mGLSLVersionMinor = 20;
672675
}
673676
}
674677
if (gGLManager.mIsApple)

indra/newview/viewer_manifest.py

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -502,30 +502,34 @@ def construct(self):
502502
if self.is_packaging_viewer():
503503
# Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
504504
self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
505-
# Emit the whole app image as one of the GitHub step outputs. We
506-
# want the whole app -- but NOT the extraneous build products that
507-
# get tossed into the same directory, such as the installer and
508-
# the symbols tarball, so add exclusions. When we feed
509-
# upload-artifact multiple absolute pathnames, even just for
510-
# exclusion, it ends up creating several extraneous directory
511-
# levels within the artifact -- so try using only relative paths.
512-
# One problem: as of right now, our current directory os.getcwd()
513-
# is not the same as the initial working directory for this job
514-
# step, meaning paths relative to our os.getcwd() won't work for
515-
# the subsequent upload-artifact step. We're a couple directory
516-
# levels down. Try adjusting for those when specifying the base
517-
# for self.relpath().
518-
appbase = self.relpath(
519-
self.get_dst_prefix(),
520-
base=os.path.join(os.getcwd(), os.pardir, os.pardir))
521-
self.set_github_output('viewer_app', appbase,
522-
# except for this stuff
523-
*(('!' + os.path.join(appbase, pattern))
524-
for pattern in (
525-
'secondlife-bin.*',
526-
'*_Setup.exe',
527-
'*.bat',
528-
'*.tar.xz')))
505+
506+
GITHUB_OUTPUT = os.getenv('GITHUB_OUTPUT')
507+
if GITHUB_OUTPUT:
508+
# Emit the whole app image as one of the GitHub step outputs. We
509+
# want the whole app -- but NOT the extraneous build products that
510+
# get tossed into the same directory, such as the installer and
511+
# the symbols tarball, so add exclusions. When we feed
512+
# upload-artifact multiple absolute pathnames, even just for
513+
# exclusion, it ends up creating several extraneous directory
514+
# levels within the artifact -- so try using only relative paths.
515+
# One problem: as of right now, our current directory os.getcwd()
516+
# is not the same as the initial working directory for this job
517+
# step, meaning paths relative to our os.getcwd() won't work for
518+
# the subsequent upload-artifact step. We're a couple directory
519+
# levels down. Try adjusting for those when specifying the base
520+
# for self.relpath().
521+
appbase = self.relpath(
522+
self.get_dst_prefix(),
523+
base=os.path.join(os.getcwd(), os.pardir, os.pardir),
524+
symlink=True)
525+
self.set_github_output('viewer_app', appbase,
526+
# except for this stuff
527+
*(('!' + os.path.join(appbase, pattern))
528+
for pattern in (
529+
'secondlife-bin.*',
530+
'*_Setup.exe',
531+
'*.bat',
532+
'*.tar.xz')))
529533

530534
with self.prefix(src=os.path.join(pkgdir, "VMP")):
531535
# include the compiled launcher scripts so that it gets included in the file_list

0 commit comments

Comments
 (0)