summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader (follow)
Commit message (Collapse)AuthorAgeFilesLines
* half_set_predicate: Fix predicate assignmentsReinUsesLisp2019-09-041-10/+9
|
* Merge pull request #2812 from ReinUsesLisp/f2i-selectorbunnei2019-09-041-6/+16
|\ | | | | shader_ir/conversion: Implement F2I and F2F F16 selector
| * shader_ir/conversion: Split int and float selector and implement F2F H1ReinUsesLisp2019-08-281-18/+16
| |
| * shader_ir/conversion: Implement F2I F16 Ra.H1ReinUsesLisp2019-08-281-4/+16
| |
* | Merge pull request #2811 from ReinUsesLisp/fsetp-fixbunnei2019-09-041-4/+5
|\ \ | | | | | | float_set_predicate: Add missing negation bit for the second operand
| * | float_set_predicate: Add missing negation bit for the second operandReinUsesLisp2019-08-281-4/+5
| |/
* | video_core: Silent miscellaneous warnings (#2820)Rodrigo Locatti2019-08-305-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * texture_cache/surface_params: Remove unused local variable * rasterizer_interface: Add missing documentation commentary * maxwell_dma: Remove unused rasterizer reference * video_core/gpu: Sort member declaration order to silent -Wreorder warning * fermi_2d: Remove unused MemoryManager reference * video_core: Silent unused variable warnings * buffer_cache: Silent -Wreorder warnings * kepler_memory: Remove unused MemoryManager reference * gl_texture_cache: Add missing override * buffer_cache: Add missing include * shader/decode: Remove unused variables
* | Merge pull request #2758 from ReinUsesLisp/packed-tidbunnei2019-08-293-0/+15
|\ \ | | | | | | shader/decode: Implement S2R Tic
| * | shader/decode: Implement S2R TicReinUsesLisp2019-07-223-0/+15
| | |
* | | shader_ir: Implement VOTEReinUsesLisp2019-08-214-0/+62
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #2777 from ReinUsesLisp/hsetp2-fe3h-fixbunnei2019-08-211-1/+1
|\ \ | | | | | | half_set_predicate: Fix HSETP2_C constant buffer offset
| * | half_set_predicate: Fix HSETP2_C constant buffer offsetReinUsesLisp2019-08-041-1/+1
| | |
* | | Merge pull request #2753 from FernandoS27/float-convertbunnei2019-08-212-16/+39
|\ \ \ | | | | | | | | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.
| * | | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.Fernando Sahmkow2019-07-202-16/+39
| | |/ | |/| | | | | | | | | | This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done.
* | | Merge pull request #2778 from ReinUsesLisp/nopbunnei2019-08-181-0/+6
|\ \ \ | | | | | | | | shader_ir: Implement NOP
| * | | shader_ir: Implement NOPReinUsesLisp2019-08-041-0/+6
| | |/ | |/|
* / | decode/half_set_predicate: Fix predicatesReinUsesLisp2019-07-261-3/+3
|/ /
* | Merge pull request #2739 from lioncash/cflowbunnei2019-07-253-30/+51
|\ \ | | | | | | video_core/control_flow: Minor changes/warning cleanup
| * | video_core/control_flow: Provide operator!= for types with operator==Lioncash2019-07-191-4/+21
| | | | | | | | | | | | Provides operational symmetry for the respective structures.
| * | video_core/control_flow: Prevent sign conversion in TryGetBlock()Lioncash2019-07-191-1/+1
| | | | | | | | | | | | | | | The return value is a u32, not an s32, so this would result in an implicit signedness conversion.
| * | video_core/control_flow: Remove unnecessary BlockStack copy constructorLioncash2019-07-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is the default behavior of the copy constructor, so it doesn't need to be specified. While we're at it we can make the other non-default constructor explicit.
| * | video_core/control_flow: Use std::move where applicableLioncash2019-07-191-10/+15
| | | | | | | | | | | | Results in less work being done where avoidable.
| * | video_core/control_flow: Use the prefix variant of operator++ for iteratorsLioncash2019-07-191-2/+2
| | | | | | | | | | | | | | | Same thing, but potentially allows a standard library implementation to pick a more efficient codepath.
| * | video_core/control_flow: Use empty() member function for checking emptinessLioncash2019-07-191-2/+2
| | | | | | | | | | | | It's what it's there for.
| * | video_core: Resolve -Wreorder warningsLioncash2019-07-191-1/+1
| | | | | | | | | | | | | | | Ensures that the constructor members are always initialized in the order that they're declared in.
| * | video_core/control_flow: Make program_size for ScanFlow() a std::size_tLioncash2019-07-192-5/+4
| | | | | | | | | | | | | | | | | | Prevents a truncation warning from occurring with MSVC. Also the internal data structures already treat it as a size_t, so this is just a discrepancy in the interface.
| * | video_core/control_flow: Place all internally linked types/functions within an anonymous namespaceLioncash2019-07-191-1/+2
| | | | | | | | | | | | | | | Previously, quite a few functions were being linked with external linkage.
| * | video_core/shader/decode: Prevent sign-conversion warningsLioncash2019-07-191-2/+2
| | | | | | | | | | | | Makes it explicit that the conversions here are intentional.
* | | Merge pull request #2737 from FernandoS27/track-fixbunnei2019-07-251-2/+2
|\ \ \ | | | | | | | | Shader_Ir: Correct tracking to track from right to left
| * | | Shader_Ir: Correct tracking to track from right to leftFernando Sahmkow2019-07-161-2/+2
| | | |
* | | | Merge pull request #2743 from FernandoS27/surpress-assertbunnei2019-07-255-13/+20
|\ \ \ \ | |_|_|/ |/| | | Downgrade and suppress a series of GPU asserts and debug messages.
| * | | Shader_Ir: Change Debug Asserts for Log WarningsFernando Sahmkow2019-07-203-10/+17
| | | |
| * | | Shader_Ir: correct clang formatFernando Sahmkow2019-07-181-2/+2
| | | |
| * | | Shader_Ir: Downgrade precision and rounding asserts to debug asserts.Fernando Sahmkow2019-07-185-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | This commit reduces the sevirity of asserts for FP precision and rounding as this are well known and have little to no consequences in gpu's accuracy.
* | | | shader/half_set_predicate: Fix HSETP2 implementationReinUsesLisp2019-07-202-19/+15
| | | |
* | | | shader/half_set_predicate: Implement missing HSETP2 variantsReinUsesLisp2019-07-201-13/+29
| |_|/ |/| |
* | | Merge pull request #2738 from lioncash/shader-irbunnei2019-07-188-99/+103
|\ \ \ | |/ / |/| | shader-ir: Minor cleanup-related changes
| * | shader_ir: std::move Node instance where applicableLioncash2019-07-174-60/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | These are std::shared_ptr instances underneath the hood, which means copying them isn't as cheap as a regular pointer. Particularly so on weakly-ordered systems. This avoids atomic reference count increments and decrements where they aren't necessary for the core set of operations.
| * | shader_ir: Rename Get/SetTemporal to Get/SetTemporaryLioncash2019-07-175-36/+36
| | | | | | | | | | | | | | | | | | This is more accurate in terms of describing what the functions are actually doing. Temporal relates to time, not the setting of a temporary itself.
| * | shader_ir: Remove unused includesLioncash2019-07-171-3/+0
| |/ | | | | | | Removes unnecessary header dependencies.
* | Merge pull request #2740 from lioncash/braFernando Sahmkow2019-07-171-1/+1
|\ \ | |/ |/| shader/decode/other: Correct branch indirect argument within BRA handling
| * shader/decode/other: Correct branch indirect argument within BRA handlingLioncash2019-07-161-1/+1
| | | | | | | | | | This appears to have been a copy/paste error introduced within 8a6fc529a968e007f01464abadd32f9b5eb0a26c
* | Merge pull request #2565 from ReinUsesLisp/track-indirectFernando Sahmkow2019-07-166-35/+36
|\ \ | |/ |/| shader/track: Track indirect buffers
| * shader: Allow tracking of indirect buffers without variable offsetReinUsesLisp2019-07-156-35/+36
| | | | | | | | | | | | While changing this code, simplify tracking code to allow returning the base address node, this way callers don't have to manually rebuild it on each invocation.
* | Merge pull request #2695 from ReinUsesLisp/layer-viewportFernando Sahmkow2019-07-152-0/+31
|\ \ | |/ |/| 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-082-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #2692 from ReinUsesLisp/tlds-f16Fernando Sahmkow2019-07-141-1/+7
|\ \ | | | | | | shader/texture: Add F16 support for TLDS
| * | shader/texture: Add F16 support for TLDSReinUsesLisp2019-07-071-1/+7
| | |
* | | shader_ir: Add comments on missing instruction.Fernando Sahmkow2019-07-092-2/+9
| | | | | | | | | | | | Also shows Nvidia's address space on comments.
* | | shader_ir: limit explorastion to best known program size.Fernando Sahmkow2019-07-091-1/+1
| | |
* | | control_flow: Correct block breaking algorithm.Fernando Sahmkow2019-07-091-17/+17
| | |
* | | control_flow: Assert shaders bigger than limit.Fernando Sahmkow2019-07-091-0/+2
| | |
* | | control_flow: Address feedback.Fernando Sahmkow2019-07-091-89/+37
| | |
* | | shader_ir: Correct parsing of scheduling instructions and correct sizingFernando Sahmkow2019-07-092-13/+30
| | |
* | | shader_ir: Correct max sizingFernando Sahmkow2019-07-092-2/+2
| | |
* | | shader_ir: Remove unnecessary constructors and use optional for ScanFlow resultFernando Sahmkow2019-07-093-28/+17
| | |
* | | shader_ir: Corrections, documenting and asserting control_flowFernando Sahmkow2019-07-093-52/+54
| | |
* | | shader_ir: Unify blocks in decompiled shaders.Fernando Sahmkow2019-07-096-54/+79
| | |
* | | shader_ir: Decompile Flow StackFernando Sahmkow2019-07-094-11/+206
| | |
* | | shader_ir: propagate shader size to the IRFernando Sahmkow2019-07-093-6/+7
| | |
* | | shader_ir: Implement BRX & BRA.CCFernando Sahmkow2019-07-093-4/+42
| | |
* | | shader_ir: Remove the old scanner.Fernando Sahmkow2019-07-092-77/+0
| | |
* | | shader_ir: Implement a new shader scannerFernando Sahmkow2019-07-093-16/+471
| |/ |/|
* | Delete decode_integer_set.cppTobias2019-07-071-0/+0
|/
* decode/texture: Address feedbackReinUsesLisp2019-06-241-0/+1
|
* texture_cache: Style and CorrectionsFernando Sahmkow2019-06-211-1/+2
|
* shader_ir: Fix image copy rebase issuesFernando Sahmkow2019-06-211-2/+7
|
* shader: Implement bindless imagesReinUsesLisp2019-06-213-2/+40
|
* shader: Decode SUST and implement backing image functionalityReinUsesLisp2019-06-214-1/+140
|
* shader: Implement texture buffersReinUsesLisp2019-06-212-0/+46
|
* shader: Split SSY and PBK stackReinUsesLisp2019-06-072-11/+14
| | | | | | | | | | | 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/node: Minor changesReinUsesLisp2019-06-071-50/+54
| | | | | | | Reflect std::shared_ptr nature of Node on initializers and remove constant members in nodes. Add some commentaries.
* shader: Move Node declarations out of the shader IR headerReinUsesLisp2019-06-073-493/+517
| | | | | | Analysis passes do not have a good reason to depend on shader_ir.h to work on top of nodes. This splits node-related declarations to their own file and leaves the IR in shader_ir.h
* shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp2019-06-0632-192/+238
| | | | | | | | | 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 #2446 from ReinUsesLisp/tidbunnei2019-05-292-15/+35
|\ | | | | shader: Implement S2R Tid{XYZ} and CtaId{XYZ}
| * shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp2019-05-202-15/+35
| |
* | Merge pull request #2485 from ReinUsesLisp/generic-memorybunnei2019-05-252-31/+57
|\ \ | | | | | | shader/memory: Implement generic memory stores and loads (ST and LD)
| * | shader/memory: Implement ST (generic memory)ReinUsesLisp2019-05-211-21/+35
| | |
| * | shader/memory: Implement LD (generic memory)ReinUsesLisp2019-05-212-11/+23
| |/
* | shader/shader_ir: Make Comment() take a std::string by valueLioncash2019-05-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for forming comment nodes without making unnecessary copies of the std::string instance. e.g. previously: Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]", cbuf->GetIndex(), cbuf_offset)); Would result in a copy of the string being created, as CommentNode() takes a std::string by value (a const ref passed to a value parameter results in a copy). Now, only one instance of the string is ever moved around. (fmt::format returns a std::string, and since it's returned from a function by value, this is a prvalue (which can be treated like an rvalue), so it's moved into Comment's string parameter), we then move it into the CommentNode constructor, which then moves the string into its member variable).
* | shader/decode/*: Add missing newline to files lacking themLioncash2019-05-2318-18/+18
| | | | | | | | Keeps the shader code file endings consistent.
* | shader/decode/*: Eliminate indirect inclusionsLioncash2019-05-236-1/+5
| | | | | | | | | | | | | | Amends cases where we were using things that were indirectly being satisfied through other headers. This way, if those headers change and eliminate dependencies on other headers in the future, we don't have cascading compilation errors.
* | shader/decode/memory: Remove left in debug pragmaLioncash2019-05-221-2/+0
|/
* Merge pull request #2441 from ReinUsesLisp/al2pbunnei2019-05-194-34/+67
|\ | | | | shader: Implement AL2P and ALD.PHYS
| * shader_ir/other: Implement IPA.IDXReinUsesLisp2019-05-031-5/+8
| |
| * shader_ir/memory: Assert on non-32 bits ALD.PHYSReinUsesLisp2019-05-031-0/+3
| |
| * shader: Add physical attributes commentariesReinUsesLisp2019-05-033-4/+6
| |
| * gl_shader_decompiler: Implement GLSL physical attributesReinUsesLisp2019-05-031-1/+1
| |
| * shader_ir/memory: Implement physical input attributesReinUsesLisp2019-05-033-6/+28
| |
| * shader: Remove unused AbufNode Ipa modeReinUsesLisp2019-05-034-29/+10
| |
| * shader_ir/memory: Emit AL2P IRReinUsesLisp2019-05-032-0/+22
| |
* | shader/shader_ir: Remove unnecessary inline specifiersLioncash2019-05-191-2/+2
| | | | | | | | | | constexpr internally links by default, so the inline specifier is unnecessary.
* | shader/shader_ir: Simplify constructors for OperationNodeLioncash2019-05-191-15/+6
| | | | | | | | | | | | | | | | | | | | Many of these constructors don't even need to be templated. The only ones that need to be templated are the ones that actually make use of the parameter pack. Even then, since std::vector accepts an initializer list, we can supply the parameter pack directly to it instead of creating our own copy of the list, then copying it again into the std::vector.
* | shader/shader_ir: Remove unnecessary template parameter packs from Operation() overloads where applicableLioncash2019-05-191-2/+0
| | | | | | | | | | These overloads don't actually make use of the parameter pack, so they can be turned into regular non-template function overloads.
* | shader/shader_ir: Mark tracking functions as const member functionsLioncash2019-05-192-8/+11
| | | | | | | | | | These don't actually modify instance state, so they can be marked as const member functions
* | shader/shader_ir: Place implementations of constructor and destructor in cpp fileLioncash2019-05-192-5/+9
| | | | | | | | | | | | Given the class contains quite a lot of non-trivial types, place the constructor and destructor within the cpp file to avoid inlining construction and destruction code everywhere the class is used.
* | video_core/shader/decode/texture: Remove unused variable from GetTld4Code()Lioncash2019-05-101-1/+0
| |
* | shader/decode/texture: Remove unused variableLioncash2019-05-041-1/+0
|/ | | | This isn't used anywhere, so we can get rid of it.
* Merge pull request #2435 from ReinUsesLisp/misc-vcbunnei2019-04-292-3/+4
|\ | | | | shader_ir: Miscellaneous fixes
| * shader_ir: Move Sampler index entry in operand< to sort declarationsReinUsesLisp2019-04-261-2/+2
| |
| * shader_ir: Add missing entry to Sampler operand< comparisonReinUsesLisp2019-04-261-2/+3
| |
| * shader_ir/texture: Fix sampler const buffer key shiftReinUsesLisp2019-04-261-1/+1
| |
* | Merge pull request #2322 from ReinUsesLisp/wswitchbunnei2019-04-294-9/+16
|\ \ | | | | | | video_core: Silent -Wswitch warnings
| * | video_core: Silent -Wswitch warningsReinUsesLisp2019-04-184-9/+16
| | |
* | | Merge pull request #2423 from FernandoS27/half-correctbunnei2019-04-292-15/+16
|\ \ \ | |_|/ |/| | Corrections on Half Float operations: HADD2 HMUL2 and HFMA2
| * | Corrections Half Float operations on const buffers and implement saturation.Fernando Sahmkow2019-04-212-15/+16
| | |
* | | Merge pull request #2407 from FernandoS27/f2fbunnei2019-04-201-16/+53
|\ \ \ | |/ / |/| | Do some corrections in conversion shader instructions.
| * | Do some corrections in conversion shader instructions.Fernando Sahmkow2019-04-161-16/+53
| |/ | | | | | | | | | | Corrects encodings for I2F, F2F, I2I and F2I Implements Immediate variants of all four conversion types. Add assertions to unimplemented stuffs.
* | Merge pull request #2409 from ReinUsesLisp/half-floatsbunnei2019-04-207-81/+85
|\ \ | | | | | | shader_ir/decode: Miscellaneous fixes to half-float decompilation
| * | shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmeticReinUsesLisp2019-04-167-52/+42
| | | | | | | | | | | | | | | | | | | | | 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-163-4/+14
| | |
| * | shader_ir/decode: Reduce severity of unimplemented half-float FTZReinUsesLisp2019-04-163-3/+9
| | |
| * | renderer_opengl: Implement half float NaN comparisonsReinUsesLisp2019-04-162-18/+17
| | |
| * | shader_ir: Avoid using static on heap-allocated objectsReinUsesLisp2019-04-161-5/+4
| |/ | | | | | | | | Using static here might be faster at runtime, but it adds a heap allocation called before main.
* | Merge pull request #2348 from FernandoS27/guest-bindlessbunnei2019-04-182-24/+129
|\ \ | | | | | | Implement Bindless Textures on Shader Decompiler and GL backend
| * | Adapt Bindless to work with AOFFIFernando Sahmkow2019-04-081-7/+18
| | |
| * | Move ConstBufferAccessor to Maxwell3d, correct mistakes and clang format.Fernando Sahmkow2019-04-082-3/+4
| | |
| * | Fix TMMLFernando Sahmkow2019-04-081-5/+7
| | |
| * | Refactor GetTextureCode and GetTexCode to use an optional instead of optional parametersFernando Sahmkow2019-04-082-34/+33
| | |
| * | Implement TXQ_BFernando Sahmkow2019-04-081-2/+8
| | |
| * | Implement TMML_BFernando Sahmkow2019-04-081-5/+10
| | |
| * | Corrections to TEX_BFernando Sahmkow2019-04-081-4/+5
| | |
| * | Implement Bindless Handling on SetupTextureFernando Sahmkow2019-04-081-4/+3
| | |
| * | Unify both sampler types.Fernando Sahmkow2019-04-082-18/+40
| | |
| * | Implement Bindless Samplers and TEX_B in the IR.Fernando Sahmkow2019-04-082-15/+74
| | |
* | | Merge pull request #2315 from ReinUsesLisp/severity-decompilerbunnei2019-04-171-4/+5
|\ \ \ | | | | | | | | shader_ir/decode: Reduce the severity of common assertions
| * | | shader_ir/memory: Reduce severity of LD_L cache management and log itReinUsesLisp2019-04-031-2/+2
| | | |
| * | | shader_ir/memory: Reduce severity of ST_L cache management and log itReinUsesLisp2019-04-031-2/+3
| | | |
* | | | shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp2019-04-142-38/+87
| |_|/ |/| |
* | | Correct XMAD mode, psl and high_b on different encodings.Fernando Sahmkow2019-04-081-9/+30
| |/ |/|
* | shader_ir/decode: Silent implicit sign conversion warningMat M2019-03-311-2/+2
| | | | | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
* | shader_ir/decode: Implement AOFFI for TEX and TLD4ReinUsesLisp2019-03-302-27/+94
| |
* | shader_ir: Implement immediate register trackingReinUsesLisp2019-03-302-1/+19
|/
* shader/decode: Remove extras from MetaTextureReinUsesLisp2019-02-262-15/+26
|
* shader/decode: Split memory and texture instructions decodingReinUsesLisp2019-02-264-493/+527
|
* shader/track: Resolve variable shadowing warningsLioncash2019-02-251-5/+5
|
* Merge pull request #2118 from FernandoS27/ipa-improvebunnei2019-02-252-3/+14
|\ | | | | shader_decompiler: Improve Accuracy of Attribute Interpolation.
| * shader_decompiler: Improve Accuracy of Attribute Interpolation.Fernando Sahmkow2019-02-142-3/+14
| |
* | gl_shader_decompiler: Re-implement TLDS lodReinUsesLisp2019-02-121-1/+1
|/
* Merge pull request #2108 from FernandoS27/fix-ccbunnei2019-02-121-2/+2
|\ | | | | Fix incorrect value for CC bit in IADD
| * Fix incorrect value for CC bit in IADDFernando Sahmkow2019-02-111-2/+2
| |
* | Merge pull request #2109 from FernandoS27/fix-f2ibunnei2019-02-121-3/+3
|\ \ | | | | | | Corrected F2I None mode to RoundEven.
| * | Corrected F2I None mode to RoundEven.Fernando Sahmkow2019-02-111-3/+3
| |/
* | shader_ir: Remove F4 prefix to texture operationsReinUsesLisp2019-02-072-14/+13
| | | | | | | | | | | | This was originally included because texture operations returned a vec4. These operations now return a single float and the F4 prefix doesn't mean anything.
* | shader_ir: Clean texture management codeReinUsesLisp2019-02-072-101/+63
|/ | | | | | | | | Previous code relied on GLSL parameter order (something that's always ill-formed on an IR design). This approach passes spatial coordiantes through operation nodes and array and depth compare values in the the texture metadata. It still contains an "extra" vector containing generic nodes for bias and component index (for example) which is still a bit ill-formed but it should be better than the previous approach.
* Merge pull request #2083 from ReinUsesLisp/shader-ir-cbuf-trackingbunnei2019-02-0729-124/+138
|\ | | | | shader/track: Add a more permissive global memory tracking
| * shader/track: Search inside of conditional nodesReinUsesLisp2019-02-031-0/+11
| | | | | | | | | | | | Some games search conditionally use global memory instructions. This allows the heuristic to search inside conditional nodes for the source constant buffer.
| * shader_ir: Rename BasicBlock to NodeBlockReinUsesLisp2019-02-0329-119/+117
| | | | | | | | It's not always used as a basic block. Rename it for consistency.
| * shader_ir: Pass decoded nodes as a whole instead of per basic blocksReinUsesLisp2019-02-0327-57/+62
| | | | | | | | | | | | | | | | | | Some games call LDG at the top of a basic block, making the tracking heuristic to fail. This commit lets the heuristic the decoded nodes as a whole instead of per basic blocks. This may lead to some false positives but allows it the heuristic to track cases it previously couldn't.
* | gl_shader_disk_cache: Save GLSL and entries into the precompiled fileReinUsesLisp2019-02-071-0/+9
| |
* | Merge pull request #2081 from ReinUsesLisp/lmem-64bunnei2019-02-051-12/+43
|\ \ | | | | | | shader_ir/memory: Add LD_L 64 bits loads
| * | shader_ir/memory: Add ST_L 64 and 128 bits storesReinUsesLisp2019-02-031-3/+11
| | |
| * | shader_ir/memory: Add LD_L 128 bits loadsReinUsesLisp2019-02-031-7/+19
| | |
| * | shader_bytecode: Rename BytesN enums to BitsNReinUsesLisp2019-02-031-4/+4
| | |
| * | shader_ir/memory: Add LD_L 64 bits loadsReinUsesLisp2019-02-031-6/+17
| |/
* | Merge pull request #2082 from FernandoS27/txq-stlbunnei2019-02-051-6/+9
|\ \ | |/ |/| Fix TXQ not using the component mask.
| * Fix TXQ not using the component mask.Fernando Sahmkow2019-02-031-6/+9
| |
* | shader_ir: Unify constant buffer offset valuesReinUsesLisp2019-01-3014-22/+24
|/ | | | | | | Constant buffer values on the shader IR were using different offsets if the access direct or indirect. cbuf34 has a non-multiplied offset while cbuf36 does. On shader decoding this commit multiplies it by four on cbuf34 queries.
* shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp2019-01-303-4/+159
|
* shader/shader_ir: Amend three comment typosLioncash2019-01-281-3/+3
| | | | | Given we're in the area, these are three trivial typos that can be corrected.
* shader/shader_ir: Amend constructor initializer ordering for AbufNodeLioncash2019-01-281-2/+2
| | | | | Orders the class members in the same order that they would actually be initialized in. Gets rid of two compiler warnings.
* shader/decode: Avoid a pessimizing std::move within DecodeRange()Lioncash2019-01-281-1/+1
| | | | | | std::moveing a local variable in a return statement has the potential to prevent copy elision from occurring, so this can just be converted into a regular return.
* shader_ir: Fixup clang buildReinUsesLisp2019-01-161-4/+6
|
* shader_decode: Fixup XMADReinUsesLisp2019-01-151-1/+1
|
* shader_ir: Pass to decoder functions basic block's codeReinUsesLisp2019-01-1527-82/+83
|
* shader_decode: Improve zero flag implementationReinUsesLisp2019-01-1515-75/+79
|
* shader_ir: Remove composite primitives and use temporals insteadReinUsesLisp2019-01-153-175/+187
|
* shader_decode: Use proper primitive namesReinUsesLisp2019-01-153-15/+13
|
* shader_decode: Use BitfieldExtract instead of shift + andReinUsesLisp2019-01-157-48/+30
|
* shader_ir: Remove Ipa primitiveReinUsesLisp2019-01-152-5/+2
|
* video_core: Rename glsl_decompiler to gl_shader_decompilerReinUsesLisp2019-01-152-1631/+0
|
* shader_ir: Remove RZ and use Register::ZeroIndex insteadReinUsesLisp2019-01-153-12/+16
|
* shader_decode: Implement TEXS.F16ReinUsesLisp2019-01-153-15/+57
|
* shader_decode: Fixup R2PReinUsesLisp2019-01-151-2/+3
|
* glsl_decompiler: Fixup TLDSReinUsesLisp2019-01-151-1/+0
|
* glsl_decompiler: Fixup geometry shadersReinUsesLisp2019-01-151-10/+16
|
* shader_decode: Fixup WriteLogicOperation zero comparisonReinUsesLisp2019-01-151-1/+1
|
* glsl_decompiler: Fixup permissive member function declarationsReinUsesLisp2019-01-151-133/+133
|
* shader_decode: Fixup PSETReinUsesLisp2019-01-151-2/+3
|
* shader_decode: Fixup clang-formatReinUsesLisp2019-01-152-2/+4
|
* video_core: Implement IR based geometry shadersReinUsesLisp2019-01-153-2/+96
|
* shader_decode: Implement VMAD and VSETPReinUsesLisp2019-01-153-0/+125
|
* shader_decode: Implement HSET2ReinUsesLisp2019-01-153-1/+50
|
* shader_decode: Rework HSETP2ReinUsesLisp2019-01-154-47/+57
|
* shader_decode: Implement R2PReinUsesLisp2019-01-151-1/+28
|
* shader_decode: Implement CSETPReinUsesLisp2019-01-151-14/+37
|
* shader_decode: Implement PSETReinUsesLisp2019-01-151-1/+16
|
* shader_decode: Implement HFMA2ReinUsesLisp2019-01-153-5/+59
|
* glsl_decompiler: Remove HNegate inliningReinUsesLisp2019-01-151-10/+0
|
* shader_decode: Implement POPCReinUsesLisp2019-01-154-1/+22
|
* shader_decode: Implement TLDS (untested)ReinUsesLisp2019-01-153-10/+92
|
* shader_decode: Update TLD4 reflecting #1862 changesReinUsesLisp2019-01-152-52/+52
|
* shader_ir: Fixup TEX and TEXS and partially fix TLD4 decompilingReinUsesLisp2019-01-153-60/+72
|
* shader_decode: Fixup FSETReinUsesLisp2019-01-151-2/+2
|
* shader_decode: Implement IADD32IReinUsesLisp2019-01-151-0/+11
|
* video_core: Return safe values after an assert hitsReinUsesLisp2019-01-158-8/+19
|
* shader_decode: Implement FFMAReinUsesLisp2019-01-151-1/+36
|
* video_core: Address feedbackReinUsesLisp2019-01-154-13/+16
|
* shader_ir: Fixup file inclusions and clang-formatReinUsesLisp2019-01-153-2/+2
|
* shader_ir: Move comment node stringMat M2019-01-151-2/+2
| | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
* shader_ir: Address feedback to avoid UB in bit castingReinUsesLisp2019-01-151-2/+4
|
* shader_decode: Fixup clang-formatReinUsesLisp2019-01-152-3/+2
|
* shader_decode: Implement LEAReinUsesLisp2019-01-151-0/+55
|
* shader_decode: Implement IADD3ReinUsesLisp2019-01-151-0/+61
|
* shader_decode: Implement LOP3ReinUsesLisp2019-01-152-0/+62
|
* shader_decode: Implement ST_LReinUsesLisp2019-01-151-0/+17
|
* shader_decode: Implement LD_LReinUsesLisp2019-01-151-0/+18
|
* shader_decode: Implement HSETP2ReinUsesLisp2019-01-151-1/+37
|
* shader_decode: Implement HADD2 and HMUL2ReinUsesLisp2019-01-151-1/+48
|
* shader_decode: Implement HADD2_IMM and HMUL2_IMMReinUsesLisp2019-01-151-1/+28
|
* shader_decode: Implement MOV_SYSReinUsesLisp2019-01-151-0/+27
|
* shader_decode: Implement IMNMXReinUsesLisp2019-01-151-0/+16
|
* shader_decode: Implement F2F_CReinUsesLisp2019-01-151-2/+10
|
* shader_decode: Implement I2IReinUsesLisp2019-01-151-0/+26
|
* shader_decode: Implement BRA internal flagReinUsesLisp2019-01-151-4/+8
|
* shader_decode: Implement ISCADDReinUsesLisp2019-01-151-0/+15
|
* shader_decode: Implement XMADReinUsesLisp2019-01-151-1/+85
|
* shader_decode: Implement PBK and BRKReinUsesLisp2019-01-151-1/+22
|
* shader_decode: Implement LOPReinUsesLisp2019-01-151-0/+15
|
* shader_decode: Implement SELReinUsesLisp2019-01-151-0/+8
|
* shader_decode: Implement IADDReinUsesLisp2019-01-151-1/+28
|
* shader_decode: Implement ISETPReinUsesLisp2019-01-151-1/+30
|
* shader_decode: Implement BFIReinUsesLisp2019-01-151-1/+22
|
* shader_decode: Implement ISETReinUsesLisp2019-01-151-1/+27
|
* shader_decode: Implement LD_CReinUsesLisp2019-01-151-0/+31
|
* shader_decode: Implement SHLReinUsesLisp2019-01-151-0/+8
|
* shader_decode: Implement SHRReinUsesLisp2019-01-151-1/+26
|
* shader_decode: Implement LOP32IReinUsesLisp2019-01-152-1/+72
|
* shader_decode: Implement BFEReinUsesLisp2019-01-151-1/+25
|
* shader_decode: Implement FSETReinUsesLisp2019-01-151-1/+36
|
* shader_decode: Implement F2IReinUsesLisp2019-01-151-0/+37
|
* shader_decode: Implement I2FReinUsesLisp2019-01-151-0/+23
|
* shader_decode: Implement F2FReinUsesLisp2019-01-151-1/+37
|
* shader_decode: Stub DEPBARReinUsesLisp2019-01-151-0/+4
|
* shader_decode: Implement SSY and SYNCReinUsesLisp2019-01-151-0/+19
|
* shader_decode: Implement PSETPReinUsesLisp2019-01-151-1/+21
|
* shader_decode: Implement TMMLReinUsesLisp2019-01-151-3/+45
|
* shader_decode: Implement TEX and TXQReinUsesLisp2019-01-152-0/+223
|
* shader_decode: Implement TEXS (F32)ReinUsesLisp2019-01-152-0/+217
|
* shader_decode: Implement FSETPReinUsesLisp2019-01-151-1/+33
|
* shader_decode: Partially implement BRAReinUsesLisp2019-01-151-0/+12
|
* shader_decode: Implement IPAReinUsesLisp2019-01-151-0/+12
|
* shader_decode: Implement EXITReinUsesLisp2019-01-151-1/+32
|
* shader_decode: Implement ST_AReinUsesLisp2019-01-151-0/+30
|
* shader_decode: Implement LD_AReinUsesLisp2019-01-151-1/+39
|
* shader_decode: Implement FADD32IReinUsesLisp2019-01-151-0/+12
|
* shader_decode: Implement FMUL32_IMMReinUsesLisp2019-01-151-0/+10
|
* shader_decode: Implement MOV32_IMMReinUsesLisp2019-01-151-1/+9
|
* shader_decode: Stub RRO_C, RRO_R and RRO_IMMReinUsesLisp2019-01-151-0/+9
|
* shader_decode: Implement FMNMX_C, FMNMX_R and FMNMX_IMMReinUsesLisp2019-01-151-0/+18
|
* shader_decode: Implement MUFUReinUsesLisp2019-01-151-0/+29
|
* shader_decode: Implement FADD_C, FADD_R and FADD_IMMReinUsesLisp2019-01-151-0/+15
|
* shader_decode: Implement FMUL_C, FMUL_R and FMUL_IMMReinUsesLisp2019-01-151-0/+42
|
* shader_decode: Implement MOV_C and MOV_RReinUsesLisp2019-01-151-1/+23
|
* glsl_decompiler: ImplementationReinUsesLisp2019-01-152-0/+1481
|
* shader_ir: Add condition code helperReinUsesLisp2019-01-152-0/+13
|
* shader_ir: Add predicate combiner helperReinUsesLisp2019-01-152-0/+15
|
* shader_ir: Add comparison helpersReinUsesLisp2019-01-152-0/+106
|
* shader_ir: Add half float helpersReinUsesLisp2019-01-152-0/+44
|
* shader_ir: Add integer helpersReinUsesLisp2019-01-152-0/+40
|
* shader_ir: Add float helpersReinUsesLisp2019-01-152-0/+24
|
* shader_ir: Add settersReinUsesLisp2019-01-152-0/+24
|
* shader_ir: Add local memory gettersReinUsesLisp2019-01-152-0/+7
|
* shader_ir: Add internal flag gettersReinUsesLisp2019-01-152-0/+10
|
* shader_ir: Add attribute gettersReinUsesLisp2019-01-152-0/+26
|
* shader_ir: Add constant buffer gettersReinUsesLisp2019-01-152-0/+25
|
* shader_ir: Add register getterReinUsesLisp2019-01-152-0/+9
|
* shader_ir: Add immediate node constructorsReinUsesLisp2019-01-152-1/+34
|
* shader_ir: Initial implementationReinUsesLisp2019-01-1528-0/+1542
|
* Remove references to PICA and rasterizers in video_coreJames Rowe2018-01-139-2453/+0
|
* Improved performance of FromAttributeBufferHuw Pascoe2017-09-171-1/+2
| | | | | | | Ternary operator is optimized by the compiler whereas std::min() is meant to return a value. I've noticed a 5%-10% emulation speed increase.
* pica/shader/jit: implement SETEMIT and EMITwwylele2017-08-192-2/+49
|
* correct constnesswwylele2017-08-192-2/+4
|
* pica/shader/interpreter: implement SETEMIT and EMITwwylele2017-08-191-0/+16
|
* pica/shader: extend UnitState for GSwwylele2017-08-192-0/+84
| | | | | Among four shader units in pica, a special unit can be configured to run both VS and GS program. GSUnitState represents this unit, which extends UnitState (which represents the other three normal units) with extra state for primitive emitting. It uses lots of raw pointers to represent internal structure in order to keep it standard layout type for JIT to access. This unit doesn't handle triangle winding (inverting) itself; instead, it calls a WindingSetter handler. This will be explained in the following commits
* pica/shader_interpreter: fix off-by-one in LOOPwwylele2017-07-271-1/+1
|
* Stop using reserved operator names (and/or/xor) with XbyakYuri Kunde Schlesner2017-06-171-13/+13
| | | | Also has the Dynarmic upgrade with the same change
* Pica: Set program code / swizzle data limit to 4096Jannik Vogel2017-05-115-13/+16
| | | | | | | | | | | | | One of the later commits will enable writing to GS regs. It turns out that on startup, most games will write 4096 GS program words. The current limit of 1024 would hence result in 3072 (4096 - 1024) error messages: ``` HW.GPU <Error> video_core/shader/shader.cpp:WriteProgramCode:229: Invalid GS program offset 1024 ``` New constants have been introduced to represent these limits. The swizzle data size has also been raised. This matches the given field sizes of [GPUREG_SH_OPDESCS_INDEX](https://3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_OPDESCS_INDEX) and [GPUREG_SH_CODETRANSFER_INDEX](https://www.3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_CODETRANSFER_INDEX) (12 bit = [0; 4095]).
* Doxygen: Amend minor issues (#2593)Mat M2017-02-272-2/+4
| | | | | | | | | Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
* video_core/shader: Document sanitized MUL operationYuri Kunde Schlesner2017-02-121-0/+8
|
* Merge pull request #2550 from yuriks/pica-refactor2Yuri Kunde Schlesner2017-02-122-2/+4
|\ | | | | Small VideoCore cleanups
| * VideoCore: Split regs.h inclusionsYuri Kunde Schlesner2017-02-092-2/+4
| |
* | video_core: Fix benign out-of-bounds indexing of array (#2553)Yuri Kunde Schlesner2017-02-111-2/+1
|/ | | | | | The resulting pointer wasn't written to unless the index was verified as valid, but that's still UB and triggered debug checks in MSVC. Reported by garrettboast on IRC
* VideoCore: Move Regs to its own fileYuri Kunde Schlesner2017-02-042-2/+2
|
* VideoCore: Split shader regs from Regs structYuri Kunde Schlesner2017-02-044-6/+6
|
* VideoCore: Split rasterizer regs from Regs structYuri Kunde Schlesner2017-02-042-13/+13
|
* Merge pull request #2476 from yuriks/shader-refactor3Yuri Kunde Schlesner2017-02-044-78/+58
|\ | | | | Oh No! More shader changes!
| * VideoCore: Extract swrast-specific data from OutputVertexYuri Kunde Schlesner2017-01-302-37/+14
| |
| * VideoCore/Shader: Clean up OutputVertex::FromAttributeBufferYuri Kunde Schlesner2017-01-301-9/+14
| | | | | | | | | | | | This also fixes a long-standing but neverthless harmless memory corruption bug, whech the padding of the OutputVertex struct would get corrupted by unused attributes.
| * VideoCore: Split shader output writing from semantic loadingYuri Kunde Schlesner2017-01-302-18/+16
| |
| * VideoCore: Consistently use shader configuration to load attributesYuri Kunde Schlesner2017-01-304-12/+12
| |
| * VideoCore: Rename some types to more accurate namesYuri Kunde Schlesner2017-01-304-6/+6
| |
* | ShaderJIT: add 16 dummy bytes at the bottom of the stackwwylele2017-02-031-2/+5
| |
* | Common/x64: remove legacy emitter and abi (#2504)Weiyi Wang2017-01-311-1/+0
| | | | | | These are not used any more since we moved shader JIT to xbyak.
* | shader_jit_x64_compiler: esi and edi should be persistent (#2500)Merry2017-01-311-0/+2
|/
* VideoCore/Shader: Move entry_point to SetupBatchYuri Kunde Schlesner2017-01-265-22/+23
|
* VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetupYuri Kunde Schlesner2017-01-265-40/+36
|
* Shader: Remove OutputRegisters structYuri Kunde Schlesner2017-01-263-19/+13
|
* Shader: Initialize conditional_code in interpreterYuri Kunde Schlesner2017-01-262-3/+3
| | | | | | | This doesn't belong in LoadInputVertex because it also happens for non-VS invocations. Since it's not used by the JIT it seems adequate to initialize it in the interpreter which is the only thing that cares about them.
* Shader: Don't read ShaderSetup from global stateYuri Kunde Schlesner2017-01-261-3/+3
|
* shader_jit_x64: Don't read program from global stateYuri Kunde Schlesner2017-01-263-22/+22
|
* VideoCore/Shader: Move ProduceDebugInfo to InterpreterEngineYuri Kunde Schlesner2017-01-264-19/+10
|
* VideoCore/Shader: Split interpreter and JIT into separate ShaderEnginesYuri Kunde Schlesner2017-01-266-96/+150
|
* VideoCore/Shader: Rename shader_jit_x64{ => _compiler}.{cpp,h}Yuri Kunde Schlesner2017-01-263-2/+2
|
* VideoCore/Shader: Split shader uniform state and shader engineYuri Kunde Schlesner2017-01-263-16/+46
| | | | | Currently there's only a single dummy implementation, which will be split in a following commit.
* VideoCore/Shader: Add constness to methodsYuri Kunde Schlesner2017-01-262-4/+4
|
* VideoCore/Shader: Use only entry_point as ShaderSetup paramYuri Kunde Schlesner2017-01-262-9/+11
| | | | | This removes all implicit dependency of ShaderState on global PICA state.
* VideoCore/Shader: Use self instead of g_state.vs in ShaderSetupYuri Kunde Schlesner2017-01-262-11/+8
|
* VideoCore/Shader: Extract input vertex loading code into functionYuri Kunde Schlesner2017-01-262-20/+22
|
* video_core: fix shader.cpp signed / unsigned warningKloen2017-01-231-2/+2
|
* Fix some warnings (#2399)Jonathan Hao2017-01-041-2/+0
|
* VideoCore/Shader: Extract DebugData out from UnitStateYuri Kunde Schlesner2016-12-167-101/+97
|
* Remove unnecessary castYuri Kunde Schlesner2016-12-161-3/+1
|
* VideoCore/Shader: Extract evaluate_condition lambda to function scopeYuri Kunde Schlesner2016-12-161-26/+24
|
* VideoCore/Shader: Extract call lambda up a scope and remove unused paramYuri Kunde Schlesner2016-12-161-21/+17
|
* VideoCore/Shader: Remove dynamic control flow in (Get)UniformOffsetYuri Kunde Schlesner2016-12-162-18/+11
|
* VideoCore/Shader: Move DebugData to a separate fileYuri Kunde Schlesner2016-12-163-172/+188
|
* shader_jit_x64: Use LOOPCOUNT_REG as a 64-bit reg when indexingYuri Kunde Schlesner2016-12-151-1/+1
|
* VideoCore: Eliminate an unnecessary copy in the drawcall loopYuri Kunde Schlesner2016-12-152-2/+2
|
* shader_jit_x64: Use Reg32 for LOOP* registers, eliminating castsYuri Kunde Schlesner2016-12-151-16/+16
|
* VideoCore: Convert x64 shader JIT to use Xbyak for assemblyYuri Kunde Schlesner2016-12-152-223/+225
|
* shader_jit: Fix non-SSE4.1 path where FLR would not truncateJannik Vogel2016-12-041-1/+1
|
* shader_jit: Load LOOPCOUNT_REG and LOOPINC 4 bit left-shiftedJannik Vogel2016-12-021-6/+9
|
* VideoCore: Shader interpreter cleanupsYuri Kunde Schlesner2016-09-301-32/+42
|
* VideoCore: Fix out-of-bounds read in ShaderSetup::ProduceDebugInfoYuri Kunde Schlesner2016-09-301-3/+1
| | | | | | As far as I can tell, memset was replaced by a fill without correcting the parameter type, causing an out-of-bounds array read in the Vec4 constructor.
* Remove special rules for Windows.h and library includesYuri Kunde Schlesner2016-09-211-1/+1
|
* Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner2016-09-213-3/+3
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-215-22/+3
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner2016-09-194-9/+6
|
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-186-311/+335
|
* VideoCore: Fix dangling lambda context in shader interpreterYuri Kunde Schlesner2016-09-161-1/+1
| | | | | | The static meant that after the first execution, these lambda context would be pointing to a random location on the stack. Fixes a random crash when using the interpreter.
* Retrieve shader result from new OutputRegisters-typeJannik Vogel2016-05-163-56/+68
|
* Use new shader-jit signature for interpreterJannik Vogel2016-05-133-8/+8
|
* Refactor access to state in shader-jitJannik Vogel2016-05-134-24/+42
|
* Move program_counter and call_stack from UnitState to interpreterJannik Vogel2016-05-123-45/+42
|
* Move default_attributes into Pica stateJannik Vogel2016-05-121-2/+0
|
* Merge pull request #1690 from JayFoxRox/tex-type-3bunnei2016-05-121-1/+2
|\ | | | | Pica: Implement texture type 3 (Projection2D)
| * Pica: Add tc0.w to OutputVertexJannik Vogel2016-05-111-1/+2
| |
* | Turn ShaderSetup into structJannik Vogel2016-05-112-52/+53
|/
* Pica: Replace logic in shader.cpp with loopJannik Vogel2016-05-031-34/+4
|
* VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot2016-04-306-14/+43
|
* Merge pull request #1730 from hrydgard/vertex-loaderbunnei2016-04-291-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove late accesses to attribute_config * Refactor: Extract VertexLoader from command_processor.cpp. Preparation for a similar concept to Dolphin or PPSSPP. These can be JIT-ed and cached. * Move "&" to their proper place, add missing includes and make some properly relative. * Don't keep base_address in the loader, it doesn't belong there (with it, the loader can't be cached). * Optimize the vertex loader, nearly doubling its speed. * Debugger fix * Move and rename the MemoryAccesses class to MemoryAccessTracker.
| * Refactor: Extract VertexLoader from command_processor.cpp.Henrik Rydgard2016-04-281-1/+1
| | | | | | | | Preparation for a similar concept to Dolphin or PPSSPP. These can be JIT-ed and cached.
* | Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner2016-04-291-3/+0
| | | | | | | | This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI.
* | shader: Shader size is long uint, not uint.Sam Spilsbury2016-04-241-1/+1
| |
* | shader: Handle non-CALL opcodes with a breakSam Spilsbury2016-04-241-0/+2
| |
* | shader: Format string must be provided inline and not as a variableSam Spilsbury2016-04-241-1/+1
|/
* shader_jit_x64: Rename RuntimeAssert to Compile_Assert.bunnei2016-04-142-5/+5
|
* shader_jit_x64.cpp: Rename JitCompiler to JitShader.bunnei2016-04-143-92/+92
|
* shader_jit_x64: Free memory that's no longer needed after compilation.bunnei2016-04-141-0/+6
|
* shader_jit_x64: Use a sorted vector instead of a set for keeping track of return addresses.bunnei2016-04-142-5/+8
|
* shader_jit_x64: Use CALL/RET instead of JMP for subroutines.bunnei2016-04-141-17/+7
|
* shader_jit_x64: Separate initialization and code generation for readability.bunnei2016-04-141-9/+8
|
* shader_jit_x64: Get rid of unnecessary last_program_counter variable.bunnei2016-04-142-6/+2
|
* shader_jit_x64: Execute certain asserts at runtime.bunnei2016-04-142-5/+19
| | | | - This is because we compile the full shader code space, and therefore its common to compile malformed instructions.
* shader: Remove unused 'state' argument from 'Setup' function.bunnei2016-04-142-3/+2
|
* shader_jit_x64: Specify shader main offset at runtime.bunnei2016-04-143-10/+6
|
* shader_jit_x64: Allocate each program independently and persist for emu session.bunnei2016-04-143-38/+28
|
* shader_jit_x64: Rewrite flow control to support arbitrary CALL and JMP instructions.bunnei2016-04-142-35/+119
|
* shader_jit_x64: Fix strict memory aliasing issues.bunnei2016-04-141-1/+3
|
* Merge pull request #1643 from MerryMage/make_uniqueMathew Maidment2016-04-061-1/+0
|\ | | | | Common: Remove Common::make_unique, use std::make_unique
| * Common: Remove Common::make_unique, use std::make_uniqueMerryMage2016-04-051-1/+0
| |
* | Merge pull request #1508 from JayFoxRox/vs-output-mapbunnei2016-03-221-4/+14
|\ \ | |/ |/| Respect vs output map
| * Respect vs output mapJannik Vogel2016-03-141-4/+14
| |
* | Merge pull request #1538 from lioncash/dotbunnei2016-03-201-5/+3
|\ \ | | | | | | shader_interpreter: use std::inner_product for the dot product
| * | shader_interpreter: use std::inner_product for the dot productLioncash2016-03-171-5/+3
| | | | | | | | | | | | Same thing, less code.
* | | video_core: Don't cast away constLioncash2016-03-171-1/+1
|/ /
* | Merge pull request #1503 from bunnei/clear-jit-cachebunnei2016-03-163-7/+27
|\ \ | | | | | | Clear JIT cache
| * | shader_jit_x64: Clear cache after code space fills up.bunnei2016-03-123-2/+19
| | |
| * | shader_jit_x64: Make assert outputs more useful & cleanup formatting.bunnei2016-03-121-4/+7
| | |
| * | shader: Update log message to use proper log class.bunnei2016-03-121-1/+1
| |/
* / PICA: Fix MAD/MADI encodingJannik Vogel2016-03-152-29/+33
|/
* Common: Get rid of alignment macrosLioncash2016-03-091-4/+4
| | | | | The gl rasterizer already uses alignas, so we may as well move everything over.
* Add immediate mode vertex submissionDwayne Slater2016-03-034-2/+22
|
* pica: Implement decoding of basic fragment lighting components.bunnei2016-02-052-5/+9
| | | | | | | - Diffuse - Distance attenuation - float16/float20 types - Vertex Shader 'view' output
* Merge pull request #1367 from yuriks/jit-jmpbunnei2016-01-272-6/+6
|\ | | | | Shader JIT: Fix off-by-one error when compiling JMPs
| * Shader JIT: Fix off-by-one error when compiling JMPsYuri Kunde Schlesner2016-01-242-6/+6
| | | | | | | | | | | | | | There was a mistake in the JMP code which meant that one instruction at the destination would be skipped when the jump was taken. This commit also changes the meaning of the culprit parameter to make it less confusing and avoid similar mistakes in the future.
* | Shader: Implement "invert condition" feature of IFU instructionYuri Kunde Schlesner2016-01-252-2/+5
|/ | | | | | If the bit 0 of the JMPU instruction is set, then the jump condition will be inverted. That is, a jump will happen when the boolean is false instead of when it is true.
* video_core: Reorganize headersLioncash2015-09-113-6/+4
|
* video_core: Remove unnecessary includes from headersLioncash2015-09-111-2/+0
|
* video_core: Remove unused variablesLioncash2015-09-102-2/+0
|
* Shader JIT: Use SCALE constant from emitteraroulin2015-09-071-4/+4
|
* Shader: Fix size_t to int casts of register offsetsaroulin2015-09-072-15/+21
|
* Merge pull request #1088 from aroulin/x64-emitter-abi-callbunnei2015-09-022-28/+18
|\ | | | | x64: Proper stack alignment in shader JIT function calls
| * x64: Proper stack alignment in shader JIT function callsaroulin2015-09-012-28/+18
| | | | | | | | | | Import Dolphin stack handling and register saving routines Also removes the x86 parts from abi files
* | video_core: Fix format specifiers warningsaroulin2015-09-021-1/+2
|/
* Shader JIT: Fix SGE/SGEI NaN behavioraroulin2015-08-311-3/+3
| | | | | SGE was incorrectly emulated w.r.t. NaN behavior as the CMPSS SSE instruction was used with NLT
* Merge pull request #1065 from yuriks/shader-fpYuri Kunde Schlesner2015-08-283-56/+87
|\ | | | | Shader FP compliance fixes
| * Shader JIT: Tiny micro-optimization in DPHYuri Kunde Schlesner2015-08-241-4/+4
| |
| * Shaders: Fix multiplications between 0.0 and infYuri Kunde Schlesner2015-08-242-39/+45
| | | | | | | | | | | | | | | | The PICA200 semantics for multiplication are so that when multiplying inf by exactly 0.0, the result is 0.0, instead of NaN, as defined by IEEE. This is relied upon by games. Fixes #1024 (missing OoT interface items)
| * Shaders: Explicitly conform to PICA semantics in MAX/MINYuri Kunde Schlesner2015-08-242-2/+10
| |
| * Shader JIT: Add name to second scratch register (XMM4)Yuri Kunde Schlesner2015-08-241-3/+5
| |
| * Shader JIT: Fix CMP NaN behavior to match hardwareYuri Kunde Schlesner2015-08-241-8/+23
| |
* | Shader JIT: Fix float to integer rounding in MOVAaroulin2015-08-271-2/+2
| | | | | | | | MOVA converts new address register values from floats to integers using truncation
* | Shader JIT: ifdef out reference to ifdef'd out shader_maparchshift2015-08-271-0/+2
| | | | | | | | | | shader_map was only defined on x86 architectures, but was cleared on shutdown with no ifdef protection. Ifdef this out so non-x86 architectures can be built.
* | Integrate the MicroProfile profiling libraryYuri Kunde Schlesner2015-08-251-0/+3
| | | | | | | | | | This brings goodies such as a configurable user interface and multi-threaded timeline view.
* | shader_jit: Replace two MDisp usages with MatRLioncash2015-08-241-2/+2
|/
* Merge pull request #1062 from aroulin/shader-rcp-rsqbunnei2015-08-232-10/+10
|\ | | | | Shader: RCP and RSQ computes only the 1st component
| * Shader: Use std::sqrt for float instead of sqrtaroulin2015-08-231-1/+1
| |
| * Shader: RCP and RSQ computes only the 1st componentaroulin2015-08-232-10/+10
| |
* | Shader: implement DPH/DPHI in JITaroulin2015-08-222-2/+36
| |
* | Shader: implement DPH/DPHI in interpreteraroulin2015-08-221-1/+8
|/ | | | | Tests revealed that the component with w=1 is SRC1 and not SRC2, it is now fixed on 3dbrew.
* Shader: implement SGE, SGEI and SLT in JITaroulin2015-08-192-15/+36
|
* Shader: implement SGE, SGEI in interpreteraroulin2015-08-191-0/+14
|
* Shader: Save caller-saved registers in JIT before a CALLaroulin2015-08-192-0/+33
|
* Shader: implement EX2 and LG2 in JITaroulin2015-08-172-2/+22
|
* Shader: implement EX2 and LG2 in interpreteraroulin2015-08-161-0/+36
|
* Build fix for Debug configurations.Tony Wasserka2015-08-161-1/+1
|
* Introduce a shader tracer to allow inspection of input/output values for each processed instruction.Tony Wasserka2015-08-165-37/+322
|
* citra-qt: Improve shader debugger.Tony Wasserka2015-08-161-6/+0
| | | | Now supports dumping the current shader and recognizes a larger number of output semantics.
* Shader: Use a POD struct for registers.bunnei2015-08-165-40/+43
|
* Rename ARCHITECTURE_X64 definition to ARCHITECTURE_x86_64.bunnei2015-08-161-6/+5
|
* Common: Cleanup CPU capability detection code.bunnei2015-08-161-5/+5
|
* Common: Move cpu_detect to x64 directory.bunnei2015-08-161-2/+1
|
* x64: Refactor to remove fake interfaces and general cleanups.bunnei2015-08-165-144/+22
|
* JIT: Support negative address offsets.bunnei2015-08-161-26/+25
|
* Shader: Initial implementation of x86_x64 JIT compiler for Pica vertex shaders.bunnei2015-08-166-2/+924
| | | | | - Config: Add an option for selecting to use shader JIT or interpreter. - Qt: Add a menu option for enabling/disabling the shader JIT.
* Common: Added MurmurHash3 hash function for general-purpose use.bunnei2015-08-151-1/+1
|
* Shader: Define a common interface for running vertex shader programs.bunnei2015-08-154-184/+278
|
* Shader: Move shader code to its own subdirectory, "shader".bunnei2015-08-152-0/+701