Commit graph

483 commits

Author SHA1 Message Date
Sam Cake
f4ed635725 Fix bug in clearFramebuffer with Stencil Buffer 2017-06-12 22:59:42 -07:00
Sam Cake
f973f7b5e3 Fix the background not rendering on the second frame, this was imply due to a bug in the GLBackend 2017-06-12 21:25:27 -07:00
samcake
4c8eec4e16 Introducing a way to prevent a frame to render in stereo accross batches 2017-06-08 17:38:26 -07:00
Sam Cake
d19956f93c Fixing warnings 2017-05-31 22:02:47 -07:00
samcake
f2f4ad28e8 removing comments not needed anymore 2017-05-23 14:16:42 -07:00
samcake
2be1e36c47 fixing the gl41 bug 2017-05-23 14:14:45 -07:00
samcake
542ec3dc46 More clean up per review request 2017-05-23 11:36:06 -07:00
Sam Cake
2301954d62 fixing the Populated metric 2017-05-22 23:40:23 -07:00
samcake
653abf0ee3 brining the new counters to 4.1 2017-05-22 17:34:06 -07:00
samcake
e0487f7e04 Solving the size evaluation for compressed format 2017-05-22 16:51:54 -07:00
Brad Davis
3995f539cf Merge pull request #10500 from Atlante45/feat/bc7
Add BC7 compression support
2017-05-22 16:47:27 -07:00
samcake
e4f9f2935e Solving the size evaluation for compressed format 2017-05-22 15:42:18 -07:00
Brad Davis
afee753570 Prevent ping-ponging of texture quality when oversubscribed 2017-05-22 09:52:18 -07:00
Sam Cake
1f090d8148 Debugging the size problem and fixing the compression size evaluation 2017-05-22 01:00:34 -07:00
samcake
c449229850 Cleaned up the counters for memory 2017-05-19 17:52:56 -07:00
Atlante45
a8b1a29a4a Add support for BC7 compression 2017-05-18 13:11:41 -07:00
samcake
80b6fd65ae Cleaning up counters and naming schemes... 2017-05-17 18:31:28 -07:00
Brad Davis
ee1fd69316 Fixing crash in texture transfer logic, again 2017-05-09 21:24:58 -07:00
Brad Hefta-Gaub
d52daf3445 Merge pull request #10378 from samcake/orange
Adding a test to protect Uniform Buffer binding at wrong slot
2017-05-08 11:16:56 -07:00
Chris Collins
fd836dcd68 Merge pull request #10366 from Atlante45/feat/normal-map-compression
Feat/normal map compression
2017-05-05 10:03:01 -07:00
Atlante45
10289f5423 Format non compressed normal maps to new format. 2017-05-04 10:33:34 -07:00
samcake
389d9405f9 Showing the comments 2017-05-04 10:18:14 -07:00
samcake
3f977a6743 Add a simple check on the uniform buffer slot to make sure it s valid 2017-05-04 10:16:33 -07:00
samcake
26441dbf2f Merge branch 'master' of https://github.com/highfidelity/hifi into ambient 2017-05-03 14:54:11 -07:00
Sam Gateau
8507fffcc2 Merge pull request #10313 from samcake/ambient-bis
Fixing the the mip gpu copy for compressed format texture in GL41Backend
2017-05-03 14:50:55 -07:00
samcake
c583ffbac4 Clean up names and comments 2017-05-03 11:30:09 -07:00
samcake
84305c2049 Fixing the by region update of the compressed texture to match the 4 x 4 tiles alignment 2017-05-02 17:30:31 -07:00
samcake
0ecf599267 Adressing the warning 2017-05-02 17:19:22 -07:00
samcake
dc50db7ee5 One more warning from gcc 2017-05-02 16:27:28 -07:00
samcake
41f0b1682e Fixing warnings too 2017-05-02 14:45:41 -07:00
samcake
32d675c82b Clean up the new code and adress review comments 2017-05-02 11:46:51 -07:00
Sam Cake
54ace01cd6 Factorizing the code on both 45 and 41 backend 2017-05-02 00:32:32 -07:00
samcake
8b62fad85e TRying to test with sysmem and still doesn;t work 2017-05-01 18:19:07 -07:00
Brad Davis
f81d01f179 Prevent possible crash in texture buffering thread 2017-05-01 14:13:59 -07:00
Sam Cake
3abd9f21e8 Debugging without understanding... 2017-05-01 13:50:19 -07:00
samcake
04895864b5 Factorizing the code... 2017-04-28 17:34:15 -07:00
samcake
bfe8bc7593 Adding the 45 codepath for debug 2017-04-28 16:52:43 -07:00
samcake
d0fa8fe887 Debuging the bad transfers... 2017-04-28 12:26:44 -07:00
samcake
8240c3f761 Fixing the spam issue triggered by the external textures, removed 2 warnings 2017-04-27 18:05:52 -07:00
samcake
7c15609136 Fixing the broken texture copy (during texture streaming) for compressed format in GL41Backend 2017-04-27 17:28:10 -07:00
samcake
69a90d6f86 work in progress 2017-04-27 11:24:09 -07:00
Sam Cake
d99f635880 still finding a good implementation for the compressed texel copy 2017-04-27 02:08:48 -07:00
Sam Cake
63c5eea26a merging with the new master 2017-04-26 22:39:46 -07:00
Brad Davis
7be40a48a1 Merge branch 'master' into fix_stored_size 2017-04-26 19:08:04 -07:00
samcake
4f8f3a8656 debugging the mip not beeing copied correctly on 4.1 2017-04-26 18:50:28 -07:00
Brad Davis
fa0fb11329 Remove uneeded memory to memory copy for mip transfers 2017-04-26 17:14:39 -07:00
Ryan Huffman
4395cd7ee1 Update hasPendingTransfers to not touch _pendingTransfers 2017-04-26 16:31:42 -07:00
Ryan Huffman
f509403b25 Update prioritization of memory pressure states 2017-04-26 16:31:42 -07:00
Ryan Huffman
7bb6010149 Fixup targetAllocatedMip inside gl textures 2017-04-26 15:09:26 -07:00
Ryan Huffman
1bd95ee19f Remove didQueueTransfer check from populateTransferQueue 2017-04-26 15:09:26 -07:00
Ryan Huffman
6a0474934c Fixup variabletexture ctors 2017-04-26 15:09:26 -07:00
Ryan Huffman
a71d246e75 Replace canPopulate with _minAllocatedMip 2017-04-26 15:09:26 -07:00
Ryan Huffman
b9ec573c8b Update gl41 an gl45 texture backends to take into account min avail mip 2017-04-26 11:21:43 -07:00
Ryan Huffman
4d48cb2e80 Remove extraneous glTextureParameteri logging 2017-04-26 10:49:23 -07:00
Ryan Huffman
f5bb42b19f Remove request of mip from GL45BackendVariableTexture 2017-04-26 10:49:23 -07:00
Ryan Huffman
65d30d1d0b Remove lowestRequestMip from gltexture 2017-04-26 10:49:23 -07:00
Ryan Huffman
51ee058c0b Update GLTexture to not promote if we can't populate 2017-04-26 10:49:23 -07:00
Ryan Huffman
382fe5d38d Update gpu backend to only transfer if it can populate 2017-04-26 10:49:23 -07:00
Ryan Huffman
6e307dd6eb Remove debug logging 2017-04-26 10:48:57 -07:00
Ryan Huffman
14f8c91e23 Adjust gl45 backend to request interest in mips and keep track of min requested 2017-04-26 10:48:57 -07:00
Ryan Huffman
970be9d2c5 Add check for canPopulate to gpu backend 2017-04-26 10:48:57 -07:00
Ryan Huffman
8d03d50d35 Cleanup progressive ktx debugging 2017-04-26 10:48:57 -07:00
Ryan Huffman
b2ff0a711e Replace canPromoteAndPopulate with multiple function calls 2017-04-26 10:48:24 -07:00
Ryan Huffman
7cab70deba Remove gl error logging 2017-04-26 10:48:24 -07:00
Ryan Huffman
d5f1e6fb37 Adjust handling of requested mips in gl backend 2017-04-26 10:48:24 -07:00
Ryan Huffman
472c888529 Fix handling of failed ktx downloads 2017-04-26 10:48:24 -07:00
Ryan Huffman
ce12a216c0 I think it might be working. 2017-04-26 10:48:24 -07:00
Ryan Huffman
70eaac8d6c Add persisting of ktx min mips available to ktx cache file 2017-04-26 10:48:24 -07:00
Ryan Huffman
5594e81fe4 Improve gl backend handling of unavailable mips 2017-04-26 10:48:24 -07:00
Ryan Huffman
20f4d14e07 Add compressed KTX size evaluation 2017-04-26 10:48:23 -07:00
Ryan Huffman
ab7099b3eb Add loading of lower mips to NetworkTexture 2017-04-26 10:47:32 -07:00
Ryan Huffman
cf3dc12542 Add object labels to GL objects and add ktx min mip kv 2017-04-26 10:47:32 -07:00
Ryan Huffman
aca7ad27c6 Fix ktx dependencies 2017-04-26 10:47:32 -07:00
Ryan Huffman
b20fcbfcdb Add a way to write data to a storage object 2017-04-26 10:45:50 -07:00
Ryan Huffman
00cbfa0f70 Add start of progressive ktx-loading 2017-04-26 10:45:50 -07:00
Atlante45
33f58f99d1 CR 2017-04-25 16:09:31 -07:00
Atlante45
1cc86b7203 Fix build error 2017-04-25 15:56:23 -07:00
Atlante45
77d8bf20a7 Fix warnings 2017-04-25 15:56:23 -07:00
Atlante45
d9a7615cc8 Add compression support for skyboxes 2017-04-25 15:56:23 -07:00
Atlante45
ae73cf4038 Add support for Grayscale and NormalMap textures 2017-04-25 15:56:23 -07:00
Atlante45
69a27d516f Fix roughness 2017-04-25 15:56:22 -07:00
Atlante45
5ceb30b69c Make sure mips are copied to memory 2017-04-25 15:56:22 -07:00
Atlante45
a450f52427 Start to setup image library 2017-04-25 15:56:22 -07:00
samcake
fe7cec1734 Testing on windows running 4.1 backend, all good 2017-04-25 12:04:12 -07:00
samcake
dff3a3bb34 fixing the mac crash 2017-04-25 11:34:01 -07:00
sam gateau
0a615f35a7 Merge branch 'master' of https://github.com/highfidelity/hifi into brown 2017-04-21 14:31:15 -07:00
Brad Davis
472835d65c Port fix from master 2017-04-19 11:22:20 -07:00
Brad Davis
bccc06d2fe Fix resource texture memory usage tracking 2017-04-19 10:35:19 -07:00
Brad Davis
2a2102c7fe Recompute memory pressure state after each promote / demote call 2017-04-18 15:12:34 -07:00
Sam Cake
96960a505d COmpleted the Resource Buffer, compilation and binding works. Now need to help on the shader side 2017-04-14 23:22:45 -07:00
Sam Cake
bb15b8c701 ANd fixing the gl41 rendering 2017-04-14 00:46:41 -07:00
Sam Cake
29545f0918 FInally bringing all the shader compilation related fuinctions in the Backend in the same cpp, making specialized version based on the Backend 2017-04-13 23:53:56 -07:00
samcake
d41f34ce8d Adding support for the resource buffer 2017-04-12 19:07:27 -07:00
Brad Davis
b2aa3271f7 Adding support for variable allocated textures to the GL 4.1 backend 2017-04-12 15:09:20 -07:00
samcake
c3c73b209a Fixing the bad rendering of the instanced primitives on 4.1 2017-04-03 11:49:00 -07:00
samcake
467ea787c6 Adress Seth's review 2017-03-31 14:54:00 -07:00
samcake
c8970dd704 Fixing the warning on windows 2017-03-31 11:34:03 -07:00
Sam Cake
61d78bc931 BRinging the cool texture management of the gl45 backend to gl41, which fixes the broken ao on 41 among other things 2017-03-30 23:29:37 -07:00
samcake
47e9668b8f improving the gl41 backend to mimic the gl45 2017-03-30 17:59:59 -07:00
samcake
25edb44b75 Fix the problem with the cursor and scattering, 2017-03-30 15:15:14 -07:00
Sam Cake
1c9bc2d71e Trying to debug the crash on gl4.1 2017-03-29 23:28:06 -07:00
samcake
b6504bba56 Moving the num mips per texture to the creator so it s immutable and simpler 2017-03-29 17:58:56 -07:00
samcake
a2b2e3e169 Revert "Revert "Don't hold KTX files open for longer than transfers require"" 2017-03-28 14:45:04 -07:00
samcake
08e1a2ba4c Revert "Don't hold KTX files open for longer than transfers require" 2017-03-28 14:06:09 -07:00
samcake
e42cb52bd1 Merge pull request #10020 from jherico/ktx_refactor
Don't hold KTX files open for longer than transfers require
2017-03-28 14:06:02 -07:00
Andrew Meadows
5fc1e97166 fix windows build of render-utils-test 2017-03-27 16:49:43 -07:00
Bradley Austin Davis
2cf7ba4119 Fixing pending transfer calculation 2017-03-27 16:34:08 -07:00
Bradley Austin Davis
638364497d Trying a different tactic to avoid multiple concurrent file access 2017-03-27 16:18:04 -07:00
Andrew Meadows
92b41d7a38 fix link error for linux build 2017-03-27 15:50:40 -07:00
Andrew Meadows
fcf18cba91 render pipeline support for normalized intergers 2017-03-27 14:40:31 -07:00
Bradley Austin Davis
f764cd614b Don't hold KTX files open for longer than transfers require 2017-03-27 13:33:00 -07:00
samcake
13b3809fe3 removing includes if possible 2017-03-24 11:04:52 -07:00
Sam Cake
022e91b35d Clean comments and pixel format used 2017-03-24 00:26:14 -07:00
samcake
618344fe98 Fixing the bug regarding the numMIps allocated by GLBackend and breaking the HalfRezDepthTexture 2017-03-23 18:10:09 -07:00
Brad Davis
3a40fd886f Fix comparison between GL stamps and GPU stamps 2017-03-22 18:11:20 -07:00
Brad Davis
893fcba283 Return the correct format and internal format combo for depth textures 2017-03-22 17:14:40 -07:00
Bradley Austin Davis
9051c84b6d Fix warnings 2017-03-03 14:16:27 -08:00
Bradley Austin Davis
47087add15 Add support for fallback textures, throttling texture creation 2017-03-03 09:00:12 -08:00
Bradley Austin Davis
8db74413fd Fix comment in GLBackend 2017-03-03 09:00:12 -08:00
Brad Davis
cd8bba47cf Add pending texture transfer size to tracked stats 2017-02-24 12:39:38 -08:00
Brad Davis
3d2e6713ee Ensure complete population of allocated mip levels 2017-02-24 12:04:17 -08:00
Brad Davis
b8e1340a0d Enable threaded texture buffering 2017-02-23 16:08:29 -08:00
sam
fbb0a24c4f FIxing the bug preventing to deserialize normals, clean up the ktx usage of the storage::Storage class and cleaning up somewhat the Qt pixel formats used 2017-02-23 02:08:46 -08:00
samcake
e8835b34f4 fix issues while testing the ktxStorage 2017-02-22 19:05:20 -08:00
Brad Davis
05efac9ddf Add compile time toggle for threaded buffering 2017-02-22 15:42:51 -08:00
Zach Pomerantz
be4a9dcd5a clear buffer without rref 2017-02-21 14:50:12 -05:00
samcake
5e307f247e Add support for the R8 textures 2017-02-21 10:46:49 -08:00
Brad Davis
27e8750b9b Adding new storage backing for gpu::Texture, moving mip format into Storage abstraction 2017-02-19 18:11:56 -08:00
Brad Davis
eafe0a04d5 Fix transfer buffering 2017-02-17 13:00:38 -08:00
Brad Davis
1f058f069e First pass at new texture transfer logic 2017-02-17 07:53:51 -08:00
Brad Davis
75c17e89a2 Fix OpenGL 4.1 texture loading 2017-02-17 07:53:24 -08:00
Brad Davis
066a6483a0 Code comments 2017-02-17 07:53:23 -08:00
Brad Davis
439cb388f2 Increase the rate of work queue processing 2017-02-17 07:53:22 -08:00
Brad Davis
35a6359d59 Fixing transfer logic, adding stats display & profile ranges 2017-02-17 07:53:21 -08:00
Brad Davis
283ff01038 Remove duplicate code, polish 2017-02-17 07:53:20 -08:00
Brad Davis
0d89b3a922 Better sampler handling 2017-02-17 07:53:19 -08:00
Brad Davis
fe5c511eeb Fix texture count 2017-02-17 07:53:18 -08:00
Brad Davis
1238edd0d7 Add incremental transfers for large mips 2017-02-17 07:53:17 -08:00
Bradley Austin Davis
7fb7aa87eb Working on new texture management strategy 2017-02-17 07:53:16 -08:00
samcake
e11d10f5d4 Reparing broken normals and also fixing the ambient lighting bug 2017-02-08 16:56:59 -08:00
samcake
9e95944195 clean the usage of glCopyImageSubData and provide a fall back for 4.2) 2017-02-08 11:36:34 -08:00
samcake
8a40e951ac clean the usage of glCopyImageSubData and provide a fall back for 4.2) 2017-02-08 11:35:50 -08:00
samcake
7b49f548ed trying to remove the 24bits formats 2017-02-07 18:06:49 -08:00
samcake
27dab5c4ba COmbining more intrumentation, mip generation on cpu and an improved blit for the derez case 2017-02-03 12:03:59 -08:00
Bradley Austin Davis
8d45f43ba8 Disable sparse textures 2017-01-27 10:06:31 -08:00
Bradley Austin Davis
70664b64eb Attempt to account for sparse texture memory overhead 2017-01-25 10:59:49 -08:00
Brad Davis
1dd2747ef9 Push some tracing into 'detail' categories for easy filtering. Add new tracing categories, add counter change tracking. 2017-01-10 10:44:04 -08:00
Christoph Haag
966cbb768d fix GL 4.5 when glTextureSubImage2DEXT unavailable
For example mesa
2016-12-23 01:26:54 +01:00
Brad Hefta-Gaub
dbbed462b4 cleanup naked qDebug() calls 2016-12-19 22:24:25 -08:00
Brad Davis
30a9961362 tracing polish 2016-12-16 14:02:27 -08:00
Ryan Huffman
7bb2755913 Add chrome tracing support 2016-12-16 01:14:01 -08:00
samcake
ff39ec6753 fix a potential crash if the current shaderObject is null 2016-12-01 10:51:32 -08:00
Brad Hefta-Gaub
e0bcbb08ff Merge pull request #9134 from samcake/blue
Fix a bug when using the gpu::Batch::_glUniform*() calls  with a bad location
2016-12-01 09:03:56 -08:00
sam
3d29187156 FIx a potential bug when using _glUniform calls with an invalid location 2016-12-01 02:44:04 -08:00
sam
6342762fde FIx a potential bug when using _glUniform calls with an invalid location 2016-12-01 02:39:52 -08:00
samcake
c3db2704ed Merge pull request #9126 from jherico/gl_debugging
Working on OpenGL debuggability
2016-11-30 10:51:58 -08:00
Brad Davis
3b07e31eab Working on OpenGL debuggability 2016-11-29 13:15:56 -08:00
samcake
803a399bb6 Merge branch 'master' of https://github.com/highfidelity/hifi into red 2016-11-28 11:58:17 -08:00
samcake
1974ded050 Potentially address the crash when no vertex format is specified 2016-11-23 16:37:06 -08:00
samcake
c494479290 Merge branch 'master' of https://github.com/highfidelity/hifi into hdr 2016-11-22 10:16:08 -08:00
Brad Davis
728f8aa238 Reduce logspam, change some debug output to warning 2016-11-21 11:56:32 -08:00
samcake
9031e65aa5 Merge and fix the bug!!! 2016-11-16 19:12:56 -08:00
samcake
982664dac5 Merging with upstream 2016-11-15 18:14:25 -08:00
samcake
9267f4eaaf Fix the merge with upstream and the new stereo drawcall, fix the timer reporting on mac and fix the openGLChecker quicking on mac 2016-11-15 00:40:39 -08:00
Brad Hefta-Gaub
86430e4121 Merge pull request #8960 from samcake/red-backup-many-stereo-paths
Introduce Instanced Stereo Drawcall
2016-11-14 18:30:42 -08:00
samcake
07e8238b0e REmove uneeded macros 2016-11-14 12:09:44 -08:00
samcake
f3e1ed4b88 Merging and cleaning up the code path for the 2 flavors of gl 2016-11-14 11:57:00 -08:00
samcake
b888af15e4 Fix merge 2016-11-14 11:15:27 -08:00
samcake
a05e42138c Merge branch 'master' of https://github.com/highfidelity/hifi into hdr 2016-11-14 09:58:12 -08:00
Seth Alves
804f25740d these qDebugs happen too late and cause a crash 2016-11-13 10:21:27 -08:00
samcake
00addcad9e Merge branch 'master' of https://github.com/highfidelity/hifi into hdr 2016-11-10 17:57:34 -08:00
samcake
784a0540ed Merge branch 'master' of https://github.com/highfidelity/hifi into hdr 2016-11-10 10:05:03 -08:00
Brad Davis
db98a742b6 Remove incremental transfers 2016-11-10 08:35:35 -08:00
Brad Davis
f7d1b3c823 Fix non-incremental transfers when sparse enabled 2016-11-09 12:13:35 -08:00
Brad Davis
192c72ff99 Update menu, initial state for texture management 2016-11-09 12:09:25 -08:00
Bradley Austin Davis
9e929ca629 Re-enable downsampling for non-sparse textures 2016-11-09 12:09:24 -08:00
sam
bcef138545 FIx the context stats 2016-11-04 18:59:30 -07:00
samcake
f274ef1a59 Merging back with upstream and trying to fix counter for them to be more stable 2016-11-04 16:56:03 -07:00
samcake
e12040a98a Merge branch 'master' of https://github.com/highfidelity/hifi into hdr 2016-11-04 14:54:18 -07:00
Brad Hefta-Gaub
7cca8f0a66 Merge pull request #8993 from samcake/blue
Prevent sparse texture on AMD gpus for now
2016-11-03 16:48:52 -07:00
samcake
1086585559 fixing the test to actually capture ati correctly and add the report to the ui 2016-11-03 15:15:05 -07:00
samcake
ce89f811f3 better loggin of the sparse switch 2016-11-03 14:35:44 -07:00
samcake
4104aa6286 avoid warning? 2016-11-03 14:31:28 -07:00
Brad Hefta-Gaub
c1841f9add more conservative texture memory budget 2016-11-03 14:10:07 -07:00
samcake
6a39ad3b5a Prevent sparse texture on AMD gpus for now 2016-11-03 13:01:41 -07:00
samcake
6926cd274c Merge with upstream 2016-11-02 18:15:08 -07:00
samcake
d5f44befc6 Merge branch 'master' of https://github.com/highfidelity/hifi into red-backup-many-stereo-paths 2016-10-31 17:41:07 -07:00
samcake
37b3c96131 fixing the lighting problem in stereo 2016-10-31 17:40:34 -07:00
samcake
c21fe00cfc Avoid messaging for render targets 2016-10-28 11:40:10 -07:00
samcake
d66d5af688 Enabling the uniform mappings 2016-10-28 10:47:06 -07:00
samcake
9d2043cc3c Porting and potentially fixing the stereo drawcall, still not perfrect ork in progress 2016-10-27 17:49:10 -07:00
samcake
5bdfceebc5 BRingin back the stereo code path 2016-10-26 18:35:47 -07:00
Brad Davis
78d55011a4 Limit sparse textures to 1 GB for now 2016-10-25 17:47:41 -07:00
samcake
507d3e5a39 IMprove the counting and namoing of the new couters the gl swapchain 2016-10-25 12:28:07 -07:00
samcake
58b81e3b0c Adding counter for the amount of memory used in texture for Framebuffers 2016-10-24 18:34:16 -07:00
Brad Davis
7900fd3e18 New texture memory scheme 2016-10-24 13:10:41 -07:00
Brad Davis
7879bf37f2 Fix typo in comment 2016-10-22 18:12:40 -07:00
Brad Davis
b572fb2a91 Only use sparse texture memory for the memory pressure calculation (since that's all we can modify) 2016-10-22 14:49:10 -07:00
Brad Davis
62de2af944 Add more GPU stats, make stats easier to read 2016-10-22 14:38:46 -07:00
Brad Davis
0be1f82bbc Fix AMD crash caused by missing glFlush 2016-10-15 15:28:28 -07:00