Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2021-07-23 | shader: Remove old shader management | ReinUsesLisp | 1 | -935/+0 | |
2021-02-15 | Review 1 | Kelebek1 | 1 | -1/+1 | |
2021-02-15 | Implement texture offset support for TexelFetch and TextureGather and add offsets for Tlds | Kelebek1 | 1 | -2/+9 | |
Formatting | |||||
2020-12-30 | video_core: Rewrite the texture cache | ReinUsesLisp | 1 | -27/+29 | |
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues. | |||||
2020-12-07 | video_core: Remove unnecessary enum class casting in logging messages | Lioncash | 1 | -5/+4 | |
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more. Reduces the line noise a bit. | |||||
2020-10-28 | shader: Partially implement texture cube array shadow | ReinUsesLisp | 1 | -1/+0 | |
This implements texture cube arrays with shadow comparisons but doesn't fix the asserts related to it. Fixes out of bounds reads on swizzle constructors and makes them use bounds checked ::at instead of the unsafe operator[]. | |||||
2020-10-08 | shader/texture: Implement CUBE texture type for TMML and fix arrays | ReinUsesLisp | 1 | -19/+22 | |
TMML takes an array argument that has no known meaning, this one appears as the first component in gpr8 followed by s, t and r. Skip this component when arrays are being used. Also implement CUBE texture types. - Used by Pikmin 3: Deluxe Demo. | |||||
2020-09-17 | decoder/texture: Eliminate narrowing conversion in GetTldCode() | Lioncash | 1 | -1/+1 | |
The assignment was previously truncating a u64 value to a bool. | |||||
2020-06-05 | shader/texture: Join separate image and sampler pairs offline | ReinUsesLisp | 1 | -18/+37 | |
Games using D3D idioms can join images and samplers when a shader executes, instead of baking them into a combined sampler image. This is also possible on Vulkan. One approach to this solution would be to use separate samplers on Vulkan and leave this unimplemented on OpenGL, but we can't do this because there's no consistent way of determining which constant buffer holds a sampler and which one an image. We could in theory find the first bit and if it's in the TIC area, it's an image; but this falls apart when an image or sampler handle use an index of zero. The used approach is to track for a LOP.OR operation (this is done at an IR level, not at an ISA level), track again the constant buffers used as source and store this pair. Then, outside of shader execution, join the sample and image pair with a bitwise or operation. This approach won't work on games that truly use separate samplers in a meaningful way. For example, pooling textures in a 2D array and determining at runtime what sampler to use. This invalidates OpenGL's disk shader cache :) - Used mostly by D3D ports to Switch | |||||
2020-04-23 | shader/texture: Support multiple unknown sampler properties | ReinUsesLisp | 1 | -51/+74 | |
This allows deducing some properties from the texture instruction before asking the runtime. By doing this we can handle type mismatches in some instructions from the renderer instead of the shader decoder. Fixes texelFetch issues with games using 2D texture instructions on a 1D sampler. | |||||
2020-04-23 | shader_ir: Turn classes into data structures | ReinUsesLisp | 1 | -49/+50 | |
2020-04-17 | decode/texture: Resolve unused variable warnings. | Lioncash | 1 | -5/+7 | |
Some variables aren't used, so we can remove these. Unfortunately, diagnostics are still reported on structured bindings even when annotated with [[maybe_unused]], so we need to unpack the elements that we want to use manually. | |||||
2020-04-17 | decode/texture: Collapse loop down into std::generate | Lioncash | 1 | -3/+1 | |
Same behavior, less code. | |||||
2020-04-17 | decode/texture: Eliminate trivial missing field initializer warnings | Lioncash | 1 | -3/+4 | |
We can just specify the initializers. | |||||
2020-04-10 | shader/texture: Remove type mismatches management from shader decoder | ReinUsesLisp | 1 | -14/+0 | |
Since commit e22816a5bb we handle type mismatches from the CPU. We don't need to hack our shader decoder due to game bugs anymore. Removed in this commit. | |||||
2020-03-09 | video_core: Rename "const buffer locker" to "registry" | ReinUsesLisp | 1 | -2/+3 | |
2020-02-21 | shader/texture: Fix illegal 3D texture assert | ReinUsesLisp | 1 | -1/+1 | |
Fix typo in the illegal 3D texture assert logic. We care about catching arrayed 3D textures or 3D shadow textures, not regular 3D textures. | |||||
2020-02-15 | shader/texture: Allow 2D shadow arrays and simplify code | ReinUsesLisp | 1 | -43/+28 | |
Shadow sampler 2D arrays are supported on OpenGL, so there's no reason to forbid these. Enable textureLod usage on these. Minor style changes. | |||||
2020-02-02 | shader: Remove curly braces initializers on shared pointers | ReinUsesLisp | 1 | -2/+2 | |
2020-01-25 | Shader_IR: Address feedback. | Fernando Sahmkow | 1 | -1/+2 | |
2020-01-24 | Shader_IR: Change name of TrackSampler function so it does not confuse with the type. | Fernando Sahmkow | 1 | -1/+1 | |
2020-01-24 | Shader_IR: Propagate bindless index into the GL compiler. | Fernando Sahmkow | 1 | -16/+24 | |
2020-01-24 | Shader_IR: deduce size of indexed samplers | Fernando Sahmkow | 1 | -4/+5 | |
2020-01-24 | Shader_IR: Setup Indexed Samplers on the IR | Fernando Sahmkow | 1 | -20/+46 | |
2020-01-09 | shader_ir/texture: Simplify AOFFI code | ReinUsesLisp | 1 | -10/+6 | |
2020-01-04 | Shader_IR: Implement TXD Array. | Fernando Sahmkow | 1 | -5/+12 | |
This commit extends the compilation of TXD to support array samplers on TXD. | |||||
2019-12-18 | shader/texture: Properly shrink unused entries in size mismatches | ReinUsesLisp | 1 | -4/+9 | |
When a image format mismatches we were inserting zeroes to the texture itself. This was not handling cases were the mismatch uses less coordinates than the guest shader code. Address that by resizing the vector. | |||||
2019-12-16 | shader/texture: Implement TLD4.PTP | ReinUsesLisp | 1 | -18/+56 | |
2019-12-16 | shader/texture: Enable arrayed TLD4 | ReinUsesLisp | 1 | -1/+0 | |
2019-12-16 | shader/texture: Implement AOFFI for TLD4S | ReinUsesLisp | 1 | -13/+18 | |
2019-12-16 | shader/texture: Remove unnecesary parenthesis | ReinUsesLisp | 1 | -2/+2 | |
2019-12-12 | Shader_IR: Correct TLD4S Depth Compare. | Fernando Sahmkow | 1 | -5/+12 | |
2019-12-12 | Shader_Ir: Correct TLD4S encoding and implement f16 flag. | Fernando Sahmkow | 1 | -9/+12 | |
2019-12-12 | Shader_Ir: default failed tracks on bindless samplers to null values. | Fernando Sahmkow | 1 | -22/+75 | |
2019-11-23 | shader/texture: Handle TLDS texture type mismatches | ReinUsesLisp | 1 | -1/+10 | |
Some games like "Fire Emblem: Three Houses" bind 2D textures to offsets used by instructions of 1D textures. To handle the discrepancy this commit uses the the texture type from the binding and modifies the emitted code IR to build a valid backend expression. E.g.: Bound texture is 2D and instruction is 1D, the emitted IR samples a 2D texture in the coordinate ivec2(X, 0). | |||||
2019-11-23 | shader/texture: Deduce texture buffers from locker | ReinUsesLisp | 1 | -61/+41 | |
Instead of specializing shaders to separate texture buffers from 1D textures, use the locker to deduce them while they are being decoded. | |||||
2019-11-18 | Shader_IR: Address Feedback | Fernando Sahmkow | 1 | -5/+2 | |
2019-11-14 | Shader_IR: Implement TXD instruction. | Fernando Sahmkow | 1 | -7/+49 | |
2019-11-07 | shader/texture: Remove NODEP warnings | ReinUsesLisp | 1 | -35/+0 | |
These warnings don't offer meaningful information while decoding shaders. Remove them. | |||||
2019-10-31 | Shader_IR: Fix regression on TLD4 | Fernando Sahmkow | 1 | -4/+3 | |
Originally on the last commit I thought TLD4 acted the same as TLD4S and didn't have a mask. It actually does have a component mask. This commit corrects that. | |||||
2019-10-30 | Shader_IR: Fix TLD4 and add Bindless Variant. | Fernando Sahmkow | 1 | -8/+24 | |
This commit fixes an issue where not all 4 results of tld4 were being written, the color component was defaulted to red, among other things. It also implements the bindless variant. | |||||
2019-10-30 | shader/node: Unpack bindless texture encoding | ReinUsesLisp | 1 | -28/+31 | |
Bindless textures were using u64 to pack the buffer and offset from where they come from. Drop this in favor of separated entries in the struct. Remove the usage of std::set in favor of std::list (it's not std::vector to avoid reference invalidations) for samplers and images. | |||||
2019-10-26 | Shader_IR: Address Feedback. | Fernando Sahmkow | 1 | -22/+16 | |
2019-10-25 | Shader_IR: allow lookup of texture samplers within the shader_ir for instructions that don't provide it | Fernando Sahmkow | 1 | -18/+54 | |
2019-10-22 | Shader_Ir: Fix TLD4S from using a component mask. | Fernando Sahmkow | 1 | -4/+4 | |
TLD4S always outputs 4 values, the previous code checked a component mask and omitted those values that weren't part of it. This commit corrects that and makes sure all 4 values are set. | |||||
2019-07-17 | shader_ir: Rename Get/SetTemporal to Get/SetTemporary | Lioncash | 1 | -13/+13 | |
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. | |||||
2019-07-15 | shader: Allow tracking of indirect buffers without variable offset | ReinUsesLisp | 1 | -6/+2 | |
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. | |||||
2019-07-07 | shader/texture: Add F16 support for TLDS | ReinUsesLisp | 1 | -1/+7 | |
2019-06-24 | decode/texture: Address feedback | ReinUsesLisp | 1 | -0/+1 | |
2019-06-21 | shader: Implement texture buffers | ReinUsesLisp | 1 | -0/+44 | |
2019-06-06 | shader: Use shared_ptr to store nodes and move initialization to file | ReinUsesLisp | 1 | -4/+5 | |
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-10 | video_core/shader/decode/texture: Remove unused variable from GetTld4Code() | Lioncash | 1 | -1/+0 | |
2019-05-04 | shader/decode/texture: Remove unused variable | Lioncash | 1 | -1/+0 | |
This isn't used anywhere, so we can get rid of it. | |||||
2019-04-26 | shader_ir/texture: Fix sampler const buffer key shift | ReinUsesLisp | 1 | -1/+1 | |
2019-04-08 | Adapt Bindless to work with AOFFI | Fernando Sahmkow | 1 | -7/+18 | |
2019-04-08 | Move ConstBufferAccessor to Maxwell3d, correct mistakes and clang format. | Fernando Sahmkow | 1 | -1/+2 | |
2019-04-08 | Fix TMML | Fernando Sahmkow | 1 | -5/+7 | |
2019-04-08 | Refactor GetTextureCode and GetTexCode to use an optional instead of optional parameters | Fernando Sahmkow | 1 | -23/+24 | |
2019-04-08 | Implement TXQ_B | Fernando Sahmkow | 1 | -2/+8 | |
2019-04-08 | Implement TMML_B | Fernando Sahmkow | 1 | -5/+10 | |
2019-04-08 | Corrections to TEX_B | Fernando Sahmkow | 1 | -4/+5 | |
2019-04-08 | Unify both sampler types. | Fernando Sahmkow | 1 | -10/+12 | |
2019-04-08 | Implement Bindless Samplers and TEX_B in the IR. | Fernando Sahmkow | 1 | -6/+52 | |
2019-03-31 | shader_ir/decode: Silent implicit sign conversion warning | Mat M | 1 | -2/+2 | |
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc> | |||||
2019-03-30 | shader_ir/decode: Implement AOFFI for TEX and TLD4 | ReinUsesLisp | 1 | -24/+88 | |
2019-02-26 | shader/decode: Remove extras from MetaTexture | ReinUsesLisp | 1 | -14/+23 | |
2019-02-26 | shader/decode: Split memory and texture instructions decoding | ReinUsesLisp | 1 | -210/+3 | |
2019-02-14 | shader_decompiler: Improve Accuracy of Attribute Interpolation. | Fernando Sahmkow | 1 | -1/+1 | |
2019-02-12 | gl_shader_decompiler: Re-implement TLDS lod | ReinUsesLisp | 1 | -1/+1 | |
2019-02-07 | shader_ir: Remove F4 prefix to texture operations | ReinUsesLisp | 1 | -8/+7 | |
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. | |||||
2019-02-07 | shader_ir: Clean texture management code | ReinUsesLisp | 1 | -96/+58 | |
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. | |||||
2019-02-03 | Fix TXQ not using the component mask. | Fernando Sahmkow | 1 | -6/+9 | |
2019-02-03 | shader_ir/memory: Add ST_L 64 and 128 bits stores | ReinUsesLisp | 1 | -3/+11 | |
2019-02-03 | shader_ir: Rename BasicBlock to NodeBlock | ReinUsesLisp | 1 | -5/+4 | |
It's not always used as a basic block. Rename it for consistency. | |||||
2019-02-03 | shader_ir: Pass decoded nodes as a whole instead of per basic blocks | ReinUsesLisp | 1 | -2/+3 | |
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. | |||||
2019-02-03 | shader_ir/memory: Add LD_L 128 bits loads | ReinUsesLisp | 1 | -7/+19 | |
2019-02-03 | shader_bytecode: Rename BytesN enums to BitsN | ReinUsesLisp | 1 | -4/+4 | |
2019-02-03 | shader_ir/memory: Add LD_L 64 bits loads | ReinUsesLisp | 1 | -6/+17 | |
2019-01-30 | shader_ir: Unify constant buffer offset values | ReinUsesLisp | 1 | -3/+3 | |
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. | |||||
2019-01-30 | shader_decode: Implement LDG and basic cbuf tracking | ReinUsesLisp | 1 | -0/+49 | |
2019-01-15 | shader_ir: Pass to decoder functions basic block's code | ReinUsesLisp | 1 | -1/+1 | |
2019-01-15 | shader_ir: Remove composite primitives and use temporals instead | ReinUsesLisp | 1 | -145/+149 | |
2019-01-15 | shader_decode: Use proper primitive names | ReinUsesLisp | 1 | -2/+2 | |
2019-01-15 | shader_ir: Remove RZ and use Register::ZeroIndex instead | ReinUsesLisp | 1 | -6/+11 | |
2019-01-15 | shader_decode: Implement TEXS.F16 | ReinUsesLisp | 1 | -13/+25 | |
2019-01-15 | shader_decode: Implement TLDS (untested) | ReinUsesLisp | 1 | -8/+61 | |
2019-01-15 | shader_decode: Update TLD4 reflecting #1862 changes | ReinUsesLisp | 1 | -52/+49 | |
2019-01-15 | shader_ir: Fixup TEX and TEXS and partially fix TLD4 decompiling | ReinUsesLisp | 1 | -50/+49 | |
2019-01-15 | shader_decode: Implement ST_L | ReinUsesLisp | 1 | -0/+17 | |
2019-01-15 | shader_decode: Implement LD_L | ReinUsesLisp | 1 | -0/+18 | |
2019-01-15 | shader_decode: Implement LD_C | ReinUsesLisp | 1 | -0/+31 | |
2019-01-15 | shader_decode: Implement TMML | ReinUsesLisp | 1 | -3/+45 | |
2019-01-15 | shader_decode: Implement TEX and TXQ | ReinUsesLisp | 1 | -0/+219 | |
2019-01-15 | shader_decode: Implement TEXS (F32) | ReinUsesLisp | 1 | -0/+199 | |
2019-01-15 | shader_decode: Implement ST_A | ReinUsesLisp | 1 | -0/+30 | |
2019-01-15 | shader_decode: Implement LD_A | ReinUsesLisp | 1 | -1/+39 | |
2019-01-15 | shader_ir: Initial implementation | ReinUsesLisp | 1 | -0/+24 | |