Commit graph

391 commits

Author SHA1 Message Date
Unknown W. Brackets
82a902382b Vulkan: Centralize shader UBO update, DRY. 2016-03-20 15:15:03 -07: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
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
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
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
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
8a62724316 Upload PSP textures through a push buffer instead of image copy. More flexible. 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
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
323130eb86 Don't crash as hard on shader compile error. 2016-03-20 19:31:02 +01:00
Henrik Rydgard
2481714a8e Load Vulkan dynamically. Fix Android build (though - Vulkan is not working on Android yet) 2016-03-20 19:30:11 +01:00
Henrik Rydgard
432f276bec Cleanups. Don't loop over bones in vshader, causes trouble 2016-03-20 19:30:11 +01:00
Henrik Rydgard
1677697735 Vulkan: Don't try to overlap proj with proj_through, will need a different approach.
Also, assorted bugfixes.
2016-03-20 19:30:11 +01:00
Henrik Rydgard
d5f685ce05 WIP trying to fix drawing issues 2016-03-20 19:30:11 +01:00
Henrik Rydgard
3284899844 More clearing fixes. Also fix some memory leaks. 2016-03-20 19:30:11 +01:00
Henrik Rydgard
2e998891a4 The settings to the vertex decoder must match the implementation..
Fixes some character scale issues.
2016-03-20 19:30:11 +01:00
Henrik Rydgard
55ef97639a More zero-initialization. Fix scope issue, MSVC's optimizer was aggressive enough that this was a problem. Fixes textures in release mode. 2016-03-20 19:30:11 +01:00
Henrik Rydgard
4c281f16ac Fix mixup with fragment shader ubo variables 2016-03-20 19:30:11 +01:00
Henrik Rydgard
29341e53a5 Assorted fixes and cleanups. 2016-03-20 19:30:11 +01:00
Henrik Rydgard
87b743e922 Fix issues with texture replacement 2016-03-20 19:30:11 +01:00
Henrik Rydgard
dced84c9fc Work on texture support, cube.elf works correctly. Delete unused code. 2016-03-20 19:30:11 +01:00
Henrik Rydgard
7eeba080c7 Fix primitive topology. Crashfix. 2016-03-20 19:30:11 +01:00
Henrik Rydgard
4e6a9b8108 Fix indexed through-mode drawing 2016-03-20 19:30:11 +01:00
Henrik Rydgard
ec6bc4a5f6 Vertex format fixes. Flip through drawing the right way up. 2016-03-20 19:30:11 +01:00
Henrik Rydgard
6b8c004561 Fix indexed drawing, flip rendering the right side up, enable culling 2016-03-20 19:30:11 +01:00
Henrik Rydgard
6141c3651b Separate uniform updates from shader updates 2016-03-20 19:30:11 +01:00
Henrik Rydgard
d67d187b72 Get untextured drawing working! (at least cube.elf) 2016-03-20 19:30:11 +01:00
Henrik Rydgard
28ae840abe Pipelines, samplers, description sets, oh my 2016-03-20 19:30:11 +01:00
Henrik Rydgard
01e3fbae95 Fix clearing bug, add FIFO_RELAXED flag, etc 2016-03-20 19:30:11 +01:00
Henrik Rydgard
ddb36a35a0 Some descriptor binding fixes 2016-03-20 19:30:11 +01:00
Henrik Rydgard
3701e2eca3 Reaches the first clear 2016-03-20 19:30:11 +01:00
Henrik Rydgard
cfcfd406fc Start porting TextureCache. Lots of stubbing going on. 2016-03-20 19:30:11 +01:00
Henrik Rydgard
5216a24590 Back to work on the PSP renderer 2016-03-20 19:30:11 +01:00
Henrik Rydgard
c64064024d Initial vulkan code.
This was squashed from nine commits but using old versions of Vulkan.
2016-03-20 19:18:35 +01:00