aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader
AgeCommit message (Collapse)Author
2019-07-09shader_ir: propagate shader size to the IRFernando Sahmkow
2019-07-09shader_ir: Implement BRX & BRA.CCFernando Sahmkow
2019-07-09shader_ir: Remove the old scanner.Fernando Sahmkow
2019-07-09shader_ir: Implement a new shader scannerFernando Sahmkow
2019-07-07gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp
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-07-07Delete decode_integer_set.cppTobias
2019-07-07shader/texture: Add F16 support for TLDSReinUsesLisp
2019-06-24decode/texture: Address feedbackReinUsesLisp
2019-06-20texture_cache: Style and CorrectionsFernando Sahmkow
2019-06-20shader_ir: Fix image copy rebase issuesFernando Sahmkow
2019-06-20shader: Implement bindless imagesReinUsesLisp
2019-06-20shader: Decode SUST and implement backing image functionalityReinUsesLisp
2019-06-20shader: Implement texture buffersReinUsesLisp
2019-06-07shader: Split SSY and PBK stackReinUsesLisp
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-06shader/node: Minor changesReinUsesLisp
Reflect std::shared_ptr nature of Node on initializers and remove constant members in nodes. Add some commentaries.
2019-06-06shader: Move Node declarations out of the shader IR headerReinUsesLisp
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
2019-06-05shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp
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-29Merge pull request #2446 from ReinUsesLisp/tidbunnei
shader: Implement S2R Tid{XYZ} and CtaId{XYZ}
2019-05-24Merge pull request #2485 from ReinUsesLisp/generic-memorybunnei
shader/memory: Implement generic memory stores and loads (ST and LD)
2019-05-23shader/shader_ir: Make Comment() take a std::string by valueLioncash
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).
2019-05-23shader/decode/*: Add missing newline to files lacking themLioncash
Keeps the shader code file endings consistent.
2019-05-23shader/decode/*: Eliminate indirect inclusionsLioncash
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.
2019-05-22shader/decode/memory: Remove left in debug pragmaLioncash
2019-05-20shader/memory: Implement ST (generic memory)ReinUsesLisp
2019-05-20shader/memory: Implement LD (generic memory)ReinUsesLisp
2019-05-20shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp
2019-05-19Merge pull request #2441 from ReinUsesLisp/al2pbunnei
shader: Implement AL2P and ALD.PHYS
2019-05-19shader/shader_ir: Remove unnecessary inline specifiersLioncash
constexpr internally links by default, so the inline specifier is unnecessary.
2019-05-19shader/shader_ir: Simplify constructors for OperationNodeLioncash
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.
2019-05-19shader/shader_ir: Remove unnecessary template parameter packs from ↵Lioncash
Operation() overloads where applicable These overloads don't actually make use of the parameter pack, so they can be turned into regular non-template function overloads.
2019-05-19shader/shader_ir: Mark tracking functions as const member functionsLioncash
These don't actually modify instance state, so they can be marked as const member functions
2019-05-19shader/shader_ir: Place implementations of constructor and destructor in cpp ↵Lioncash
file 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.
2019-05-09video_core/shader/decode/texture: Remove unused variable from GetTld4Code()Lioncash
2019-05-04shader/decode/texture: Remove unused variableLioncash
This isn't used anywhere, so we can get rid of it.
2019-05-02shader_ir/other: Implement IPA.IDXReinUsesLisp
2019-05-02shader_ir/memory: Assert on non-32 bits ALD.PHYSReinUsesLisp
2019-05-02shader: Add physical attributes commentariesReinUsesLisp
2019-05-02gl_shader_decompiler: Implement GLSL physical attributesReinUsesLisp
2019-05-02shader_ir/memory: Implement physical input attributesReinUsesLisp
2019-05-02shader: Remove unused AbufNode Ipa modeReinUsesLisp
2019-05-02shader_ir/memory: Emit AL2P IRReinUsesLisp
2019-04-28Merge pull request #2435 from ReinUsesLisp/misc-vcbunnei
shader_ir: Miscellaneous fixes
2019-04-28Merge pull request #2322 from ReinUsesLisp/wswitchbunnei
video_core: Silent -Wswitch warnings
2019-04-28Merge pull request #2423 from FernandoS27/half-correctbunnei
Corrections on Half Float operations: HADD2 HMUL2 and HFMA2
2019-04-26shader_ir: Move Sampler index entry in operand< to sort declarationsReinUsesLisp
2019-04-26shader_ir: Add missing entry to Sampler operand< comparisonReinUsesLisp
2019-04-26shader_ir/texture: Fix sampler const buffer key shiftReinUsesLisp
2019-04-20Corrections Half Float operations on const buffers and implement saturation.Fernando Sahmkow
2019-04-20Merge pull request #2407 from FernandoS27/f2fbunnei
Do some corrections in conversion shader instructions.
2019-04-19Merge pull request #2409 from ReinUsesLisp/half-floatsbunnei
shader_ir/decode: Miscellaneous fixes to half-float decompilation