Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2020-02-20 | clang-format | Nguyen Dac Nam | 1 | -1/+1 | |
2020-02-20 | shader_decompiler: only add StorageImageReadWithoutFormat when available | Nguyen Dac Nam | 1 | -1/+4 | |
2020-02-19 | shader_decompiler: add check in case of device not support ShaderStorageImageReadWithoutFormat | Nguyen Dac Nam | 1 | -0/+4 | |
2020-02-19 | vk_shader: add Capability StorageImageReadWithoutFormat | Nguyen Dac Nam | 1 | -0/+1 | |
2020-02-19 | vk_shader: Implement function ImageLoad (Used by Kirby Start Allies) | Nguyen Dac Nam | 1 | -2/+6 | |
Please enter the commit message for your changes. Lines starting | |||||
2020-02-16 | vk_shader_decompiler: Implement Layer output attribute | ReinUsesLisp | 1 | -6/+30 | |
SPIR-V's Layer is GLSL's gl_Layer. It lets the application choose from a shader stage (vertex, tessellation or geometry) which framebuffer layer write the output fragments to. | |||||
2020-02-14 | vk_shader_decompiler: Fix vertex id and instance id | ReinUsesLisp | 1 | -4/+13 | |
Vulkan's VertexIndex and InstanceIndex don't match with hardware. This is because Nvidia implements gl_VertexID and gl_InstanceID. The math that relates these is: gl_VertexIndex = gl_BaseVertex + gl_VertexID gl_InstanceIndex = gl_InstanceIndex + gl_InstanceID To emulate it using what Vulkan's SPIR-V offers (the *Index variants) this commit substracts gl_Base* from gl_*Index to obtain the OpenGL and hardware's equivalent. | |||||
2020-01-26 | shader/memory: Implement ATOM.ADD | ReinUsesLisp | 1 | -33/+33 | |
ATOM operates atomically on global memory. For now only add ATOM.ADD since that's what was found in commercial games. This asserts for ATOM.ADD.S32 (handling the others as unimplemented), although ATOM.ADD.U32 shouldn't be any different. This change forces us to change the default type on SPIR-V storage buffers from float to uint. We could also alias the buffers, but it's simpler for now to just use uint. While we are at it, abstract the code to avoid repetition. | |||||
2020-01-25 | Shader_IR: Address feedback. | Fernando Sahmkow | 1 | -2/+3 | |
2020-01-24 | Shader_IR: Correct Custom Variable assignment. | Fernando Sahmkow | 1 | -0/+2 | |
2020-01-24 | Shader_IR: Implement Injectable Custom Variables to the IR. | Fernando Sahmkow | 1 | -0/+16 | |
2020-01-24 | vk_shader_decompiler: Disable default values on unwritten render targets | ReinUsesLisp | 1 | -13/+16 | |
Some games like The Legend of Zelda: Breath of the Wild assign render targets without writing them from the fragment shader. This generates Vulkan validation errors, so silence these I previously introduced a commit to set "vec4(0, 0, 0, 1)" for these attachments. The problem is that this is not what games expect. This commit reverts that change. | |||||
2020-01-19 | vk_shader_decompiler: Implement UAtomicAdd (ATOMS) on SPIR-V | ReinUsesLisp | 1 | -3/+11 | |
Also updates sirit to include atomic instructions. | |||||
2020-01-16 | shader/memory: Implement ATOMS.ADD.U32 | ReinUsesLisp | 1 | -0/+7 | |
2020-01-04 | Shader_IR: Address Feedback | Fernando Sahmkow | 1 | -14/+4 | |
2019-12-30 | Shader_IR: add the ability to amend code in the shader ir. | Fernando Sahmkow | 1 | -0/+18 | |
This commit introduces a mechanism by which shader IR code can be amended and extended. This useful for track algorithms where certain information can derived from before the track such as indexes to array samplers. | |||||
2019-12-21 | vk_shader_decompiler: Use Visit instead of reimplementing it | ReinUsesLisp | 1 | -23/+1 | |
ExprCondCode visit implements the generic Visit. Use this instead of that one. As an intended side effect this fixes unwritten memory usages in cases when a negation of a condition code is used. | |||||
2019-12-19 | vk_shader_decompiler: Fix full decompilation | ReinUsesLisp | 1 | -3/+5 | |
When full decompilation was enabled, labels were not being inserted and instructions were misused. Fix these bugs. | |||||
2019-12-19 | vk_shader_decompiler: Skip NDC correction when it is native | ReinUsesLisp | 1 | -1/+1 | |
Avoid changing gl_Position when the NDC used by the game is [0, 1] (Vulkan's native). | |||||
2019-12-19 | vk_shader_decompiler: Normalize output fragment attachments | ReinUsesLisp | 1 | -12/+9 | |
Some games write from fragment shaders to an unexistant framebuffer attachment or they don't write to one when it exists in the framebuffer. Fix this by skipping writes or adding zeroes. | |||||
2019-12-19 | vk_shader_decompiler: Update sirit and implement Texture AOFFI | ReinUsesLisp | 1 | -22/+30 | |
2019-12-10 | shader: Implement MEMBAR.GL | ReinUsesLisp | 1 | -0/+14 | |
Implement using memoryBarrier in GLSL and OpMemoryBarrier on SPIR-V. | |||||
2019-12-10 | vk_shader_decompiler: Fix build issues on old gcc versions | ReinUsesLisp | 1 | -2/+3 | |
2019-12-10 | vk_shader_decompiler: Reduce YNegate's severity | ReinUsesLisp | 1 | -1/+1 | |
2019-12-10 | shader_ir/other: Implement S2R InvocationId | ReinUsesLisp | 1 | -0/+1 | |
2019-12-10 | vk_shader_decompiler: Misc changes | ReinUsesLisp | 1 | -677/+1594 | |
Update Sirit and its usage in vk_shader_decompiler. Highlights: - Implement tessellation shaders - Implement geometry shaders - Implement some missing features - Use native half float instructions when available. | |||||
2019-11-23 | video_core: Unify ProgramType and ShaderStage into ShaderType | ReinUsesLisp | 1 | -14/+15 | |
2019-11-14 | Shader_IR: Implement TXD instruction. | Fernando Sahmkow | 1 | -0/+6 | |
2019-11-14 | Shader_IR: Implement FLO instruction. | Fernando Sahmkow | 1 | -0/+2 | |
2019-11-08 | shader_ir/warp: Implement FSWZADD | ReinUsesLisp | 1 | -0/+6 | |
2019-11-08 | gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsics | ReinUsesLisp | 1 | -40/+3 | |
2019-10-25 | Shader_IR: Implement Fast BRX and allow multi-branches in the CFG. | Fernando Sahmkow | 1 | -0/+7 | |
2019-10-18 | vk_shader_decompiler: Mark operator() function parameters as const references | Lioncash | 1 | -21/+23 | |
These parameters aren't actually modified in any way, so they can be made const references. | |||||
2019-10-16 | vk_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator() | Lioncash | 1 | -0/+3 | |
This would previously result in NeverExecute and UnusedIndex being treated as regular predicates. | |||||
2019-10-05 | Shader_Ir: Address Feedback and clang format. | Fernando Sahmkow | 1 | -25/+18 | |
2019-10-05 | vk_shader_decompiler: Correct Branches inside conditionals. | Fernando Sahmkow | 1 | -1/+11 | |
2019-10-05 | vk_shader_decompiler: Clean code and be const correct. | Fernando Sahmkow | 1 | -7/+5 | |
2019-10-05 | vk_shader_compiler: Don't enclose branches with if(true) to avoid crashing AMD | Fernando Sahmkow | 1 | -16/+33 | |
2019-10-05 | vk_shader_compiler: Correct SPIR-V AST Decompiling | Fernando Sahmkow | 1 | -4/+11 | |
2019-10-05 | Shader_IR: allow else derivation to be optional. | Fernando Sahmkow | 1 | -2/+4 | |
2019-10-05 | vk_shader_compiler: Implement the decompiler in SPIR-V | Fernando Sahmkow | 1 | -22/+276 | |
2019-09-21 | gl_shader_decompiler: Use uint for images and fix SUATOM | ReinUsesLisp | 1 | -12/+0 | |
In the process remove implementation of SUATOM.MIN and SUATOM.MAX as these require a distinction between U32 and S32. These have to be implemented with imageCompSwap loop. | |||||
2019-09-21 | shader/image: Implement SULD and remove irrelevant code | ReinUsesLisp | 1 | -0/+7 | |
* Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array. | |||||
2019-09-17 | shader_ir/warp: Implement SHFL | ReinUsesLisp | 1 | -0/+50 | |
2019-09-13 | vk_device: Add miscellaneous features and minor style changes | ReinUsesLisp | 1 | -3/+3 | |
* Increase minimum Vulkan requirements * Require VK_EXT_vertex_attribute_divisor * Require depthClamp, samplerAnisotropy and largePoints features * Search and expose VK_KHR_uniform_buffer_standard_layout * Search and expose VK_EXT_index_type_uint8 * Search and expose native float16 arithmetics * Track current driver with VK_KHR_driver_properties * Query and expose SSBO alignment * Query more image formats * Improve logging overall * Minor style changes * Minor rephrasing of commentaries | |||||
2019-09-11 | shader/image: Implement SUATOM and fix SUST | ReinUsesLisp | 1 | -0/+42 | |
2019-08-21 | shader_ir: Implement VOTE | ReinUsesLisp | 1 | -0/+25 | |
Implement VOTE using Nvidia's intrinsics. Documentation about these can be found here https://developer.nvidia.com/reading-between-threads-shader-intrinsics Instead of using portable ARB instructions I opted to use Nvidia intrinsics because these are the closest we have to how Tegra X1 hardware renders. To stub VOTE on non-Nvidia drivers (including nouveau) this commit simulates a GPU with a warp size of one, returning what is meaningful for the instruction being emulated: * anyThreadNV(value) -> value * allThreadsNV(value) -> value * allThreadsEqualNV(value) -> true ballotARB, also known as "uint64_t(activeThreadsNV())", emits VOTE.ANY Rd, PT, PT; on nouveau's compiler. This doesn't match exactly to Nvidia's code VOTE.ALL Rd, PT, PT; Which is emulated with activeThreadsNV() by this commit. In theory this shouldn't really matter since .ANY, .ALL and .EQ affect the predicates (set to PT on those cases) and not the registers. | |||||
2019-07-20 | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F. | Fernando Sahmkow | 1 | -0/+18 | |
This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done. | |||||
2019-07-20 | shader/half_set_predicate: Fix HSETP2 implementation | ReinUsesLisp | 1 | -13/+4 | |
2019-07-09 | shader_ir: Implement BRX & BRA.CC | Fernando Sahmkow | 1 | -0/+9 | |
2019-07-08 | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders | ReinUsesLisp | 1 | -8/+6 | |
This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging. | |||||
2019-06-21 | shader: Decode SUST and implement backing image functionality | ReinUsesLisp | 1 | -0/+7 | |
2019-06-07 | shader: Split SSY and PBK stack | ReinUsesLisp | 1 | -12/+37 | |
Hardware testing revealed that SSY and PBK push to a different stack, allowing code like this: SSY label1; PBK label2; SYNC; label1: PBK; label2: EXIT; | |||||
2019-06-06 | shader: Use shared_ptr to store nodes and move initialization to file | ReinUsesLisp | 1 | -25/+25 | |
Instead of having a vector of unique_ptr stored in a vector and returning star pointers to this, use shared_ptr. While changing initialization code, move it to a separate file when possible. This is a first step to allow code analysis and node generation beyond the ShaderIR class. | |||||
2019-05-26 | vk_shader_decompiler: Misc fixes | ReinUsesLisp | 1 | -43/+61 | |
Fix missing OpSelectionMerge instruction. This caused devices loses on most hardware, Intel didn't care. Fix [-1;1] -> [0;1] depth conversions. Conditionally use VK_EXT_scalar_block_layout. This allows us to use non-std140 layouts on UBOs. Update external Vulkan headers. | |||||
2019-05-20 | shader: Implement S2R Tid{XYZ} and CtaId{XYZ} | ReinUsesLisp | 1 | -0/+18 | |
2019-05-10 | renderer_vulkan/vk_shader_decompiler: Remove unused variable from DeclareInternalFlags() | Lioncash | 1 | -1/+0 | |
2019-05-03 | shader: Remove unused AbufNode Ipa mode | ReinUsesLisp | 1 | -4/+3 | |
2019-04-16 | vk_shader_decompiler: Add missing operations | ReinUsesLisp | 1 | -0/+7 | |
2019-04-16 | shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmetic | ReinUsesLisp | 1 | -5/+7 | |
Operations done before the main half float operation (like HAdd) were managing a packed value instead of the unpacked one. Adding an unpacked operation allows us to drop the per-operand MetaHalfArithmetic entry, simplifying the code overall. | |||||
2019-04-16 | shader_ir/decode: Implement half float saturation | ReinUsesLisp | 1 | -0/+6 | |
2019-04-14 | shader_ir: Implement STG, keep track of global memory usage and flush | ReinUsesLisp | 1 | -6/+8 | |
2019-04-10 | vk_shader_decompiler: Implement flow primitives | ReinUsesLisp | 1 | -5/+82 | |
2019-04-10 | vk_shader_decompiler: Implement most common texture primitives | ReinUsesLisp | 1 | -8/+65 | |
2019-04-10 | vk_shader_decompiler: Implement texture decompilation helper functions | ReinUsesLisp | 1 | -0/+32 | |
2019-04-10 | vk_shader_decompiler: Implement Assign and LogicalAssign | ReinUsesLisp | 1 | -2/+64 | |
2019-04-10 | vk_shader_decompiler: Implement non-OperationCode visits | ReinUsesLisp | 1 | -7/+129 | |
2019-04-10 | vk_shader_decompiler: Implement OperationCode decompilation interface | ReinUsesLisp | 1 | -1/+411 | |
2019-04-10 | vk_shader_decompiler: Implement Visit | ReinUsesLisp | 1 | -1/+50 | |
2019-04-10 | vk_shader_decompiler: Implement labels tree and flow | ReinUsesLisp | 1 | -0/+71 | |
2019-04-10 | vk_shader_decompiler: Implement declarations | ReinUsesLisp | 1 | -3/+457 | |
2019-04-10 | vk_shader_decompiler: Declare and stub interface for a SPIR-V decompiler | ReinUsesLisp | 1 | -0/+45 | |