summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gl_shader_decompiler: Use uint for images and fix SUATOMReinUsesLisp2019-09-211-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.
* shader/image: Implement SULD and remove irrelevant codeReinUsesLisp2019-09-211-0/+7
| | | | | * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array.
* shader_ir/warp: Implement SHFLReinUsesLisp2019-09-171-0/+50
|
* Merge pull request #2858 from ReinUsesLisp/vk-deviceFernando Sahmkow2019-09-141-3/+3
|\ | | | | vk_device: Add miscellaneous features and minor style changes
| * vk_device: Add miscellaneous features and minor style changesReinUsesLisp2019-09-131-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
* | shader/image: Implement SUATOM and fix SUSTReinUsesLisp2019-09-111-0/+42
|/
* shader_ir: Implement VOTEReinUsesLisp2019-08-211-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.
* Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.Fernando Sahmkow2019-07-201-0/+18
| | | | | This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done.
* shader/half_set_predicate: Fix HSETP2 implementationReinUsesLisp2019-07-201-13/+4
|
* Merge pull request #2695 from ReinUsesLisp/layer-viewportFernando Sahmkow2019-07-151-8/+6
|\ | | | | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders
| * gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp2019-07-081-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.
* | shader_ir: Implement BRX & BRA.CCFernando Sahmkow2019-07-091-0/+9
|/
* shader: Decode SUST and implement backing image functionalityReinUsesLisp2019-06-211-0/+7
|
* shader: Split SSY and PBK stackReinUsesLisp2019-06-071-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;
* shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp2019-06-061-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.
* Merge pull request #2520 from ReinUsesLisp/vulkan-refreshbunnei2019-06-061-43/+61
|\ | | | | vk_device,vk_shader_decompiler: Miscellaneous changes
| * vk_shader_decompiler: Misc fixesReinUsesLisp2019-05-261-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.
* | shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp2019-05-201-0/+18
|/
* Merge pull request #2441 from ReinUsesLisp/al2pbunnei2019-05-191-4/+3
|\ | | | | shader: Implement AL2P and ALD.PHYS
| * shader: Remove unused AbufNode Ipa modeReinUsesLisp2019-05-031-4/+3
| |
* | renderer_vulkan/vk_shader_decompiler: Remove unused variable from DeclareInternalFlags()Lioncash2019-05-101-1/+0
|/
* Merge pull request #2409 from ReinUsesLisp/half-floatsbunnei2019-04-201-5/+20
|\ | | | | shader_ir/decode: Miscellaneous fixes to half-float decompilation
| * vk_shader_decompiler: Add missing operationsReinUsesLisp2019-04-161-0/+7
| |
| * shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmeticReinUsesLisp2019-04-161-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.
| * shader_ir/decode: Implement half float saturationReinUsesLisp2019-04-161-0/+6
| |
* | shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp2019-04-141-6/+8
|/
* vk_shader_decompiler: Implement flow primitivesReinUsesLisp2019-04-101-5/+82
|
* vk_shader_decompiler: Implement most common texture primitivesReinUsesLisp2019-04-101-8/+65
|
* vk_shader_decompiler: Implement texture decompilation helper functionsReinUsesLisp2019-04-101-0/+32
|
* vk_shader_decompiler: Implement Assign and LogicalAssignReinUsesLisp2019-04-101-2/+64
|
* vk_shader_decompiler: Implement non-OperationCode visitsReinUsesLisp2019-04-101-7/+129
|
* vk_shader_decompiler: Implement OperationCode decompilation interfaceReinUsesLisp2019-04-101-1/+411
|
* vk_shader_decompiler: Implement VisitReinUsesLisp2019-04-101-1/+50
|
* vk_shader_decompiler: Implement labels tree and flowReinUsesLisp2019-04-101-0/+71
|
* vk_shader_decompiler: Implement declarationsReinUsesLisp2019-04-101-3/+457
|
* vk_shader_decompiler: Declare and stub interface for a SPIR-V decompilerReinUsesLisp2019-04-101-0/+45