Commit Graph

3122 Commits

Author SHA1 Message Date
Dr. Chat 181b2af5a4 Vulkan Circular Buffer 2016-03-25 13:49:07 -05:00
Dr. Chat e72e283e79 Primitive type makes rasterization state dirty too! 2016-03-23 16:20:06 -05:00
Dr. Chat 7b962e59a4 SPIR-V Dst
Fix a few bugs in the translator
2016-03-20 14:21:55 -05:00
Dr. Chat 38b94dd9e2 Add in Xenos events 2016-03-17 21:58:23 -05:00
Dr. Chat 2512a6360e Pass the physical frontbuffer address into the CP 2016-03-17 21:55:47 -05:00
Dr. Chat 0e3c113375 Physical write watches -> access watches (read and/or write watching) 2016-03-17 21:55:16 -05:00
Dr. Chat 1831e7a936 Pipeline stencil state 2016-03-16 14:45:40 -05:00
Dr. Chat 54f89825d9 SPIR-V Dp2Add/Dp3 2016-03-15 00:30:39 -05:00
Dr. Chat 245102e9e5 RenderCache::BlitToImage 2016-03-12 22:04:32 -06:00
Dr. Chat 822d61c3d9 Fix a few stale data usage bugs in the pipeline cache.
Hook up part of depth/stencil tests/writes
2016-03-12 22:03:11 -06:00
Dr. Chat 5ba04b9e55 RenderCache::ClearEDRAMColor/ClearEDRAMDepthStencil 2016-03-12 11:49:59 -06:00
Dr. Chat 635d095b87 RenderCache: Track color target / depth target usage, refactor RawCopyToImage 2016-03-10 20:39:46 -06:00
Dr. Chat f903a559b3 Blit Vulkan CP output to the main window's swap chain 2016-03-10 13:01:39 -06:00
Dr. Chat f839a1293f Add a specialized copy command buffer to the vulkan swap chain 2016-03-10 12:59:48 -06:00
sephiroth99 90b54bbaa6 Fix usage of mix in fragment shader
The boolean value must be a vector too, where each bool component
selects whether the value of the output vector component is from the
first or the second source vector.
2016-03-10 01:14:42 -05:00
Dr. Chat 86cb40f0c6 Change how the render cache renders into EDRAM.
Rendering directly into the EDRAM buffer is bad because we don't know how the GPU lays out memory when it draws. Instead, we create temporary render targets and copy EDRAM contents to/from those temporary RTs before and after each draw.
2016-03-08 18:02:03 -06:00
Dr. Chat 4e27539709 Fix Vulkan texture drawing. 2016-03-08 17:57:04 -06:00
Dr. Chat af7fc20c38 Beginnings of texture conversion/uploads 2016-03-05 22:09:18 -06:00
Dr. Chat 38094ac819 Updated local clang-format. 2016-03-02 21:17:34 -06:00
Dr. Chat 740c70f270 Scalar logc, fix log 2016-03-01 12:52:34 -06:00
Dr. Chat 48cf270724 Use spv::NoPrecision instead of DecorationInvariant
Set samplers/images as uniform constants
2016-02-27 16:21:37 -06:00
Dr. Chat c648e54539 Short-circuit draw calls if the render target's pitch is 0 2016-02-27 11:30:50 -06:00
Dr. Chat 6109e0b03a Fix incorrect images/samplers definitions
ps_param_gen and fix interpolators being copied incorrectly
2016-02-25 17:41:41 -06:00
Dr. Chat 08a287d2ad Whoops 2016-02-21 22:30:31 -06:00
Dr. Chat 06d5a28615 Fix texture fetches 2016-02-21 22:27:23 -06:00
Ben Vanik 5e31c51a3d Textures are now in descriptor set 1. 2016-02-21 20:03:51 -08:00
Ben Vanik 3b20c757ff Merge branch 'vulkan' of github.com:benvanik/xenia into vulkan 2016-02-21 19:56:30 -08:00
Ben Vanik 62931f8c8e Adding texture setup and a dummy grid texture. 2016-02-21 19:56:23 -08:00
Dr. Chat 8a29330f8c First-pass image sampling 2016-02-21 20:42:37 -06:00
Dr. Chat 2785a94fea SetpXXPush 2016-02-21 19:20:53 -06:00
Dr. Chat 9030c87386 SetpPop/SetpRstr 2016-02-21 19:20:53 -06:00
Dr. Chat 5c2b5123ac Floors/Frcs/Truncs 2016-02-21 19:20:53 -06:00
Dr. Chat 0680e451bc Exp2 2016-02-21 19:20:53 -06:00
Dr. Chat cbac9b2f4e Use vec4 zero rather than float zero where needed 2016-02-21 19:20:53 -06:00
Dr. Chat 13049912ee Vec Log 2016-02-21 19:20:53 -06:00
Dr. Chat 1d4190af02 MaxA 2016-02-21 19:20:53 -06:00
Dr. Chat 568845e81d Dp4 2016-02-21 19:20:53 -06:00
Dr. Chat 3877afe90a MaxAsf 2016-02-21 19:20:53 -06:00
Dr. Chat d217f7b3c3 MaxAs/SetpClr 2016-02-21 19:20:53 -06:00
Dr. Chat fa3ca4a5d7 Short-circuit if the store has no writes. 2016-02-21 19:20:53 -06:00
Dr. Chat d2e3b5533d Whoops 2016-02-21 19:20:53 -06:00
Dr. Chat 9b805b929e Scalar kill ops 2016-02-21 19:20:53 -06:00
Dr. Chat e78537571f Vector kill ops 2016-02-21 19:20:53 -06:00
Dr. Chat 633746b5e4 Actually preserve pv/ps if predicate fails 2016-02-21 19:20:53 -06:00
Ben Vanik cda08ff826 Setup descriptor set for textures. 2016-02-21 17:17:57 -08:00
Ben Vanik 1def5bece9 Fix viewport inversion. 2016-02-21 15:59:35 -08:00
Ben Vanik ace895d4f3 Fixing 1/w0 correction. 2016-02-21 15:44:09 -08:00
Ben Vanik 24743bf676 Actually configure constant descriptor set. 2016-02-21 15:20:35 -08:00
Ben Vanik d57f974e2e Fix buffer alloc alignment and framebuffer comparison. 2016-02-21 14:43:59 -08:00
Ben Vanik 06ba273492 Warn and be ok with symbol services failing. 2016-02-21 14:26:16 -08:00
Ben Vanik 8bf5eba098 Capture exe with renderdoc and pass --vulkan_renderdoc_capture_all. 2016-02-21 12:44:16 -08:00
Dr. Chat b83b9c28a1 Fix push constants declaration 2016-02-21 13:19:08 -06:00
Dr. Chat a7880645be Merge branch 'vulkan' of github.com:benvanik/xenia into spv_translator 2016-02-21 12:47:02 -06:00
Dr. Chat bd0fb81b22 Apply window scaling 2016-02-21 12:46:54 -06:00
Ben Vanik 32c4f3ce24 Fixing pool shutdown. 2016-02-21 10:46:47 -08:00
Ben Vanik b3faba50a3 Pushing constants. 2016-02-21 10:38:58 -08:00
Dr. Chat 71440a4137 Add code to correct vertex format
Move translated shader code to its own function
Add push constants
2016-02-21 12:06:59 -06:00
Dr. Chat b1e56ee4e5 Vector Cndxx 2016-02-20 23:45:01 -06:00
Ben Vanik ff373a83a4 Private->Function variables, fragment output, geometry shader tweaks. 2016-02-20 20:44:11 -08:00
Dr. Chat 2629ae4a14 Fix using incorrect result types for compares 2016-02-20 21:55:32 -06:00
Dr. Chat ca01bb2311 ALU predicated discard 2016-02-20 21:53:22 -06:00
Dr. Chat 08a173e5ec Scalar Sxxx 2016-02-20 21:28:25 -06:00
Ben Vanik 6d65439efe Merge branch 'vulkan' of github.com:benvanik/xenia into vulkan 2016-02-20 19:19:41 -08:00
Ben Vanik cd02cdfc70 Making memory API less error prone; fixes buffer/constant uploads. 2016-02-20 19:19:29 -08:00
Dr. Chat 3130d4b38e Add the vulkan backend as a choice in xenia-app 2016-02-20 21:02:28 -06:00
Dr. Chat 8777d22b72 Add name information to constants
Fix Rcp/Rsq OpSelect incorrect usage
2016-02-20 19:31:28 -06:00
Ben Vanik 1d82d7bd92 For now, all 512 constants live in the same block. 2016-02-20 17:05:53 -08:00
Dr. Chat 4aff1c19a7 (WIP) SPIR-V Shader Translator 2016-02-20 18:44:37 -06:00
Ben Vanik b5a0c4715b Porting GL4 geometry shaders. Likely not working. 2016-02-20 16:35:21 -08:00
Ben Vanik 769c58a9b2 Adding `xb genspirv` to do glsl->.h. 2016-02-20 16:24:42 -08:00
Ben Vanik 5759f82276 Adding pipeline caching. 2016-02-20 15:00:11 -08:00
Ben Vanik 731ff52773 Implementing a lot of the pipeline state setting. 2016-02-20 12:59:18 -08:00
Ben Vanik 97174dbe4d Skeleton leaky hacky hardcoded pipeline setup. 2016-02-19 23:23:58 -08:00
Ben Vanik 990b600f53 Buffer uploads (without reclaiming, yet). 2016-02-19 21:08:50 -08:00
Ben Vanik de1e4661ff Not crashing (but also likely not working) EDRAM emulation. 2016-02-19 20:36:10 -08:00
Ben Vanik 8820c73532 A night's worth of work: documented EDRAM. Seems mostly right. 2016-02-19 10:38:11 -08:00
Ben Vanik 1dcc84a472 Starting render passes. 2016-02-18 18:18:31 -08:00
Ben Vanik 52a6f795f7 Shader modules and plumbing. 2016-02-18 18:18:31 -08:00
Dr. Chat f9ca0b86a8 Query to see if the physical device supports a swapchain surface to silence a validation layer error. 2016-02-18 20:10:14 -06:00
Ben Vanik 3bf1c91eaa Those are really pointers - need those bits. 2016-02-18 16:52:52 -08:00
Ben Vanik 4c4a641096 WIP rough sketch of vulkan backend structure. 2016-02-18 16:43:41 -08:00
Ben Vanik 35e08d9428 Switching from fork to main glslang spirv builder. 2016-02-18 16:43:41 -08:00
Ben Vanik 00594da417 Adding mutliple queue/shared queue support. 2016-02-18 16:43:41 -08:00
Ben Vanik ecd257b34c Fix headers include guards. 2016-02-18 16:43:41 -08:00
Ben Vanik 618ca80011 Count packed bytes used by a constant map. 2016-02-18 16:43:41 -08:00
Ben Vanik 5ab0af9e6d Implementing shader constant register map construction. 2016-02-18 16:43:41 -08:00
Ben Vanik 05107d2d3e Skeleton xenia::gpu::vulkan implementation, enough to start trace viewer. 2016-02-18 16:43:41 -08:00
Ben Vanik ca5902c111 Recreate swap chain on window resize. 2016-02-18 16:43:41 -08:00
Ben Vanik a97fa36512 Fixing swap chain scissoring; surface is still not resized right. 2016-02-18 16:43:41 -08:00
Ben Vanik 9f52f2e819 Initial vulkan context and immediate drawer.
Extremely rough, just checking in so DrChat can snoop.
2016-02-18 16:43:41 -08:00
Dr. Chat 27bace0e5c Actually disable writewatch kill in ConvertTexture 2016-02-17 18:04:10 -06:00
Dr. Chat b14c4ad681 Disable write watch kill in ConvertTexture 2016-02-17 17:57:56 -06:00
Dr. Chat 8bf1bf57fd Fix GL4 alpha test, use blend disable flag
If color clear is enabled, grab the color target no matter what.
Update texture readback code on copy (but not enabled)
Track PA_SC_VIZ_QUERY in UpdateRasterizerState
2016-02-17 17:56:28 -06:00
Ben Vanik f5eef128f8 Merge pull request #539 from DrChat/vizquery_wip
Viz Query WIP Notes
2016-02-16 17:21:39 -08:00
Ben Vanik 864b1b5fac Merge pull request #538 from DrChat/trace_viewer_misc
Trace Viewer Zoomed View / Fix Alpha Test
2016-02-16 17:19:26 -08:00
Dr. Chat a2dd1c48ae Add some WIP viz query notes to the command processor.
Also implement PM4_SET_BIN_MASK/SELECT.
2016-02-16 18:36:43 -06:00
Dr. Chat 253e164753 Move EnableDepthTest functionality into a bool alpha_blend var on ImmediateDraw. 2016-02-16 18:24:37 -06:00
Ben Vanik c667dfc596 Don't put kernel stacks in GPU memory. 2016-02-16 15:05:11 -08:00
Dr. Chat e77af94c7c Ignore color target / depth target / texture alpha in the trace viewer. 2016-02-16 16:45:49 -06:00
Dr. Chat a8dfd6a21a Add a flag to ImTextureID that disables alpha test 2016-02-16 16:43:12 -06:00
Dr. Chat 65d1ea0250 Add a zoomed image view for color targets and depth targets. 2016-02-16 16:41:20 -06:00
Ben Vanik c5de61860d Merge pull request #531 from DrChat/gl4_shader_cache
GL4 Shader Cache
2016-02-16 07:20:33 -08:00
Ben Vanik f16a288f30 Merge pull request #532 from DrChat/profiler_flip_decouple
Decouple MicroProfilerFlip from Profiler::Present
2016-02-16 07:19:20 -08:00
Ben Vanik cc00b2d7a5 Merge pull request #533 from sephiroth99/noamd
More shader changes
2016-02-16 07:18:55 -08:00
sephiroth99 a442bb50b4 Prevent undefined behaviour with thread_safe_gl enabled.
CreateOffscreenContext already calls ClearCurrent. When it is done twice,
the global GL mutex is unlocked a second time, and undefined behavour
happens. In this particular case, a deadlock occured; unlocking the already
unlocked mutex locked it.
2016-02-11 23:50:11 -05:00
sephiroth99 205f64eb8b Fix compilation with VS2015 Update 2 CTP 2016-02-11 23:47:11 -05:00
sephiroth99 00674736fe Fix minor syntax error in shaders.
Discovered with glslangValidator.
2016-02-08 20:42:09 -05:00
sephiroth99 1520869a82 Revert "AMD people: have at it. I ain't gonna guarantee it'll work, though."
This reverts commit 8c0614b202.

Recent changes to generated shaders require GLSL 4.50.
2016-02-08 20:40:52 -05:00
Dr. Chat 4335e41c14 Decouple MicroProfileFlip from Profiler::Present (and start a new frame in XE_SWAP) 2016-02-07 19:25:30 -06:00
Dr. Chat a64e53fba6 Fix include order. 2016-02-05 16:31:01 -06:00
Dr. Chat 6cb7f0c23d GL4CommandProcessor: Use the new GL4ShaderCache 2016-02-05 16:14:35 -06:00
Dr. Chat 406ec8c6da GL4ShaderCache util class - caching to filesystem disabled by default 2016-02-05 16:11:00 -06:00
Dr. Chat e9dd0ce9de GL4Shader load from binary support 2016-02-05 16:02:14 -06:00
Dr. Chat 1066362ada ShaderTranslator::GatherAllBindingInformation 2016-02-05 16:00:50 -06:00
Dr. Chat ccb6a9146c Expose microcode data hash in Shader
Return paths to files that were dumped from Dump
2016-02-05 15:59:07 -06:00
Dr. Chat f75a4cab0e Apply a few optimizations to generated GLSL shaders. 2016-01-30 19:39:47 -06:00
Ben Vanik 9a09a61874 Merge pull request #526 from DrChat/command_processor_rb
Command Processor RingBuffer Replacement
2016-01-30 11:07:27 -08:00
Dr. Chat bf2c3d34da Fix XMAInitializeContext is_stereo flag. 2016-01-30 13:04:52 -06:00
Dr. Chat 6ce28ffd8c Command Processor: Replace RingbufferReader with RingBuffer
Report any packet processing errors
PM4_MEM_WRITE
2016-01-24 22:54:26 -06:00
Dr. Chat 6a67632af1 Update RingBuffer - Add immediate read/write and some error checking asserts. 2016-01-24 22:39:05 -06:00
Dr. Chat 9b1e6d6cb3 Resolve a module name to its full path before comparing names. 2016-01-24 09:50:48 -06:00
Dr. Chat 8a89a93eab Fix improperly reading 2_10_10_10 bitfields (or so I hope)
Check at runtime if a vertex fetch index doesn't match gl_VertexID
Fix trying to instantiate a vec1
2016-01-22 18:49:17 -06:00
Dr. Chat b2d8837e52 Fix depth clear when not sourcing from a depth target. 2016-01-22 18:47:27 -06:00
Ben Vanik 6c6f7c6eca Merge pull request #522 from sephiroth99/lf3
Linux compilation/link and compatibility fixes
2016-01-20 19:41:40 -08:00
sephiroth99 a74c88851b Rework RtlTime with portable time conversion functions 2016-01-20 12:26:49 -05:00
sephiroth99 bf910c2d9a Add missing definitions for XAPC constants
Fixes linking errors for these symbols.
2016-01-20 11:26:35 -05:00
sephiroth99 f17b80c61e Use stdlib 'hardware_concurrency' to get logical processor count
This has the benifit of being multiplatform.
2016-01-20 11:04:28 -05:00
sephiroth99 5d9a4b6830 Handle all other cases in switch statements 2016-01-20 11:00:37 -05:00
sephiroth99 1c14964739 Add missing override on virtual function 2016-01-20 10:57:50 -05:00
sephiroth99 4c0f9e6342 Add missing includes 2016-01-20 10:36:01 -05:00
sephiroth99 d78317847d Fix link error when profiling is disabled
These four functions are needed by microprofile even when profiling
is disabled.
2016-01-20 09:35:27 -05:00
Dr. Chat 8710b105bf Draw smaller floating point formats in the trace viewer. 2016-01-19 21:18:48 -06:00
Dr. Chat 9ed0934123 Swap to modern OpenGL for TFB usage. 2016-01-19 18:31:36 -06:00
Dr. Chat 47f5896089 Add TFB support to the trace viewer 2016-01-18 22:22:15 -06:00
Dr. Chat a34e82c77f Disable GL cull on rectangle lists 2016-01-18 21:00:58 -06:00
Dr. Chat 3859b0a091 Add an option for the draw batcher to collect vertex shader output. Disabled by default. 2016-01-18 20:57:36 -06:00
Dr. Chat 55a8964428 Fix shaders reading 10_11_11 bitfields backwards. 2016-01-18 15:46:41 -06:00
Ben Vanik 2e5c64fb13 Prevent some divide by zeros in shaders. Thanks @vlj!
Fixes #518.
2016-01-18 11:51:18 -08:00
Ben Vanik 6777ce6668 Reconcile debugger and save state stuff into a single implementation.
Fixes #497 and fixes #496.
Still rough edges, but at least less duplication.
2016-01-18 11:48:21 -08:00
Dr. Chat 34e03294ef Fix vfetch_mini instructions using stale data when following a vfetch_full that doesn't fetch anything 2016-01-16 22:39:00 -06:00
Dr. Chat e8719dd949 Fix an overflow crash in DiscImageDevice::Verify 2016-01-14 15:18:41 -06:00
Ben Vanik 9473f20c7f Fixing travis lint diff. 2016-01-13 22:55:28 -08:00
Ben Vanik 2e826f9321 Supporting constants in Haswell codepaths for mul_add/sub. 2016-01-13 22:29:39 -08:00
Dr. Chat 0771eea0b3 Change comments to comply with local regulations. 2016-01-13 19:41:15 -06:00
Dr. Chat bd6bf16bd1 New flag: disable_global_lock - Disables global lock usage in guest code. 2016-01-13 19:40:00 -06:00
Dr. Chat a5b37dce1d Shaders: Emit an unimplemented warning for indexed vertex fetch instructions 2016-01-13 01:50:20 -06:00
Dr. Chat 14c5e48120 Enable speculative PACK_TYPE_FLOAT16_3 2016-01-13 01:48:18 -06:00
Dr. Chat 36372d1eae Enforce xex memory protections 2016-01-13 01:47:06 -06:00
Dr. Chat f0802d75fa Use atomic compare exchange in stdcx/stwcx (still under the global lock) 2016-01-13 01:45:31 -06:00
Dr. Chat 51dde62f09 x64 backend vector optimizations 2016-01-13 01:43:23 -06:00