]> git.rm.cloudns.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
13 years agoimplemented support for GL_EXT_texture_sRGB to preserve precision if
havoc [Sun, 10 Apr 2011 12:50:11 +0000 (12:50 +0000)]
implemented support for GL_EXT_texture_sRGB to preserve precision if
supported (otherwise it just converts to linear and uses regular texture
formats)
renamed r_texture_convertsRGB_ cvars to r_texture_sRGB_ and broke out
the individual skin textures as separate cvars
added vid.forcetextype which allows particular renderpaths to force
desired texture component layouts (GL_RGBA for GLES, otherwise GL_BGRA)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11045 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3a0aa3feb14ad0af4e0c2fb3408d6cca0132ddcf

13 years agocorrect a cvar comment now that directional shading uses 8x data
havoc [Sat, 9 Apr 2011 17:11:18 +0000 (17:11 +0000)]
correct a cvar comment now that directional shading uses 8x data

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11042 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b6cc94dfae08e7ab8e881fb6ed222041a5e70bd7

13 years agoredesigned r_shadow_bouncegrid_static_directionalshading - it now uses 6
havoc [Sat, 9 Apr 2011 17:09:18 +0000 (17:09 +0000)]
redesigned r_shadow_bouncegrid_static_directionalshading - it now uses 6
vectors per pixel instead of 3, giving much more accurate shading
added r_shadow_bouncegrid_includedirectlighting cvar - if turned on this
enables direct lighting in the bouncegrid
cleaned up directionalshading code significantly

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11041 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=db7cb0d2dd2d8aa7fb7dba7b9b6bf193d8df6d34

13 years agorewrote mod_collision_bih tracing code, the functions are no longer
havoc [Fri, 8 Apr 2011 15:23:10 +0000 (15:23 +0000)]
rewrote mod_collision_bih tracing code, the functions are no longer
recursive (small speed boost), line traces are about 12% faster due to
more precise culling of leafs (the code is however huge and nasty), BIH
TraceBrush is now considerably faster due to the same techniques, it was
previously very unoptimized

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11035 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a50533d4824ceb4c0e45bf988597b2316d0e198e

13 years agofix the same bugs as before in strireplace
divverent [Sun, 10 Apr 2011 05:26:56 +0000 (05:26 +0000)]
fix the same bugs as before in strireplace

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11044 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=380380c0c6231c1b63a3100f56cb291a9d1247f0

13 years agor_showsurfaces 3: render sky (appears as average-colored box sides)
divverent [Sun, 10 Apr 2011 05:21:59 +0000 (05:21 +0000)]
r_showsurfaces 3: render sky (appears as average-colored box sides)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11043 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c9db9a48056251911aa3581ea642f3ffcf0c1b0f

13 years agodon't use GL_RGBA internalformat on opaque textures (thanks to Rock for
havoc [Sat, 9 Apr 2011 04:17:36 +0000 (04:17 +0000)]
don't use GL_RGBA internalformat on opaque textures (thanks to Rock for
reporting this bug)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11040 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2863cd77fef4da463a30486c7ac2dffe0d9639eb

13 years agoclang has _mm_cvtss_f32 but not __builtin_ia32_vec_ext_v4sf
divverent [Fri, 8 Apr 2011 17:49:18 +0000 (17:49 +0000)]
clang has _mm_cvtss_f32 but not __builtin_ia32_vec_ext_v4sf

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11039 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=12cff679cfcf804619986cac2afa44e2825914a5

13 years agowhen loading q1bsp textures, do not allow q3 shader loading to overwrite
havoc [Fri, 8 Apr 2011 16:10:44 +0000 (16:10 +0000)]
when loading q1bsp textures, do not allow q3 shader loading to overwrite
default parameters

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11036 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=764d427c5ca3d15a9d85d38f94aa0ddc85f8677d

13 years agosome cleanup of offsetmapping setup code
havoc [Fri, 8 Apr 2011 16:38:11 +0000 (16:38 +0000)]
some cleanup of offsetmapping setup code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11038 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ae6353ebb7191d74a72eda456a355af72a922610

13 years agoadded mod_noshader_default_offsetmapping to allow separate control over
havoc [Fri, 8 Apr 2011 16:37:50 +0000 (16:37 +0000)]
added mod_noshader_default_offsetmapping to allow separate control over
external textures that have no q3 shader

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11037 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=cf23ece7905622d1271e94a8dd44f47e93870da6

13 years agofix multiple bugs in strreplace
divverent [Wed, 6 Apr 2011 20:24:30 +0000 (20:24 +0000)]
fix multiple bugs in strreplace

bug 1: if search string is empty, an endless loop occurs
bug 2: searching for "foo" in "fo" is actually found, and replaced!

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11034 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=4365547c8e4c198fc101125d0403eae1a20b3a82

13 years agomore concise version of Texture2DBGRA8
eihrul [Wed, 6 Apr 2011 16:37:31 +0000 (16:37 +0000)]
more concise version of Texture2DBGRA8

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11033 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f802623d71de8ef53d27ed30969c36583216097d

13 years agoimplement MODE_WATER
divverent [Wed, 6 Apr 2011 16:32:03 +0000 (16:32 +0000)]
implement MODE_WATER

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11032 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=cf25a1d3e58b9b7f325f958eeba3e179453a8317

13 years agomake MODE_REFRACTION not use TEXCOORD1..3 to help MODE_WATER use the same code
divverent [Wed, 6 Apr 2011 16:32:00 +0000 (16:32 +0000)]
make MODE_REFRACTION not use TEXCOORD1..3 to help MODE_WATER use the same code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11031 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2105e04af182c4271a02168b05ac08bfcf8a51e2

13 years agopreparation for MODE_WATER: refactor the pixel getting out of MODE_REFRACTION
divverent [Wed, 6 Apr 2011 15:26:08 +0000 (15:26 +0000)]
preparation for MODE_WATER: refactor the pixel getting out of MODE_REFRACTION

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11030 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=91d80ca281ca6c801be0ea0d92fdd7aa3f4e6eb0

13 years agouse ASYNCBLIT by default
eihrul [Tue, 5 Apr 2011 18:40:01 +0000 (18:40 +0000)]
use ASYNCBLIT by default

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11029 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=d0ade9af196dac2c8e54143872c35d7a2dba78a1

13 years agomake vid_glx also clear fullscreen properly
divverent [Tue, 5 Apr 2011 18:06:10 +0000 (18:06 +0000)]
make vid_glx also clear fullscreen properly

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11028 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0068289941cd215a050fa2296c213a9ea3a25fce

13 years agoonly use ONE buffer for non-Xshm
divverent [Tue, 5 Apr 2011 17:41:10 +0000 (17:41 +0000)]
only use ONE buffer for non-Xshm

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11027 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=728afed30f0ce949a9a62ef996e47288d6013d19

13 years agosanity check the visual obtained
divverent [Tue, 5 Apr 2011 17:28:32 +0000 (17:28 +0000)]
sanity check the visual obtained

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11026 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f510b19bbe2aa254df1a11f7f492771a9651fd7e

13 years agoXShm and pthreads support for vid_glx dpsoftrast
divverent [Tue, 5 Apr 2011 17:19:56 +0000 (17:19 +0000)]
XShm and pthreads support for vid_glx dpsoftrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11025 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2092ef1266974d9713b0788174dbaf366bf9ddca

13 years agoworkaround for missing _mm_cvtss_f32 on some gcc versionsx
eihrul [Tue, 5 Apr 2011 08:57:38 +0000 (08:57 +0000)]
workaround for missing _mm_cvtss_f32 on some gcc versionsx

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11024 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=bd2caa413b94d2804f524b891e66be1aef4f6dcd

13 years agoadded backface culling optimization to cl_decals_newsystem, this helps
havoc [Tue, 5 Apr 2011 07:51:52 +0000 (07:51 +0000)]
added backface culling optimization to cl_decals_newsystem, this helps
in many cases

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11023 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2d5c40b14b6bdba99443bd22b68e3dcddc345801

13 years agooptimize scanning for 0 alpha in FinishBGRA8
eihrul [Mon, 4 Apr 2011 21:21:49 +0000 (21:21 +0000)]
optimize scanning for 0 alpha in FinishBGRA8

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11022 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=22669287c86f5c625403e69cacc47a395751f783

13 years agoFinishBGRA8 optimization and fixes
eihrul [Mon, 4 Apr 2011 20:21:15 +0000 (20:21 +0000)]
FinishBGRA8 optimization and fixes

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11021 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8aa6d5b5a9ef304880ec5d979fbb0a77ac65c262

13 years agofix some clipping plane bugs and FinishBGRA8 bug introduced in r11015
eihrul [Mon, 4 Apr 2011 19:51:25 +0000 (19:51 +0000)]
fix some clipping plane bugs and FinishBGRA8 bug introduced in r11015

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11020 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=9d41cf74ce59873ab703987a6d5ea2affae21ace

13 years agoremoved unused function DPSOFTRAST_Draw_Span_Finish
havoc [Mon, 4 Apr 2011 15:47:46 +0000 (15:47 +0000)]
removed unused function DPSOFTRAST_Draw_Span_Finish
refactored parts of DPSOFTRAST_Draw_ProcessSpans into two functions -
DPSOFTRAST_Draw_DepthTest and DPSOFTRAST_Draw_DepthWrite
moved stack variable pixelmask to thread->pixelmaskarray
added depthbase and depthslope to span structure, computed at creation

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11019 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=556a7730fc195279671d0ff92b6cecbf563c2798

13 years agoclipplane validation fix
eihrul [Mon, 4 Apr 2011 14:53:06 +0000 (14:53 +0000)]
clipplane validation fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11018 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c265f4ad887eb529f61831ab184184bac1f93c2a

13 years agoadded simple affine check to accelerate texture fetches on 2D art
havoc [Mon, 4 Apr 2011 14:41:28 +0000 (14:41 +0000)]
added simple affine check to accelerate texture fetches on 2D art

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11017 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f268c57a296c53f3bdd239911cc5569ac08ae70f

13 years agoinitial support for user clipping plane in dpsoftrast
eihrul [Mon, 4 Apr 2011 14:31:32 +0000 (14:31 +0000)]
initial support for user clipping plane in dpsoftrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11016 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c27fadf7530f9e06f6fba5afe584f82b2ebb2629

13 years agochanged pixelmask processing in DPSOFTRAST_Draw_Span_FinishBGRA8 to
havoc [Mon, 4 Apr 2011 12:30:15 +0000 (12:30 +0000)]
changed pixelmask processing in DPSOFTRAST_Draw_Span_FinishBGRA8 to
clear pixelmask values when doing alphablend if the pixels have zero
alpha, and also to use a double loop approach which removes the checks
from the blending inner loops...  this seems to have only a slight fps
gain in Quake though

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11015 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c8e0c313596ea67990c0f86a68b14cf5f3133b2d

13 years agovery basic softrast support in vid_glx.c. VERY SLOW, as it doesn't use an Xtension...
divverent [Fri, 1 Apr 2011 23:07:04 +0000 (23:07 +0000)]
very basic softrast support in vid_glx.c. VERY SLOW, as it doesn't use an Xtension yet.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11011 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c7d49f26ba4e2cc1ca64ab7511ce5a8c8b266a06

13 years agoadded GL_Finish function in backend, to centralize all the qglFinish
havoc [Fri, 1 Apr 2011 09:40:57 +0000 (09:40 +0000)]
added GL_Finish function in backend, to centralize all the qglFinish
calls and accommodate other render paths in such cases

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11003 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=7553655597e4e22766b9ed2394896a2a6905fc32

13 years agomake r_hdr behave like r_bloom when r_viewfbo is on
havoc [Fri, 1 Apr 2011 08:42:00 +0000 (08:42 +0000)]
make r_hdr behave like r_bloom when r_viewfbo is on

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11000 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=030a101c7bfaa41d53c608757817dadbb10205a3

13 years agoadded support for dpsoftrast synchronization for fpsscaling
havoc [Fri, 1 Apr 2011 08:11:16 +0000 (08:11 +0000)]
added support for dpsoftrast synchronization for fpsscaling

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10999 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ecf8d72498492b34cc57d99e1c8928c3d37ed205

13 years agochanged default r_viewscale_fpsscaling_min from 0.25 (25% pixels, 50%
havoc [Fri, 1 Apr 2011 07:09:51 +0000 (07:09 +0000)]
changed default r_viewscale_fpsscaling_min from 0.25 (25% pixels, 50%
width/height) to 0.0625 (6.25% pixels, 25% width/height)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10997 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c15408367ffd020aa37298afc116b89a5702e1be

13 years agochanged default r_viewscale_fpsscaling_target from 90 to 70, this still
havoc [Fri, 1 Apr 2011 07:06:28 +0000 (07:06 +0000)]
changed default r_viewscale_fpsscaling_target from 90 to 70, this still
works well with vid_vsync

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10996 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=73d061de4c851e253403c25a6a8fff31d4ee458d

13 years agoreworked r_viewscale_fpsscaling to use the time of SCR_DrawScreen
havoc [Fri, 1 Apr 2011 07:04:58 +0000 (07:04 +0000)]
reworked r_viewscale_fpsscaling to use the time of SCR_DrawScreen
wrapped in glFinish calls (REALLY should use GL_EXT_timery_query), this
means that vid_vsync now works fine with it

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10995 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=48ac175a246c448d53cd83c723c3f9a668fb313d

13 years agoadded r_viewscale_fpsscaling and various cvars for it, this enables
havoc [Fri, 1 Apr 2011 05:46:28 +0000 (05:46 +0000)]
added r_viewscale_fpsscaling and various cvars for it, this enables
variable resolution rendering based on framerate (does not work properly
with vsync)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10994 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=dff1126b30fbb08f2c63407b3bf7846bf9adf6f2

13 years agor_viewscale now works (with or without r_viewfbo), this allows reduced
havoc [Fri, 1 Apr 2011 01:04:12 +0000 (01:04 +0000)]
r_viewscale now works (with or without r_viewfbo), this allows reduced
resolution rendering for higher performance, at native screen
resolutions

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10993 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f2637372b177a8e0e3a7dafc5ee8ecb4283fa98f

13 years agofixed viewsize issues with r_viewfbo
havoc [Thu, 31 Mar 2011 23:58:16 +0000 (23:58 +0000)]
fixed viewsize issues with r_viewfbo

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10991 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=420ba41845f1e01bb610c1309a71930d7ddfb437

13 years agoadded r_viewfbo and r_viewscale cvars - the former allows use of
havoc [Thu, 31 Mar 2011 13:17:15 +0000 (13:17 +0000)]
added r_viewfbo and r_viewscale cvars - the former allows use of
GL_RGBA16F and GL_RGBA32F framebuffer rendering for 3D views (the main
refresh is not altered), the latter will allow scaling view rendering
resolution independently of video resolution, when implemented

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10989 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3e38a6509b932ff0c1033f296737ba378bdc3214

13 years agofix flipped scissor coordinates in dpsoftrast render path
eihrul [Sat, 2 Apr 2011 20:29:18 +0000 (20:29 +0000)]
fix flipped scissor coordinates in dpsoftrast render path

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11014 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=5842da67194bd48275e9216b26834f84ca911fbc

13 years agoslight optimization to 2D rendering - if triangle wslope is 0, don't
havoc [Sat, 2 Apr 2011 16:55:32 +0000 (16:55 +0000)]
slight optimization to 2D rendering - if triangle wslope is 0, don't
bother doing any math, just fill the zf array

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11013 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=5428f67a5532b4b5a18cfd9dce04fc7c2bb936ab

13 years agoenable SSE2 instructions when compiling dpsoftrast.c
havoc [Sat, 2 Apr 2011 04:38:13 +0000 (04:38 +0000)]
enable SSE2 instructions when compiling dpsoftrast.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11012 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a04f8c43ccde26a9003c7ea6046df89216e889cb

13 years agofix compilation when SSE2_PRESENT, also fix compilation without SSE_POSSIBLE
havoc [Fri, 1 Apr 2011 15:02:51 +0000 (15:02 +0000)]
fix compilation when SSE2_PRESENT, also fix compilation without SSE_POSSIBLE

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11006 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6c90b6072197cf5b098dfa6530f366b15295c99e

13 years agofix the 0.5-fix
eihrul [Fri, 1 Apr 2011 21:05:36 +0000 (21:05 +0000)]
fix the 0.5-fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11010 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ace2325634d1d52f73f26272e7020b5df92c2034

13 years agodpsoftrast: fix off-by-0.5 in GL_NEAREST
divverent [Fri, 1 Apr 2011 21:00:18 +0000 (21:00 +0000)]
dpsoftrast: fix off-by-0.5 in GL_NEAREST

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11009 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=4c54e85289e3b095a73574c0335b3b869b3417ae

13 years agofix texture filtering accuracy bugs in the C variant (12bit vs 16bit) in softrast
divverent [Fri, 1 Apr 2011 20:50:40 +0000 (20:50 +0000)]
fix texture filtering accuracy bugs in the C variant (12bit vs 16bit) in softrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11008 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e7088b647d8131ff08e2e71587859bbf032652bf

13 years agopossibly fix offset calc for infobar
divverent [Fri, 1 Apr 2011 20:16:53 +0000 (20:16 +0000)]
possibly fix offset calc for infobar

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11007 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6b98d1a508037e3776c31715fd15610dad758e1e

13 years agoWGL client can now use DPSOFTRAST, added thread_win.c to avoid SDL dependency for...
havoc [Fri, 1 Apr 2011 14:59:17 +0000 (14:59 +0000)]
WGL client can now use DPSOFTRAST, added thread_win.c to avoid SDL dependency for WGL client
added Sys_HaveSSE and Sys_HaveSSE2 functions in sys_shared.c and cleaned up that mess in model_alias.c
dpsoftrast now compiles if SSE_POSSIBLE rather than SSE2_PRESENT, and uses Sys_HaveSSE2 for runtime detection on x86

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11005 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0675986e0c28e85906a0c9196b3e9aae9bfb3f34

13 years agofix Vertex_BoundY params
eihrul [Fri, 1 Apr 2011 14:40:48 +0000 (14:40 +0000)]
fix Vertex_BoundY params

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11004 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6d50c05a551328651e449671c188f626d2321ffe

13 years agofb validation fix
eihrul [Fri, 1 Apr 2011 09:09:10 +0000 (09:09 +0000)]
fb validation fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11002 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ce4fe693f0528b10085c0fa1a1f45ca87feabbad

13 years agoenable gloss texture loading in GLES2 path
havoc [Fri, 1 Apr 2011 09:08:39 +0000 (09:08 +0000)]
enable gloss texture loading in GLES2 path

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11001 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b1457e1f0ef8ccf219a2e65324b90b75066b7ed1

13 years agodon't crash on NULL texture upload in dpsoftrast
havoc [Fri, 1 Apr 2011 07:23:17 +0000 (07:23 +0000)]
don't crash on NULL texture upload in dpsoftrast

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10998 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=33f901a2deb7f1984b7e239ec39b1d1438ef8d08

13 years agoupload NULL textures as NULL textures, rather than creating a big array
havoc [Fri, 1 Apr 2011 01:03:30 +0000 (01:03 +0000)]
upload NULL textures as NULL textures, rather than creating a big array
of zeros to upload

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10992 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=34ea921bb524d9347e24d7f019520166c0c78fbb

13 years agosys_linux, sys_sdl: support options -noterminal and -stderr to define which fd gets...
divverent [Thu, 31 Mar 2011 18:14:20 +0000 (18:14 +0000)]
sys_linux, sys_sdl: support options -noterminal and -stderr to define which fd gets output. Helps when using vid_soft/SDL/libcaca/ncurses ;)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10990 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=9881c63c0520c9d4141624c337c90886353ec8de

13 years agofix the alpha bug in dpsoftrast.c
divverent [Wed, 30 Mar 2011 21:27:16 +0000 (21:27 +0000)]
fix the alpha bug in dpsoftrast.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10988 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8e5d45706acaadb26c87ed55a25367e6b7ae24c3

13 years agoa fix for dpsoftrast refractions by eihrul
divverent [Wed, 30 Mar 2011 21:17:19 +0000 (21:17 +0000)]
a fix for dpsoftrast refractions by eihrul

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10987 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=019d97b16eed46a824a28f135da61a44d1422194

13 years agostart implementing REFRACTION
divverent [Wed, 30 Mar 2011 21:17:16 +0000 (21:17 +0000)]
start implementing REFRACTION

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10986 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3af2dac85615d395aab582b44e4b9f3eb3375fef

13 years agodpsoftrast: support r_shadow_glossexact
divverent [Wed, 30 Mar 2011 05:47:58 +0000 (05:47 +0000)]
dpsoftrast: support r_shadow_glossexact

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10985 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=12b892df81b3d3aa36266598ce7cd3a5c5dfb28d

13 years agodpsoftrast: speed up deluxemapping a bit; support tangentspace deluxemapping too...
divverent [Wed, 30 Mar 2011 05:47:53 +0000 (05:47 +0000)]
dpsoftrast: speed up deluxemapping a bit; support tangentspace deluxemapping too; support fakelight too

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10984 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0859ac5d27a994108ab525c9b8b7e96c3488b866

13 years agor_shadow_deferred now checks for r_shadow_gloss 0 and does not use the
havoc [Tue, 29 Mar 2011 23:15:08 +0000 (23:15 +0000)]
r_shadow_deferred now checks for r_shadow_gloss 0 and does not use the
second color attachment if so, giving a modest speed boost for testing
but deferred is still way too slow for practical use even with this...

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10983 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=d64b00435e6ef5133af4e249db19ffaafa988bb9

13 years agofix bouncegrid intensity so it reacts to r_hdr_scenebrightness and r_hdr
havoc [Tue, 29 Mar 2011 22:40:25 +0000 (22:40 +0000)]
fix bouncegrid intensity so it reacts to r_hdr_scenebrightness and r_hdr

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10982 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a0678e09286d9e08404e457d3499f51faa940f48

13 years agohush some unrecognized SDL event type warnings
havoc [Tue, 29 Mar 2011 01:32:20 +0000 (01:32 +0000)]
hush some unrecognized SDL event type warnings

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10981 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=d1a7d5d11e065a2fef1d0d9665cc8920fc42716f

13 years agoadded joy_axiskeyevents_deadzone cvar which makes the arrow key
havoc [Mon, 28 Mar 2011 23:00:30 +0000 (23:00 +0000)]
added joy_axiskeyevents_deadzone cvar which makes the arrow key
emulation far less sensitive

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10980 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f7e415b336b35214c5906fa24f2d75123c11dec2

13 years agomake sure collision cache parameter struct is the same every frame by
havoc [Mon, 28 Mar 2011 11:48:21 +0000 (11:48 +0000)]
make sure collision cache parameter struct is the same every frame by
using memset first

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10979 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3bf45a9aeeb979682e3dc01c03c37ebb298fc530

13 years agor_shadow_bouncegrid_particleintensity changed from 2 to 1 because it was
havoc [Mon, 28 Mar 2011 11:36:41 +0000 (11:36 +0000)]
r_shadow_bouncegrid_particleintensity changed from 2 to 1 because it was
overwhelming (still is quite bright...)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10978 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=84ddb7878d54add243c4bb0fbe3f864d7cc4cc57

13 years agofix some warnings
havoc [Mon, 28 Mar 2011 10:48:22 +0000 (10:48 +0000)]
fix some warnings

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10977 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=74030f9019b473fad1fad0d67f4dd89975df38b5

13 years agorestore the active rtlights check in bouncegrid
havoc [Mon, 28 Mar 2011 10:47:53 +0000 (10:47 +0000)]
restore the active rtlights check in bouncegrid
memset the bouncegrid settings struct to make it consistently pass the
memcmp check even if some bytes are not set
improved bouncegrid dynamic mode size check to compare pixel count
rather than individual dimensions

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10976 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=298c4f99b6a5360a88beea2d2b0c4c6ce5bd70fb

13 years agoremove check for active rtlights in bouncegrid because it was not
havoc [Mon, 28 Mar 2011 10:18:01 +0000 (10:18 +0000)]
remove check for active rtlights in bouncegrid because it was not
working

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10975 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ef67922d463314dd46c32d0d55cc71255e1b7add

13 years agobetter detection of active rtlights in bouncegrid code
havoc [Mon, 28 Mar 2011 09:59:12 +0000 (09:59 +0000)]
better detection of active rtlights in bouncegrid code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10974 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6c0fbc59c21af32d678179f7d24317ba36b2b25b

13 years agodo not use light scissoring on deferred lighting mode, it often yields
havoc [Mon, 28 Mar 2011 07:16:34 +0000 (07:16 +0000)]
do not use light scissoring on deferred lighting mode, it often yields
strange artifacts on shadowless lights

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10973 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e75885389d9e1997c22e8fa1839d5d62322468ba

13 years agodisallow r_shadow_bouncegrid on renderpaths that do not support it
havoc [Mon, 28 Mar 2011 07:15:19 +0000 (07:15 +0000)]
disallow r_shadow_bouncegrid on renderpaths that do not support it

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10972 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3cee2c1d934c5a7ecf14a46db03dc3336a4e4947

13 years agoadded r_shadow_bouncegrid_static cvar which makes a proper static mode
havoc [Mon, 28 Mar 2011 06:56:32 +0000 (06:56 +0000)]
added r_shadow_bouncegrid_static cvar which makes a proper static mode
and this is now the default, its framerate cost is very low and it makes
realtime world lighting look nicer, tweaked all relevant cvars for this
detect whether any lights warrant bouncegrid each frame - this means
that the cvar could be defaulted on and still do nothing when realtime
world lighting is turned off

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10971 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0acf3f75fc97b3ccb695d96291ea8cdba9d9328b

13 years agofix a crash in RSurf_DrawBatch_GL11_MakeFogColor
divverent [Sun, 27 Mar 2011 06:20:51 +0000 (06:20 +0000)]
fix a crash in RSurf_DrawBatch_GL11_MakeFogColor

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10970 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=5db3cb274a011fcba94fa0df402d76256e8526b3

13 years agolast commit was a bad fix - fix it correctly, preventing reliefmapping artifacts...
divverent [Sat, 26 Mar 2011 19:12:04 +0000 (19:12 +0000)]
last commit was a bad fix - fix it correctly, preventing reliefmapping artifacts on these pesky reflections

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10969 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=52b8812faa9c358731b61899cc994bcce9849ca6

13 years agofix a compile error in refractions
divverent [Sat, 26 Mar 2011 18:59:26 +0000 (18:59 +0000)]
fix a compile error in refractions

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10968 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f95cc84d8ff85f60a78375604ebc4884c56373ff

13 years agoGLSL shader: make dp_waterscroll work with dp_reflect and dp_refract
vortex [Tue, 22 Mar 2011 15:15:59 +0000 (15:15 +0000)]
GLSL shader: make dp_waterscroll work with dp_reflect and dp_refract

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10958 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=dbd8e60c7e473f960271f3f52d66382e205001db

13 years agofix another dp_shadow2D call
divverent [Fri, 25 Mar 2011 21:39:02 +0000 (21:39 +0000)]
fix another dp_shadow2D call

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10967 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c5570a37c35c7dc0ce97d8a7b16207f5ccc477ad

13 years agofix some GLSL warnings
havoc [Fri, 25 Mar 2011 21:32:17 +0000 (21:32 +0000)]
fix some GLSL warnings

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10966 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=df5c7facfbf185d10f4fc0b1e0768dcecae1a242

13 years agoUNMERGE
vortex vortex@d7cf8633-e32d-0410-b094-e92efae38249 [Tue, 22 Mar 2011 15:15:59 +0000 (15:15 +0000)]
UNMERGE
GLSL shader: make dp_waterscroll work with dp_reflect and dp_refract

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10958 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::unmerge=dbd8e60c7e473f960271f3f52d66382e205001db

13 years agospeed up packet loss handling by changing EntityFrame5_LostFrame from O(states^2...
divverent [Fri, 25 Mar 2011 20:57:26 +0000 (20:57 +0000)]
speed up packet loss handling by changing EntityFrame5_LostFrame from O(states^2*edictsperstate^2) to O(MAX_EDICTS + states*edictsperstate)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10964 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=b94aace6374768be72d67db786d7f40e68d50cc7

13 years agoprevent crashes on BIH code
havoc [Fri, 25 Mar 2011 21:11:04 +0000 (21:11 +0000)]
prevent crashes on BIH code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10965 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a6032114473e2c84d3b5e9de914759366224e7b7

13 years agoBIH building and recursion no longer directly links leaf nodes into the
havoc [Mon, 21 Mar 2011 06:57:28 +0000 (06:57 +0000)]
BIH building and recursion no longer directly links leaf nodes into the
hierarchy, they are only used by unordered children group nodes
changed BIH_MAXUNORDEREDCHILDREN to 8 and removed
mod_collision_bih_childrengrouping cvar because this seems to be the
optimal value (values up to 16 sometimes yield minor gains but not
consistent)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10955 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=07724ad4d6ab79f66c46e2ea2180d4efd05b3ee4

13 years agochanged default r_useportalculling from 1 to 2, this forces use of it on
havoc [Tue, 22 Mar 2011 21:44:18 +0000 (21:44 +0000)]
changed default r_useportalculling from 1 to 2, this forces use of it on
vised maps, because although it only gives minor gains (and sometimes
minor losses) in quake maps, it gives substantial gains in outdoor maps,
particularly when viewed from overhead, such as in steelstorm

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10959 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ab2e7cbc9899b662ddf6f2ca35ee681a22832b89

13 years agomake the endless loop run in 3 milliseconds (fixes BIH TracePoint)
divverent [Wed, 23 Mar 2011 20:09:21 +0000 (20:09 +0000)]
make the endless loop run in 3 milliseconds (fixes BIH TracePoint)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10962 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=a6889a61c4e3f5ec4d52de6ae044dd65e588dd25

13 years agoenable another AABB overlap check, this time on point tests
havoc [Mon, 21 Mar 2011 07:10:16 +0000 (07:10 +0000)]
enable another AABB overlap check, this time on point tests

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10957 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=badbc6763d8235ec0e8524a14b8a2700dfbdc710

13 years agoincreased bih traceline speed by nearly 50% by enabling an additional
havoc [Mon, 21 Mar 2011 07:08:25 +0000 (07:08 +0000)]
increased bih traceline speed by nearly 50% by enabling an additional
AABB overlap check

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10956 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=afe0fd7999c486e0699fefb64ffcad97536a6dd8

13 years agoadded mod_collision_bih_childrengrouping cvar (default 16), this
havoc [Mon, 21 Mar 2011 06:14:02 +0000 (06:14 +0000)]
added mod_collision_bih_childrengrouping cvar (default 16), this
accelerates BIH traces by using a shallower tree

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10954 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=1fa82ae49ae155e5258c0675fb619922281d6439

13 years agoAdd R_LightPoint which is fast version of R_CompleteLightPoint that only grabs ambien...
vortex [Thu, 24 Mar 2011 23:13:40 +0000 (23:13 +0000)]
Add R_LightPoint which is fast version of R_CompleteLightPoint that only grabs ambient color to use with litsprites and particles. Fix bug in R_CompleteLightPoint (RTWORLD and DYNLIGHT wasnt processed if LP_LIGHTMAP flag is there). New trick for SPR_OVERHEAD (a bit of additional rotation).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10963 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=174b8bcffc1b69f555e9a978046240a4b072b1ab

13 years agofix PRVM error and warning backtrace display
divverent [Wed, 23 Mar 2011 19:57:52 +0000 (19:57 +0000)]
fix PRVM error and warning backtrace display

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10961 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=696df68aa50e287762e431cf89450be641599083

13 years agowe need one more glsl 130 compat ifdef...
divverent [Wed, 23 Mar 2011 10:36:16 +0000 (10:36 +0000)]
we need one more glsl 130 compat ifdef...

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10960 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=f7a68acbd5e61740a7f03bc6937e365a56801767

13 years agoGLSL shader: make dp_waterscroll work with dp_reflect and dp_refract
vortex [Tue, 22 Mar 2011 15:15:59 +0000 (15:15 +0000)]
GLSL shader: make dp_waterscroll work with dp_reflect and dp_refract

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10958 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=dbd8e60c7e473f960271f3f52d66382e205001db

13 years agofix some disabled code so that it could compile again
havoc [Mon, 21 Mar 2011 06:11:48 +0000 (06:11 +0000)]
fix some disabled code so that it could compile again

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10953 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0246a8a37d58c76e5124736ff4697b8af1a3cfa8

13 years agoswap out some _mm_stream_ps usage
eihrul [Sun, 20 Mar 2011 21:17:01 +0000 (21:17 +0000)]
swap out some _mm_stream_ps usage

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10952 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=5a5efde97975c74cd6bcd112202d8494c5324e04

13 years agofix an array index out of bounds error on
havoc [Sat, 19 Mar 2011 21:47:01 +0000 (21:47 +0000)]
fix an array index out of bounds error on
SHADERSTATICPARM_VERTEXTEXTUREBLEND_USEBOTHALPHAS

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10941 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=05bd75d2c2fd89278adea7b53fae425351f9446b

13 years agoremove CRLFs added by last commit
Rudolf Polzer [Sun, 20 Mar 2011 19:53:04 +0000 (20:53 +0100)]
remove CRLFs added by last commit

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10939 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ee0a2f637d2a39ad1838c6dc1f0597cbbd135d38

13 years agoAdd "Both Alphas" technique for VertexTextureBlend (use both layer alpha's for microb...
vortex [Sat, 19 Mar 2011 20:26:54 +0000 (20:26 +0000)]
Add "Both Alphas" technique for VertexTextureBlend (use both layer alpha's for microblending), toggled globally by "r_glsl_vertextextureblend_usebothalphas" cvar.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10937 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=129b7033f5fc1864d34031fcb35044409587a24f

13 years agoAdded JAM video decoder plugin, used by Blood Omnicide
vortex [Sat, 19 Mar 2011 20:47:35 +0000 (20:47 +0000)]
Added JAM video decoder plugin, used by Blood Omnicide

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10938 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0605cf082acb466ef480dd4fd4a3476c8d0f28c8