20001 Commits

Author SHA1 Message Date
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
5d45413dab Fix a resource leak. Request COHERENT memory for pushbuffers. 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
c2775d4dfa Default validation on in Debug and off in Release 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
1f1e679aa0 Silence another validation warning 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
c770349475 Switch headless to using graphics contexts.
Vulkan doesn't work yet, needs some thin3d for the command buffer?
2016-03-20 19:31:02 +01:00
Unknown W. Brackets
0b7e43d05c Allow the graphicsContext to be overridden.
This is useful when coming from, for example, headless.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets
82205a4660 Handle Vulkan init errors more gracefully. 2016-03-20 19:31:02 +01:00
Henrik Rydgard
76b17a4912 Revert "Replace ugly workaround with VK_LAYER_LUNARG_unique_objects which prevents handle reuse."
This reverts commit 6342c07a19d5ab410cbc233a570488214923a9f8.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
fe270c592a Typo fix 2016-03-20 19:31:02 +01:00
Henrik Rydgard
b0098f7961 Replace ugly workaround with VK_LAYER_LUNARG_unique_objects which prevents handle reuse.
See https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/121
2016-03-20 19:31:02 +01:00
Henrik Rydgard
575cc890b7 Turn off annoying "debug flicker" I used to see if we were swapping buffers properly early on
Also minor logging changes, refine the false-positive debug layer check
2016-03-20 19:31:02 +01:00
Henrik Rydgard
79fd828d16 Work around what seems like a validation layer bug (trigger by scrolling
around the UI a bit)
2016-03-20 19:31:02 +01:00
Henrik Rydgard
5ca012e83d Fix a bunch of new vulkan validation layer failures. 2016-03-20 19:31:02 +01:00
Henrik Rydgard
b7b0b59e9a Update Vulkan headers to 1.0.5. Remove references to vulkan-1.lib as we load dynamically. 2016-03-20 19:31:02 +01:00
Henrik Rydgard
6e2e0bfa33 Should not specify the Vulkan patch version when requesting Vulkan 1.0. 2016-03-20 19:31:02 +01:00
Unknown W. Brackets
c92790c5a8 Specify a useful app version when loading Vulkan. 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
Henrik Rydgard
22f47d3787 Remove redundant configuration, remove temp hack 2016-03-20 19:31:02 +01:00
Henrik Rydgard
76d8a87b2f Vulkan: Attempt at fixing dual source blending. Should work but doesn't. 2016-03-20 19:31:02 +01:00
Henrik Rydgard
432fbe30d1 Vulkan: We're doing dual src blending wrong (GLSL part, not sure how to do it right) so disable it. 2016-03-20 19:31:02 +01:00
Henrik Rydgard
8950509bc5 Buildfix (glslang project settings /MT) 2016-03-20 19:31:02 +01:00
Henrik Rydgard
b06cf4e688 Re-fix depth buffer initialization 2016-03-20 19:30:39 +01:00
Henrik Rydgård
9c457da4c9 Gets the Vulkan backend running, but not drawing correctly, on Android.
Not sure what's wrong, I get a yellow flashing screen.
2016-03-20 19:30:39 +01:00