Commit graph

146 commits

Author SHA1 Message Date
Ryan Huffman
7999ed6f60 Fix Resource::refresh for NetworkTexture 2017-05-03 11:26:52 -07:00
Ryan Huffman
0263021c0c Fix loaded being reset to false for KTX resources 2017-05-03 11:26:52 -07:00
Ryan Huffman
4b0bd80c27 Fix NetworkTexture not cleaning itself up on destruction 2017-04-27 13:03:42 -07:00
ZappoMan
c0df82ff69 Merge branch 'master' of https://github.com/highfidelity/hifi into retrySkeletonURL 2017-04-26 18:49:24 -07:00
Ryan Huffman
70b816827e Improve handling of KTX downloads in NetworkTexture 2017-04-26 10:48:24 -07:00
Ryan Huffman
11751611e1 Update NetworkTexture to track current KTX download state 2017-04-26 10:48:23 -07:00
Ryan Huffman
ccd9c4697b Add extended ktx header/high-mip request handling to NetworkTexture 2017-04-26 10:45:50 -07:00
Ryan Huffman
105d17e85e Add byte range support to HTTPResourceRequest 2017-04-26 10:45:14 -07:00
ZappoMan
f07884602a more CR feedback 2017-04-21 13:13:29 -07:00
ZappoMan
f133713d0e CR feedback 2017-04-21 10:21:34 -07:00
ZappoMan
e89b6c5d2c some initial debugging on tpose avatars 2017-04-20 17:26:31 -07:00
Seth Alves
a1cab2c0d1 working toward fixing compound hulls 2017-04-09 17:23:56 -07:00
Brad Davis
127a014b46 Clear caches on domain switch 2017-02-15 15:21:08 -08:00
Andrew Meadows
b3ae6f9aec cap size of textures from FBX files 2017-02-06 11:53:37 -08:00
Brad Davis
e58623bcc0 Working on test/trace script interface 2016-12-22 11:46:40 -08:00
Ryan Huffman
7bb2755913 Add chrome tracing support 2016-12-16 01:14:01 -08:00
Anthony J. Thibault
839b1a3c5e Added some jsdoc comments to the C++ source 2016-11-09 18:09:10 -08:00
Andrew Meadows
ef597265d7 remove unimplemented declaration 2016-08-24 22:26:56 -07:00
Brad Davis
5cdb30357f Add checking for failed downloads in the textures 2016-08-24 18:03:56 -07:00
Zach Pomerantz
09d879e19f Remove delayLoad 2016-05-09 18:09:48 -07:00
Zach Pomerantz
9ac783a88d Black box asynch resource retrieval 2016-05-09 18:03:19 -07:00
Brad Hefta-Gaub
22081a8606 Merge pull request #7833 from zzmp/fix/scriptable-resource
Fix prefetching
2016-05-09 15:09:20 -07:00
Brad Hefta-Gaub
312ea20e15 Merge pull request #7797 from zzmp/fix/cache-thread-safety
Make ResourceCache::resetResourceCounters threadsafe
2016-05-09 11:52:57 -07:00
Zach Pomerantz
3f4f10a27e Fix prefetch state changes 2016-05-06 15:08:45 -07:00
Zach Pomerantz
79c8001d7a Audit thread safety of ResourceCache 2016-05-05 11:17:38 -07:00
Zach Pomerantz
854c0ea3e3 Clean out updateMemoryCost 2016-04-27 19:20:43 -07:00
Zach Pomerantz
1e8d45aecb Put ScriptableResource state enum in prototype 2016-04-27 19:20:43 -07:00
Zach Pomerantz
0c78d5bdd1 Change ScriptableResource signal to state 2016-04-27 19:20:42 -07:00
Zach Pomerantz
069065dc23 Fix recursive invokes of ResourceCache::prefetch 2016-04-21 17:15:11 -07:00
Zach Pomerantz
2fd88d9fe1 Add sanity check to ResourceCache::updateTotalSize 2016-04-21 10:45:51 -07:00
Zach Pomerantz
cba5bff89e Make ResourceCache::prefetch private and comment 2016-04-21 10:33:35 -07:00
Zach Pomerantz
92e372f385 Expose Resource progress as a signal 2016-04-20 20:18:22 -07:00
Zach Pomerantz
1a0a623d5f Report ScriptableResource memory cost to engine 2016-04-20 20:18:22 -07:00
Zach Pomerantz
5ec82fa43d Add release invokable to ScriptableResource 2016-04-20 20:18:22 -07:00
Zach Pomerantz
825431829d Add url property to ScriptableResource 2016-04-20 20:18:22 -07:00
Zach Pomerantz
df4857947b Add prefetch overload for texture specificity 2016-04-20 20:18:22 -07:00
Zach Pomerantz
8ad8b5d0d9 Return ScriptableResource from prefetch 2016-04-20 20:14:15 -07:00
Zach Pomerantz
74e1f817a5 Add prefetch to all resource caches 2016-04-20 20:14:15 -07:00
Zach Pomerantz
fc9de4b7e6 Merge branch 'master' of github.com:highfidelity/hifi into fix/cache-tallies 2016-04-15 00:37:03 -07:00
Atlante45
b3b2f98f6c Merge branch 'master' of https://github.com/highfidelity/hifi into fix/clear-atp-cache 2016-04-14 17:59:36 -07:00
Atlante45
4ed8573f74 CR 2016-04-14 17:28:24 -07:00
Zach Pomerantz
32e9c49cf0 Fix cache tallies for uncached resources 2016-04-14 17:00:20 -07:00
Atlante45
0f62d5c997 clear ATP assets on domain change 2016-04-12 15:30:53 -07:00
Atlante45
7c652aa3ca Add lock on ResourceCache data structs 2016-04-12 15:30:39 -07:00
Atlante45
e45939d18f Make sure ResourceCacheSharedItems deals with strong refs 2016-04-12 13:51:11 -07:00
Atlante45
afdfef1482 Make sure we don't use raw resource ptr 2016-04-12 13:51:11 -07:00
Zach Pomerantz
107cfcf10b Change Resource setBytes->setSize 2016-04-04 13:59:57 -07:00
Zach Pomerantz
f34e951c3f Make resource cache props thread-safe 2016-04-04 13:59:56 -07:00
Zach Pomerantz
3c86191a59 Add resources prop to caches 2016-04-02 17:37:51 -07:00
Zach Pomerantz
b70a4d043b Expose resource cache count props 2016-04-01 19:52:42 -07:00
Zach Pomerantz
d72c695417 Sanitize ResourceCache to expose to JS/QML
fix sanitize
2016-04-01 17:42:36 -07:00
Zach Pomerantz
b80f0fc8a6 Add actual byte size to Resource 2016-03-31 17:02:40 -07:00
Zach Pomerantz
9d3abe5513 Release texs when models are cached 2016-03-31 17:02:40 -07:00
Zach Pomerantz
aad40f5de0 Drop network data after processing 2016-03-25 09:58:34 -07:00
Brad Hefta-Gaub
cd5beabf10 Revert "Drop resource data after load" 2016-03-24 20:37:16 -07:00
Zach Pomerantz
afc853572a Drop resource data after load 2016-03-24 15:50:51 -07:00
Andrew Meadows
21c770f37b Merge pull request #7441 from zzmp/clean/resource-reinsert
Restrict Resource reinsertion
2016-03-24 08:41:12 -07:00
Zach Pomerantz
8b1a78bac0 Restrict Resource reinsertion 2016-03-23 13:00:29 -07:00
Zach Pomerantz
17aa2845a8 Add finished signal to Resource loading 2016-03-23 13:00:02 -07:00
Bradley Austin Davis
16e6d9a4f9 Make shared lists thread safe 2016-03-18 11:15:35 -07:00
Mark Johnson
b7a47d7bf2 Tabs -> Spaces 2016-03-12 17:35:57 -08:00
Mark Johnson
d868b541c4 Separate the request limit value from the active request value
Use _requestLimit as the download limit, and track active downloads using
_requestsActive.  If the limit is changes below the active count, it will
continue downloading all active requests, but not allow new requests until
the active count gets below the limit.  If the limit increases, the pending
request queue will be checked immediately to fill the available download slots.
2016-03-12 17:19:29 -08:00
Zach Pomerantz
54af58834a Mark Resource loaded after postprocessing 2016-03-09 10:34:07 -08:00
Zach Pomerantz
925ea8bcda Add Resource::isCacheable 2016-03-08 13:30:58 -08:00
Atlante45
9678e70444 Asset caching 2015-09-16 15:17:15 +02:00
Andrew Meadows
b6cef3d1a9 fix Qt includes 2015-09-08 18:19:33 -07:00
Stephen Birarda
9878143661 repairs to ShaderCache for Resource changes 2015-09-08 08:58:35 -07:00
Ryan Huffman
269d5bb6da Resolve bugs with *Cache changes 2015-08-26 14:04:55 -07:00
Ryan Huffman
aa7d8678e1 Merge branch 'protocol' of github.com:birarda/hifi into atp-server 2015-08-26 12:26:11 -07:00
Anthony J. Thibault
1b3d7fabc8 ResourceCache, NetworkGeometry and Model refactoring and optimizations.
* Removed validation logic from Resource class, Qt does this internally and is more
  standards compliant.  This should result in more accurate caching and faster resource
  fetching when cache is stale and validation fails.
* Added loaded and failed slots to Resource class, so it does not have to be polled.

* NetworkGeometry now uses multiple Resource objects to download
  the fst/mapping file and the fbx/obj models.
* NetworkGeometry is no longer a subclass of Resource
* NetworkGeometry now has signals for success and failure, you no longer
  have to poll it to determine when loading is complete (except for textures *sigh*)

Some functionality was removed

* NetworkGeometry no longer has a fallback
* NetworkGeometry no longer loads LODs or has lod logic.
* The number of FBXGeometry copies is greatly reduced.

* Model::setURL no supports fallback URL, delayLoad or retainCurrent option.
  This can result in a pop when switching avatars, and there's no longer a default
  if avatar loading fails.
2015-08-20 18:59:51 -07:00
Ryan Huffman
4827d326f4 Update ResourceCache to allow multiple downloads on the same resource 2015-08-19 12:11:47 -07:00
Ryan Huffman
ccc0000fd0 Update ResourceCache to use ResourceRequest 2015-08-03 16:26:16 -07:00
Atlante45
6c591131ba Made Animations safe for resource reload 2015-07-10 12:01:51 -07:00
Atlante45
90edf055f7 Clear unused resources before refresh 2015-07-09 18:00:07 -07:00
Atlante45
ee3a8b1b6e Clear resource caches instead of restarting 2015-07-08 18:23:16 -07:00
David Rowe
154dacf791 Fix typo 2015-03-31 14:21:56 -07:00
Seth Alves
7da87d6e15 set up a way to request ResourceCache downloads from a non-networking thread. 2015-03-26 18:37:55 -07:00
Seth Alves
069c358aa3 Work around a deadlock:
thread 15 locks Octree
thread 1 blocks waiting for Octree lock
thread 15 tries to pass a message to thread 1 with QMetaObject::invokeMethod, and hangs

thread 15 is blocked on qt message passing to thread 1
  ResourceCache::getResource                       libraries/networking/src/ResourceCache.cpp:57
  GeometryCache::getGeometry                       libraries/render-utils/src/GeometryCache.cpp:1774
  ModelEntityItem::isReadyToComputeShape           libraries/entities/src/ModelEntityItem.cpp:431
  PhysicsEngine::addEntityInternal                 libraries/physics/src/PhysicsEngine.cpp:67
  EntitySimulation::addEntity                      libraries/entities/src/EntitySimulation.cpp:129
  EntityTree::postAddEntity                        libraries/entities/src/EntityTree.cpp:91
        ^ locks simulation
  EntityTreeElement::readElementDataFromBuffer     libraries/entities/src/EntityTreeElement.cpp:773
  Octree::readElementData                          libraries/octree/src/Octree.cpp:301
  Octree::readElementData                          libraries/octree/src/Octree.cpp:354
  ...
  Octree::readBitstreamToTree                      libraries/octree/src/Octree.cpp:439
  OctreeRenderer::processDatagram                  libraries/octree/src/OctreeRenderer.cpp:136
        ^ lockForWrite Octree::_lock
  OctreePacketProcessor::processPacket             interface/src/octree/OctreePacketProcessor.cpp:91
  ReceivedPacketProcessor::process                 libraries/networking/src/ReceivedPacketProcessor.cpp:51

thread 1 is blocked on lockForWrite of Octree::_lock
  Octree::lockForWrite                             libraries/octree/src/Octree.h:292
  EntityTree::update                               libraries/entities/src/EntityTree.cpp:668
        ^ lockForWrite on Octree:_lock
  EntityTreeRenderer::update                       libraries/entities-renderer/src/EntityTreeRenderer.cpp:258
  Application::update                              interface/src/Application.cpp:2189
        ^ calls _physicsEngine.stepSimulation() before this
  Application::idle                                interface/src/Application.cpp:1535
  timer
2015-03-17 11:38:42 -07:00
Seth Alves
019ea55d24 minimize diff 2015-03-15 08:21:57 -07:00
Seth Alves
89b58e2681 trying to get loaded callback for model hooked up to PhysicsEngine 2015-03-13 09:11:15 -07:00
Atlante45
1b7fdf5d16 Improve disk cache usage
Now we always load from the disk cache if the file is in there.
	Then we check the last modidied date from the network file
against the one in the cache.
	If needed, we redownload.
2015-03-05 18:49:52 +01:00
ZappoMan
4061e14c2d move static members of ResourceManager into DependencyManager 2015-02-04 13:24:37 -08:00
Atlante45
80af2adf12 Remove constexpr because windows can't handle them 2015-01-12 16:42:27 -08:00
Atlante45
8415098fc2 Set different caches size depending on cache type 2015-01-12 15:36:36 -08:00
Atlante45
e70e435dcc Added Min/Max values for cache size 2015-01-12 12:45:13 -08:00
Atlante45
81bf1e4f53 Some code maintainance 2015-01-12 11:46:38 -08:00
Atlante45
bad96e0ba4 cache size getter/setter 2015-01-12 11:37:42 -08:00
Atlante45
ea0ffd0125 Introduce reserveUnusedResource 2015-01-12 11:37:00 -08:00
Atlante45
cb3f07e6f5 Remove unusedResourcesMaxCount 2015-01-12 11:18:55 -08:00
Atlante45
5cdc76ad35 Put cache max size/count as class members 2015-01-11 22:48:42 -08:00
Atlante45
77e4a2ef35 Add byte limit to chaches 2015-01-08 17:06:05 -08:00
Andrzej Kapolka
fecb225a06 Prevent erroneous resource download percentages; Qt reports the total bytes as
-1 before the actual size is available.
2014-12-03 12:55:58 -08:00
ZappoMan
fdc5aa1da5 include urls with texture names, make sure to wait till default textures loaded before setting new textures 2014-11-07 09:54:13 -08:00
Andrzej Kapolka
70847ff3f9 Allow painting boxes that aren't grid-aligned; merged color and material
tools.
2014-09-30 14:53:19 -07:00
barnold1953
814dd0fcb6 Fixed another crash relating to undo stack. Made script support the
VoxelViewer
2014-07-18 11:37:13 -07:00
Atlante45
15b37ec3d1 Switched ResourceCache to NetworkAccessManager 2014-07-02 11:21:07 -07:00
Renamed from libraries/shared/src/ResourceCache.h (Browse further)