Commit Graph
3842 Commits
Author SHA1 Message Date
Henrik Rydgård 6831f6fc46 Merge pull request #8650 from unknownbrackets/vulkan-buf
Vulkan: Cache only device in push buffers
2016-03-21 08:27:50 +01:00
Henrik Rydgård 2a35d4b4c5 Merge pull request #8653 from unknownbrackets/warnings
Warning fixes from clang
2016-03-21 08:27:25 +01:00
Unknown W. Brackets 62af4fe48b softgpu: Prevent leaking thin3d buffers. 2016-03-21 00:04:02 -07:00
Unknown W. Brackets 2461a849f9 Correct some warnings reported by clang. 2016-03-20 23:13:28 -07:00
Unknown W. Brackets 450d70ff06 Vulkan: Remove some outdated comments. 2016-03-20 22:51:07 -07:00
Unknown W. Brackets 9fd040eed0 Vulkan: Cache only device in push buffers. 2016-03-20 22:49:38 -07:00
Henrik Rydgard 0009b55210 Make placeholder texture black 2016-03-20 23:36:09 +01:00
Henrik Rydgård 2485c320f3 Merge pull request #8649 from unknownbrackets/vulkan-buf
Dynamically reallocate buffers when out of space
2016-03-20 23:32:08 +01:00
Unknown W. Brackets f91cc6191a Vulkan: Start with smaller buffers by default. 2016-03-20 15:23:03 -07:00
Unknown W. Brackets 82a902382b Vulkan: Centralize shader UBO update, DRY. 2016-03-20 15:15:03 -07:00
Henrik Rydgard 1515754f2d Another prescale UV fix 2016-03-20 23:02:56 +01:00
Henrik Rydgård 8e459b7816 Merge pull request #8648 from unknownbrackets/warnings
Minor warning fixes
2016-03-20 22:48:27 +01:00
Henrik Rydgard a6a56b9a69 Vulkan: Cache the texture pointer. Use a checkerboard placeholder texture where missing
(framebuffer textures in non-buffered)
2016-03-20 22:46:49 +01:00
Unknown W. Brackets e92e6bbd03 Move VulkanUtil.cpp into the filter. 2016-03-20 14:26:51 -07:00
Henrik Rydgard ffde7020d2 Vulkan prescale UV fix 2016-03-20 21:48:28 +01:00
Henrik Rydgard 0e199272ed Buildfix to last commit, add a comment 2016-03-20 20:56:33 +01:00
Henrik Rydgard 827481d41d Combined two uniforms to get the base UBO down to 512b, in order to not waste space (nVidia needs 256-byte alignment) 2016-03-20 20:53:46 +01:00
Henrik Rydgard 29bc07eb0a SoftGPU with Vulkan runs but displays black 2016-03-20 20:04:49 +01:00
Henrik Rydgard 0b1cfaf751 Be more economical with UBO pushbuffer space by reusing the last data when possible. 2016-03-20 19:35:31 +01:00
Henrik Rydgard 5d19f3dfb8 Decode vertex data directly into the vertex pushbuffer, saving a memcpy. 2016-03-20 19:35:03 +01:00
Henrik Rydgard d7ffc39d2a Vulkan: Remove support for software skinning to reduce complexity 2016-03-20 19:35:03 +01:00
Henrik Rydgard d0659f0deb No need to align vertex/index data. Will only be harmful for an upcoming optimization. 2016-03-20 19:35:03 +01:00
Henrik Rydgard 18d78f9a35 Minor optimizations 2016-03-20 19:35:03 +01:00
Henrik Rydgard 8e9acff6aa Always specify depthstencil state in pipelines.
Turns out it's only OK to leave out if rendering only to color,
otherwise behaviour is undefined - which means it may still be enabled.
2016-03-20 19:35:03 +01:00
Henrik Rydgard 2c61b1e763 Change the VulkanPushBuffer API to allow for adding support for dynamic growth 2016-03-20 19:35:03 +01:00
Henrik Rydgard 5d56537a16 Move VulkanPushBuffer into VulkanMemory.h 2016-03-20 19:31:02 +01:00
Henrik Rydgard f7113bb2e3 Use separate pushbuffers for UBO/Index/Vertex. This will make decoding directly into the pushbuffers easier, plus other benefits later.
(For example, we'll often be able to avoid rebinding the vertex and
index buffers at new offsets by just keep counting upwards between draws,
if the vertex format is the same but other state changed)
2016-03-20 19:31:02 +01:00
Henrik Rydgard 966cb89d41 Vulkan: Fix our use of dual source blending, re-enable if available. 2016-03-20 19:31:02 +01:00
Unknown W. Brackets add506a0d3 Cleanup differences in aniso handling.
Some places were not handling it as a power of two.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets 82f3df1e06 Vulkan: Initial support for aniso filtering. 2016-03-20 19:31:02 +01:00
Henrik Rydgard da50370328 Split out VulkanTexture from VulkanContext.cpp/h into VulkanImage.cpp/h 2016-03-20 19:31:02 +01:00
Unknown W. Brackets 3744008d1f Correct the 5551 format for now.
Otherwise we get wrong colors - also we are still converting colors.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets baa7132a89 Vulkan: Simplify color testing. 2016-03-20 19:31:02 +01:00
Unknown W. Brackets dad64b39b6 Vulkan: Properly set the alpha test ref.
It's definitely not a float, oops.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets f289e8485d Vulkan: Make sure depth==stencil when clearing.
We have to clear both at the same time.  I think it makes sense to
consider this part of the "separate alpha" flag, since alpha has to match
both color and depth.
2016-03-20 19:31:02 +01:00
Henrik Rydgard a995dd2ff4 Get rid of strange offset in Vulkan matrix converter 2016-03-20 19:31:02 +01:00
Henrik Rydgard e45c24b75f Show how much pushbuffer space is used each frame.
Optimizing this number (by avoiding redundant UBO uploads etc) will probably help performance.
2016-03-20 19:31:02 +01:00
Henrik Rydgard 84e649f74b Vulkan: Enable mipmapping 2016-03-20 19:31:02 +01:00
Henrik Rydgard 8a62724316 Upload PSP textures through a push buffer instead of image copy. More flexible. 2016-03-20 19:31:02 +01:00
Henrik Rydgard 5ea01ffff6 Add a secondary way to upload textures - through buffers. 2016-03-20 19:31:02 +01:00
Henrik Rydgard 697f3a8f94 Matrix depth fix. Still have depth issues though. 2016-03-20 19:31:02 +01:00
Henrik Rydgard 1970d38650 Enable the Unpack Subimage path on DX9 (maybe should just remove the check) 2016-03-20 19:31:02 +01:00
Henrik Rydgard 00d617c9d5 Fix bug where we sometimes pushed too much vertex data.
Doesn't seem to fix much though...
2016-03-20 19:31:02 +01:00
Unknown W. Brackets 242daae00a Disable last texture reuse for now.
This will be slower, but otherwise a lot of textures are missing in
various games, like Final Fantasy 4.  Better to get all the bugs out first
and then start optimizing.

Note: there is still missing drawing in Final Fantasy 4, but only text
after this change.
2016-03-20 19:31:02 +01:00
Henrik Rydgard 3e268e4d37 Mem leak fixes, cleanups 2016-03-20 19:31:02 +01:00
Henrik Rydgard 5cee8856ea Fix UV scale for some vertex formats (like GL). Separate updates of PROJ and PROJTHROUGH matrices. 2016-03-20 19:31:02 +01:00
Unknown W. Brackets 8efbcf8d42 Use draws for alpha/stencil only clear in Vulkan. 2016-03-20 19:31:02 +01:00
Unknown W. Brackets ba7deb7c9a Fix GE debugger preview in non-buffered. 2016-03-20 19:31:02 +01:00
Unknown W. Brackets 323130eb86 Don't crash as hard on shader compile error. 2016-03-20 19:31:02 +01:00
Unknown W. Brackets 2d548d64da Move Vulkan code into a filter. 2016-03-20 19:31:02 +01:00