Commit graph

27 commits

Author SHA1 Message Date
ReinUsesLisp
b435bff43e shader/track: Move bindless tracking to a separate function 2020-06-04 23:02:55 -03:00
Fernando Sahmkow
b19e1d2c09 Revert: shader_decode: Fix LD, LDG when track constant buffer. 2020-04-24 11:00:54 -04:00
bunnei
5122792d3f Merge pull request #3679 from lioncash/track
track: Eliminate redundant copies
2020-04-19 01:22:47 -04:00
Lioncash
7ff67fc798 track: Eliminate redundant copies
Two variables can be references, while two others can be std::moved.
Makes for 4 less atomic reference count increments and decrements.
2020-04-15 21:50:09 -04:00
Lioncash
02e095313a CMakeLists: Specify -Wextra on linux builds
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-04-15 21:33:46 -04:00
ReinUsesLisp
22052e73de shader/registry: Store graphics and compute metadata
Store information GLSL forces us to provide but it's dynamic state in
hardware (workgroup sizes, primitive topology, shared memory size).
2020-03-09 18:40:07 -03:00
ReinUsesLisp
99be31c902 video_core: Rename "const buffer locker" to "registry" 2020-03-09 18:40:06 -03:00
ReinUsesLisp
8021ee48a3 gl_shader_cache: Rework shader cache and remove post-specializations
Instead of pre-specializing shaders and then post-specializing them,
drop the later and only "specialize" the shader while decoding it.
2020-03-09 18:40:06 -03:00
Nguyen Dac Nam
5658f77467 nit: move comment to right place. 2020-02-29 13:50:10 +07:00
Nguyen Dac Nam
a775209d1b shader_decode: Fix LD, LDG when track constant buffer 2020-02-28 13:11:19 +07:00
ReinUsesLisp
4f5791e529 shader: Remove curly braces initializers on shared pointers 2020-02-01 22:52:10 -03:00
Fernando Sahmkow
2e6a1b965d Shader_IR: Address feedback. 2020-01-25 09:04:59 -04:00
Fernando Sahmkow
26b5aa702d Shader_IR: Change name of TrackSampler function so it does not confuse with the type. 2020-01-24 16:44:48 -04:00
Fernando Sahmkow
b6d3153e7e Shader_IR: Propagate bindless index into the GL compiler. 2020-01-24 16:44:47 -04:00
Fernando Sahmkow
f93bff419e Shader_IR: Implement initial code for tracking indexed samplers. 2020-01-24 16:43:30 -04:00
ReinUsesLisp
243a33aba9 shader_ir/memory: Implement patch stores 2019-12-09 23:25:21 -03:00
bunnei
7b61ad4c05 Merge pull request #2737 from FernandoS27/track-fix
Shader_Ir: Correct tracking to track from right to left
2019-07-25 12:41:52 -04:00
Lioncash
41e2ad0f26 shader_ir: std::move Node instance where applicable
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-16 19:49:23 -04:00
Fernando Sahmkow
88fddaca00 Shader_Ir: Correct tracking to track from right to left 2019-07-16 15:06:59 -04:00
ReinUsesLisp
a54be6ef96 shader: Allow tracking of indirect buffers without variable offset
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-14 22:36:44 -03:00
ReinUsesLisp
fd392543e8 shader: Use shared_ptr to store nodes and move initialization to file
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-06-05 20:41:52 -03:00
Lioncash
603d9a632a shader/shader_ir: Mark tracking functions as const member functions
These don't actually modify instance state, so they can be marked as
const member functions
2019-05-19 08:23:09 -04:00
ReinUsesLisp
e37debc7be shader_ir: Implement immediate register tracking 2019-03-30 02:53:16 -03:00
Lioncash
3e82ac10a5 shader/track: Resolve variable shadowing warnings 2019-02-25 09:10:59 -05:00
ReinUsesLisp
13b83e6e0f shader/track: Search inside of conditional nodes
Some games search conditionally use global memory instructions. This
allows the heuristic to search inside conditional nodes for the source
constant buffer.
2019-02-03 17:21:20 -03:00
ReinUsesLisp
92c948999b shader_ir: Rename BasicBlock to NodeBlock
It's not always used as a basic block. Rename it for consistency.
2019-02-03 17:21:20 -03:00
ReinUsesLisp
d516c50fe2 shader_decode: Implement LDG and basic cbuf tracking 2019-01-30 00:00:15 -03:00