Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan rendering backend. Early Work-In-Progress #8601

Merged
merged 116 commits into from
Mar 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
c640640
Initial vulkan code.
hrydgard Oct 10, 2015
eedd819
Implement a trivial SPIR-V disassembler, just for fun
hrydgard Jan 6, 2016
2a449f7
More vulkan fixing
hrydgard Dec 20, 2015
847cab2
Fixes in VulkanContext
hrydgard Dec 30, 2015
2a71e16
Enable vulkan validation
hrydgard Dec 30, 2015
73d6d2d
More vulkan in thin3d
hrydgard Dec 31, 2015
83a5313
More fixes
hrydgard Dec 31, 2015
129c706
Just some work on the shader generators
hrydgard Dec 31, 2015
4ddca86
Further vulkan stuff
hrydgard Dec 31, 2015
cfbecf5
More progress
hrydgard Jan 2, 2016
e89a7f0
Update VulkanContext
hrydgard Jan 2, 2016
d7e8f84
Support multiple texture formats
hrydgard Jan 3, 2016
776439d
Per-frame descriptor pools. Safe-delete more types.
hrydgard Jan 3, 2016
56e358a
Show Vulkan information in system information.
hrydgard Jan 3, 2016
5216a24
Back to work on the PSP renderer
hrydgard Jan 3, 2016
cfcfd40
Start porting TextureCache. Lots of stubbing going on.
hrydgard Jan 3, 2016
4063f7e
Fill out GPU_Vulkan.cpp with what's mostly a copy of GLES_GPU.cpp
hrydgard Jan 5, 2016
3701e2e
Reaches the first clear
hrydgard Jan 5, 2016
49f1e70
Okay, reached the shader generators
hrydgard Jan 5, 2016
906b259
First PSP shaders actually compile
hrydgard Jan 5, 2016
ddb36a3
Some descriptor binding fixes
hrydgard Jan 6, 2016
01e3fba
Fix clearing bug, add FIFO_RELAXED flag, etc
hrydgard Jan 6, 2016
6688303
Begin/End frame fixes
hrydgard Jan 8, 2016
28ae840
Pipelines, samplers, description sets, oh my
hrydgard Jan 9, 2016
d67d187
Get untextured drawing working! (at least cube.elf)
hrydgard Jan 9, 2016
6141c36
Separate uniform updates from shader updates
hrydgard Jan 9, 2016
6b8c004
Fix indexed drawing, flip rendering the right side up, enable culling
hrydgard Jan 9, 2016
ec6bc4a
Vertex format fixes. Flip through drawing the right way up.
hrydgard Jan 9, 2016
4e6a9b8
Fix indexed through-mode drawing
hrydgard Jan 9, 2016
9e34d7d
Remove remains of FragmentTestCache from Vulkan backend
hrydgard Jan 9, 2016
7eeba08
Fix primitive topology. Crashfix.
hrydgard Jan 9, 2016
dced84c
Work on texture support, cube.elf works correctly. Delete unused code.
hrydgard Jan 9, 2016
78d5fff
More texture work
hrydgard Jan 9, 2016
87b743e
Fix issues with texture replacement
hrydgard Jan 9, 2016
b51b38f
Switch to "Mailbox" frame submission if available, lets us go beyond …
hrydgard Jan 9, 2016
29341e5
Assorted fixes and cleanups.
hrydgard Jan 9, 2016
3bf88d7
Plug the texture memory leak
hrydgard Jan 10, 2016
4c281f1
Fix mixup with fragment shader ubo variables
hrydgard Jan 10, 2016
52e7f06
Add Vulkan to Win32 menu. disable gfx logging in debug by default.
hrydgard Jan 10, 2016
55ef976
More zero-initialization. Fix scope issue, MSVC's optimizer was aggr…
hrydgard Jan 10, 2016
2e99889
The settings to the vertex decoder must match the implementation..
hrydgard Jan 10, 2016
3284899
More clearing fixes. Also fix some memory leaks.
hrydgard Jan 10, 2016
02d1648
Delete pipeline caches asynchronously too
hrydgard Jan 10, 2016
4b978b1
Crashfix, fix left-behind culling disabling
hrydgard Jan 10, 2016
d5f685c
WIP trying to fix drawing issues
hrydgard Jan 10, 2016
5b70957
Expose another couple of vulkan device features.
hrydgard Jan 19, 2016
ca63cca
WIP: Start work on getting the Vulkan code to compile for Android
hrydgard Jan 24, 2016
5f71b5b
Android: Vulkan builds but doesn't link as we have no link library.
hrydgard Jan 24, 2016
1677697
Vulkan: Don't try to overlap proj with proj_through, will need a diff…
hrydgard Jan 24, 2016
432f276
Cleanups. Don't loop over bones in vshader, causes trouble
hrydgard Jan 24, 2016
5a72564
Cleanup
hrydgard Jan 28, 2016
2481714
Load Vulkan dynamically. Fix Android build (though - Vulkan is not wo…
hrydgard Feb 21, 2016
45cf399
Remove remains of xcb support. Will add back later.
hrydgard Feb 21, 2016
c8e0667
Possible buildfix
hrydgard Feb 21, 2016
d325aa2
Hook up Vulkan on Android, no idea if it works. Move VulkanContext to…
hrydgard Feb 21, 2016
96273c6
Turn off Vulkan in CMake-based and Qt-based builds, for now
hrydgard Feb 21, 2016
e97a6c6
VulkanLoader: Load vkDestroySurfaceKHR
phire Feb 22, 2016
77420f7
VulkanLoader: Detect loader failure on windows.
phire Feb 22, 2016
78b8782
Show backend chooser on Android so we can choose Vulkan.
hrydgard Feb 25, 2016
9c457da
Gets the Vulkan backend running, but not drawing correctly, on Android.
hrydgard Feb 25, 2016
b06cf4e
Re-fix depth buffer initialization
hrydgard Feb 27, 2016
8950509
Buildfix (glslang project settings /MT)
hrydgard Feb 28, 2016
432fbe3
Vulkan: We're doing dual src blending wrong (GLSL part, not sure how …
hrydgard Mar 5, 2016
76d8a87
Vulkan: Attempt at fixing dual source blending. Should work but doesn't.
hrydgard Mar 6, 2016
22f47d3
Remove redundant configuration, remove temp hack
hrydgard Mar 6, 2016
2d548d6
Move Vulkan code into a filter.
unknownbrackets Mar 12, 2016
323130e
Don't crash as hard on shader compile error.
unknownbrackets Mar 12, 2016
ba7deb7
Fix GE debugger preview in non-buffered.
unknownbrackets Mar 12, 2016
8efbcf8
Use draws for alpha/stencil only clear in Vulkan.
unknownbrackets Mar 12, 2016
c92790c
Specify a useful app version when loading Vulkan.
unknownbrackets Mar 12, 2016
6e2e0bf
Should not specify the Vulkan patch version when requesting Vulkan 1.0.
hrydgard Mar 13, 2016
b7b0b59
Update Vulkan headers to 1.0.5. Remove references to vulkan-1.lib as …
hrydgard Mar 13, 2016
5ca012e
Fix a bunch of new vulkan validation layer failures.
hrydgard Mar 13, 2016
79fd828
Work around what seems like a validation layer bug (trigger by scrolling
hrydgard Mar 13, 2016
575cc89
Turn off annoying "debug flicker" I used to see if we were swapping b…
hrydgard Mar 13, 2016
b0098f7
Replace ugly workaround with VK_LAYER_LUNARG_unique_objects which pre…
hrydgard Mar 13, 2016
fe270c5
Typo fix
hrydgard Mar 13, 2016
76b17a4
Revert "Replace ugly workaround with VK_LAYER_LUNARG_unique_objects w…
hrydgard Mar 13, 2016
82205a4
Handle Vulkan init errors more gracefully.
unknownbrackets Mar 13, 2016
0b7e43d
Allow the graphicsContext to be overridden.
unknownbrackets Mar 13, 2016
c770349
Switch headless to using graphics contexts.
unknownbrackets Mar 13, 2016
5cee885
Fix UV scale for some vertex formats (like GL). Separate updates of P…
hrydgard Mar 13, 2016
1f1e679
Silence another validation warning
hrydgard Mar 13, 2016
3e268e4
Mem leak fixes, cleanups
hrydgard Mar 13, 2016
242daae
Disable last texture reuse for now.
unknownbrackets Mar 14, 2016
00d617c
Fix bug where we sometimes pushed too much vertex data.
hrydgard Mar 14, 2016
1970d38
Enable the Unpack Subimage path on DX9 (maybe should just remove the …
hrydgard Mar 14, 2016
697f3a8
Matrix depth fix. Still have depth issues though.
hrydgard Mar 14, 2016
c2775d4
Default validation on in Debug and off in Release
hrydgard Mar 14, 2016
5ea01ff
Add a secondary way to upload textures - through buffers.
hrydgard Mar 14, 2016
8a62724
Upload PSP textures through a push buffer instead of image copy. More…
hrydgard Mar 14, 2016
84e649f
Vulkan: Enable mipmapping
hrydgard Mar 14, 2016
e45c24b
Show how much pushbuffer space is used each frame.
hrydgard Mar 14, 2016
a995dd2
Get rid of strange offset in Vulkan matrix converter
hrydgard Mar 16, 2016
f289e84
Vulkan: Make sure depth==stencil when clearing.
unknownbrackets Mar 17, 2016
dad64b3
Vulkan: Properly set the alpha test ref.
unknownbrackets Mar 17, 2016
baa7132
Vulkan: Simplify color testing.
unknownbrackets Mar 17, 2016
3744008
Correct the 5551 format for now.
unknownbrackets Mar 17, 2016
da50370
Split out VulkanTexture from VulkanContext.cpp/h into VulkanImage.cpp/h
hrydgard Mar 17, 2016
82f3df1
Vulkan: Initial support for aniso filtering.
unknownbrackets Mar 18, 2016
add506a
Cleanup differences in aniso handling.
unknownbrackets Mar 18, 2016
966cb89
Vulkan: Fix our use of dual source blending, re-enable if available.
hrydgard Mar 19, 2016
f7113bb
Use separate pushbuffers for UBO/Index/Vertex. This will make decodin…
hrydgard Mar 19, 2016
5d56537
Move VulkanPushBuffer into VulkanMemory.h
hrydgard Mar 20, 2016
2c61b1e
Change the VulkanPushBuffer API to allow for adding support for dynam…
hrydgard Mar 20, 2016
8e9acff
Always specify depthstencil state in pipelines.
hrydgard Mar 20, 2016
5d45413
Fix a resource leak. Request COHERENT memory for pushbuffers.
hrydgard Mar 20, 2016
18d78f9
Minor optimizations
hrydgard Mar 20, 2016
d0659f0
No need to align vertex/index data. Will only be harmful for an upcom…
hrydgard Mar 20, 2016
d7ffc39
Vulkan: Remove support for software skinning to reduce complexity
hrydgard Mar 20, 2016
5d19f3d
Decode vertex data directly into the vertex pushbuffer, saving a memcpy.
hrydgard Mar 20, 2016
0b1cfaf
Be more economical with UBO pushbuffer space by reusing the last data…
hrydgard Mar 20, 2016
29bc07e
SoftGPU with Vulkan runs but displays black
hrydgard Mar 20, 2016
c33c3cf
Vulkan: Add ugly temporary warning about buffered rendering not working
hrydgard Mar 20, 2016
827481d
Combined two uniforms to get the base UBO down to 512b, in order to n…
hrydgard Mar 20, 2016
0e19927
Buildfix to last commit, add a comment
hrydgard Mar 20, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)

add_definitions(-DPPSSPP)

# None of these platforms support Vulkan yet.
add_definitions(-DNO_VULKAN)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_ARCH_64 1)
add_definitions(-D_ARCH_64=1)
Expand Down
11 changes: 11 additions & 0 deletions Common/Common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<StringPooling>true</StringPooling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -239,6 +240,11 @@
<ClInclude Include="ThreadSafeList.h" />
<ClInclude Include="Thunk.h" />
<ClInclude Include="Timer.h" />
<ClInclude Include="Vulkan\SPIRVDisasm.h" />
<ClInclude Include="Vulkan\VulkanContext.h" />
<ClInclude Include="Vulkan\VulkanImage.h" />
<ClInclude Include="Vulkan\VulkanLoader.h" />
<ClInclude Include="Vulkan\VulkanMemory.h" />
<ClInclude Include="x64Analyzer.h" />
<ClInclude Include="x64Emitter.h" />
</ItemGroup>
Expand Down Expand Up @@ -307,6 +313,11 @@
<ClCompile Include="ThreadPools.cpp" />
<ClCompile Include="Thunk.cpp" />
<ClCompile Include="Timer.cpp" />
<ClCompile Include="Vulkan\SPIRVDisasm.cpp" />
<ClCompile Include="Vulkan\VulkanContext.cpp" />
<ClCompile Include="Vulkan\VulkanImage.cpp" />
<ClCompile Include="Vulkan\VulkanLoader.cpp" />
<ClCompile Include="Vulkan\VulkanMemory.cpp" />
<ClCompile Include="x64Analyzer.cpp" />
<ClCompile Include="x64Emitter.cpp" />
</ItemGroup>
Expand Down
33 changes: 33 additions & 0 deletions Common/Common.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@
</ClInclude>
<ClInclude Include="GraphicsContext.h" />
<ClInclude Include="DbgNew.h" />
<ClInclude Include="Vulkan\SPIRVDisasm.h">
<Filter>Vulkan</Filter>
</ClInclude>
<ClInclude Include="Vulkan\VulkanLoader.h">
<Filter>Vulkan</Filter>
</ClInclude>
<ClInclude Include="Vulkan\VulkanContext.h">
<Filter>Vulkan</Filter>
</ClInclude>
<ClInclude Include="Vulkan\VulkanImage.h">
<Filter>Vulkan</Filter>
</ClInclude>
<ClInclude Include="Vulkan\VulkanMemory.h">
<Filter>Vulkan</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp" />
Expand Down Expand Up @@ -103,6 +118,21 @@
<ClCompile Include="GL\GLInterface\GLInterface.cpp">
<Filter>GL\GLInterface</Filter>
</ClCompile>
<ClCompile Include="Vulkan\SPIRVDisasm.cpp">
<Filter>Vulkan</Filter>
</ClCompile>
<ClCompile Include="Vulkan\VulkanLoader.cpp">
<Filter>Vulkan</Filter>
</ClCompile>
<ClCompile Include="Vulkan\VulkanContext.cpp">
<Filter>Vulkan</Filter>
</ClCompile>
<ClCompile Include="Vulkan\VulkanImage.cpp">
<Filter>Vulkan</Filter>
</ClCompile>
<ClCompile Include="Vulkan\VulkanMemory.cpp">
<Filter>Vulkan</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />
Expand All @@ -117,5 +147,8 @@
<Filter Include="GL\GLInterface">
<UniqueIdentifier>{2c723cf4-75b6-406a-90c0-ebb7a13ba476}</UniqueIdentifier>
</Filter>
<Filter Include="Vulkan">
<UniqueIdentifier>{c14d66ef-5f7c-4565-975a-72774e7ccfb9}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions Common/GraphicsContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class GraphicsContext {

virtual void Resize() = 0;

// Needs casting to the appropriate type, unfortunately. Should find a better solution..
virtual void *GetAPIContext() { return nullptr; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is no longer used?

-[Unknown]


virtual Thin3DContext *CreateThin3DContext() = 0;
};

Expand Down
Loading