aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/track.cpp
AgeCommit message (Collapse)Author
2021-07-22shader: Remove old shader managementReinUsesLisp
2020-09-22General: Make use of std::nullopt where applicableLioncash
Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
2020-06-05shader/texture: Join separate image and sampler pairs offlineReinUsesLisp
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-06-04shader/track: Move bindless tracking to a separate functionReinUsesLisp
2020-04-24Revert: shader_decode: Fix LD, LDG when track constant buffer.Fernando Sahmkow
2020-04-19Merge pull request #3679 from lioncash/trackbunnei
track: Eliminate redundant copies
2020-04-15track: Eliminate redundant copiesLioncash
Two variables can be references, while two others can be std::moved. Makes for 4 less atomic reference count increments and decrements.
2020-04-15CMakeLists: Specify -Wextra on linux buildsLioncash
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2020-03-09shader/registry: Store graphics and compute metadataReinUsesLisp
Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size).
2020-03-09video_core: Rename "const buffer locker" to "registry"ReinUsesLisp
2020-03-09gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
2020-02-29nit: move comment to right place.Nguyen Dac Nam
2020-02-28shader_decode: Fix LD, LDG when track constant bufferNguyen Dac Nam
2020-02-01shader: Remove curly braces initializers on shared pointersReinUsesLisp
2020-01-25Shader_IR: Address feedback.Fernando Sahmkow
2020-01-24Shader_IR: Change name of TrackSampler function so it does not confuse with ↵Fernando Sahmkow
the type.
2020-01-24Shader_IR: Propagate bindless index into the GL compiler.Fernando Sahmkow
2020-01-24Shader_IR: Implement initial code for tracking indexed samplers.Fernando Sahmkow
2019-12-09shader_ir/memory: Implement patch storesReinUsesLisp
2019-07-25Merge pull request #2737 from FernandoS27/track-fixbunnei
Shader_Ir: Correct tracking to track from right to left
2019-07-16shader_ir: std::move Node instance where applicableLioncash
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.
2019-07-16Shader_Ir: Correct tracking to track from right to leftFernando Sahmkow
2019-07-14shader: Allow tracking of indirect buffers without variable offsetReinUsesLisp
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-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-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-03-30shader_ir: Implement immediate register trackingReinUsesLisp
2019-02-25shader/track: Resolve variable shadowing warningsLioncash
2019-02-03shader/track: Search inside of conditional nodesReinUsesLisp
Some games search conditionally use global memory instructions. This allows the heuristic to search inside conditional nodes for the source constant buffer.
2019-02-03shader_ir: Rename BasicBlock to NodeBlockReinUsesLisp
It's not always used as a basic block. Rename it for consistency.
2019-01-30shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp