Commit graph

166 commits

Author SHA1 Message Date
Unknown W. Brackets
fd183715ec Vulkan: Decimate when there are many slabs.
This helps avoid one little texture holding onto a whole slab.

Won't change behavior when they are full, since then the cacheSizeEstimate
should be fairly high.
2018-04-06 21:42:32 -07:00
Henrik Rydgård
86966684d4 Vulkan: Remove the wrapper struct around VulkanTexture 2018-04-05 23:23:14 +02:00
Henrik Rydgård
f967e206b8 Remove the last remains of the idea that textures can be efficiently updated instead of recreated. Accidentally fixes #10697 somehow.
Also this is good for terminology, no more confusion with the texture
replacement facility :)
2018-03-25 10:50:37 +02:00
aliaspider
198c946218 remove unnecessary NULL assignment. 2018-03-23 04:14:10 +01:00
aliaspider
fc9a5ff65c prevent use-after-free. 2018-03-22 22:10:05 +01:00
Henrik Rydgård
22e28e218b
Merge pull request #10411 from hrydgard/gl-render-manager
GL render manager - new faster GL multithreading
2018-01-31 12:22:07 +01:00
Henrik Rydgård
c60c8ed68a Debug visualization for the Vulkan memory allocator. Shows some interesting behaviour. 2018-01-29 19:38:10 +01:00
Unknown W. Brackets
db0989a9d0 Debugger: Fix texture preview in GLES.
Also, fix issues with the first view of a texture in Vulkan / D3D11.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
b5e5d72a0a Complete the separation of depth and stencil renderpass flags 2017-12-30 22:52:22 +01:00
Unknown W. Brackets
d6da758ed3 GPU: Remove duplicate BACKEND constants. 2017-12-26 15:55:24 -08:00
Henrik Rydgård
dc6a4ea753 Fix annoying name clashes (Status is in X11 headers..) 2017-12-15 16:34:29 +01:00
Henrik Rydgård
2ebae034a4 Vulkan: Show samplers in "shader debug" 2017-12-07 09:28:18 +01:00
Henrik Rydgård
aa0cc6712f Clip block transfer destinations. Should fix crash in #10011. Stats: Invent some sort of usage metric for device memory allocators. 2017-12-03 15:00:25 +01:00
Henrik Rydgård
d0c248368d Use a VulkanDeviceAllocator for thin3d textures. Many devices have a hard limit on the total number of allocs and it's unnecessary to have the UI put pressure on that. 2017-12-03 10:29:41 +01:00
Henrik Rydgård
97bdc72d90 Vulkan: Only call EndCreate on the texture if it actually exists.. Though not having one would be bad. 2017-12-03 10:21:51 +01:00
Henrik Rydgård
971995fa3d Move aniso to the sampler cache key. 2017-11-15 19:07:41 +01:00
Henrik Rydgård
909fb6b3a4 Cleanups 2017-11-15 16:31:17 +01:00
Henrik Rydgård
65275c29b7 Share UpdateSamplingParams between D3D11 and Vulkan. Support lod bias in Vulkan. 2017-11-15 14:21:17 +01:00
Henrik Rydgård
b958432783 Properly zero samplercache keys before filling them out. 2017-11-15 14:21:17 +01:00
Henrik Rydgård
f564c59248 Mipmaps: Disable LOD bias in slope mode as that's not how it works.
Works around #9772
2017-11-15 14:21:17 +01:00
Henrik Rydgård
a0f1276a5c Vulkan: Use optimal alignment for texture uploads. May help stutter in #10105 ? 2017-11-13 17:18:12 +01:00
Unknown W. Brackets
e3b3828b15 TexCache: Check alpha before scaling.
This will be faster when scaling.  We no longer need to wait, since we
only care about full alpha now.
2017-11-12 16:19:28 -08:00
Unknown W. Brackets
9fbcc01afa TexCache: Remove simple 0/1 alpha check.
No practical optimizations have come of this, so it's a waste of time.
Slows down Vulkan too.
2017-11-12 16:17:46 -08:00
Unknown W. Brackets
fb65c7b87b Vulkan: Avoid checking texture alpha after scale.
Since we're decoding to mapped memory, we don't want to read from it if
possible, especially not a large amount of data like an upscaled texture.
2017-11-12 15:53:59 -08:00
Henrik Rydgård
3cc5d8f40a More minor vulkan fixes and cleanups. Don't actually call "Resized" if the size stays the same. 2017-11-10 12:41:06 +01:00
Henrik Rydgård
6eb58b1252 Keep the draw context up to date in a bunch of places. More logging. 2017-11-09 16:28:22 +01:00
Unknown W. Brackets
fc32a7b24e Vulkan: Show textures in GE debugger. 2017-11-06 00:29:01 -08:00
Henrik Rydgård
2b7d1c1ded Vulkan: Fix bug in depal causing Sonic Rivals to be grayscale. 2017-11-05 10:37:22 +01:00
Henrik Rydgård
066ad46915 Minor depal state dirtying fix 2017-11-05 10:20:18 +01:00
Henrik Rydgård
96cd368878 Make VulkanTexture "immutable". 2017-11-01 08:49:48 +01:00
Henrik Rydgård
6a8f72a327 Use the global curFrame counter. No need for a vector for pushing cmdbufs. 2017-11-01 08:47:50 +01:00
Henrik Rydgård
ed2731d197 Vulkan: Fix depal and shader blending. 2017-10-31 12:35:00 +01:00
Henrik Rydgård
07dfda0633 Vulkan depal code now passes validation, but produces black. 2017-10-31 12:35:00 +01:00
Henrik Rydgård
3f503ca297 Implement the rest of Vulkan framebuffer depal. Not yet working though. 2017-10-31 12:34:59 +01:00
Henrik Rydgård
65e23bb9f3 Some reorganization. Start implementing framebuffer depal for Vulkan. 2017-10-31 12:34:31 +01:00
Henrik Rydgård
0a0494ef8e It builds! With some shortcuts, of course. 2017-10-26 10:56:59 +02:00
Henrik Rydgård
4a30aedc53 Unify and move around code to cleanup some debug accessors 2017-10-18 13:10:05 +02:00
Henrik Rydgård
3757070fe2 Extra safety when switching GPU backends, fix possible Vulkan shutdown issue. Should help #10005 2017-10-09 12:17:54 +02:00
Henrik Rydgård
2f85e6516e Minor optimizations (use the new hashmap in a few more places) 2017-08-20 19:18:46 +02:00
Unknown W. Brackets
f66ffb9ffe GPU: Fix negative mip levels with const workaround.
Might've crashed if it hit a negative level before.
2017-05-31 21:42:07 -07:00
Unknown W. Brackets
b6375638f5 GPU: Block mipmap autogen for matching size.
If the mips don't get smaller, we can't autogen - the bias in that case is
used to select a different texture.  Fixes #9731.

This also may improve a minor performance issue on PowerVR in some games.
2017-05-31 21:23:20 -07:00
Henrik Rydgård
44423f3ba2 Vulkan: Implement BlitFramebuffer 2017-05-30 09:38:09 +02:00
Henrik Rydgård
137b79c708 Fix more review comments. 2017-05-30 09:38:05 +02:00
Henrik Rydgård
c173da49d3 Fix a number of bugs and stuff affecting Vulkan on Mali 2017-05-30 09:36:17 +02:00
Henrik Rydgård
f49384ca73 Vulkan: Fix binding framebuffers as textures 2017-05-30 09:36:17 +02:00
Henrik Rydgard
32728553bd Further steps towards Vulkan framebuffer support 2017-05-30 09:36:17 +02:00
Henrik Rydgård
1b05a54800 Remove the Mipmap setting. One step forward for #8171 2017-05-26 10:21:20 +02:00
Unknown W. Brackets
c4d1863ded GPU: Consistently bias const mip levels.
Since SLOPE is just a more complicated CONST, we can treat them the same.
2017-05-12 20:30:47 -07:00
Henrik Rydgård
5a8e9c4f71 Port some accessors over from #9255 to be able to catch these changes and dirty state later. 2017-04-03 17:04:58 +02:00
Henrik Rydgard
97058b4db7 Apply the D3D11 loco roco fix identically to the other backends
To make centralization easier, and this should be a problem for the
other backends as well.
2017-04-01 21:17:58 +02:00