2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00
yuzu/src/video_core/shader
ReinUsesLisp 5b2b6d594c shader/texture: Join separate image and sampler pairs offline
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-05 00:24:51 -03:00
..
decode shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
ast.cpp Shader_IR: Implement Fast BRX and allow multi-branches in the CFG. 2019-10-25 09:01:31 -04:00
ast.h shader: Remove curly braces initializers on shared pointers 2020-02-01 22:52:10 -03:00
compiler_settings.cpp Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes. 2019-10-04 18:52:50 -04:00
compiler_settings.h Shader_IR: allow else derivation to be optional. 2019-10-04 18:52:52 -04:00
control_flow.cpp shader/memory_util: Deduplicate code 2020-04-26 01:38:51 -03:00
control_flow.h video_core: Rename "const buffer locker" to "registry" 2020-03-09 18:40:06 -03:00
decode.cpp shader_ir: Separate float-point comparisons in ordered and unordered 2020-05-09 04:55:15 -03:00
expr.cpp video_core/expr: Supply operator!= along with operator== 2019-10-05 09:14:26 -04:00
expr.h Shader_IR: Address Feedback. 2019-10-26 15:38:30 -04:00
memory_util.cpp shader/memory_util: Deduplicate code 2020-04-26 01:38:51 -03:00
memory_util.h shader/memory_util: Deduplicate code 2020-04-26 01:38:51 -03:00
node.h shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
node_helper.cpp shader_decode: ATOM/ATOMS: add function to avoid code repetition 2020-03-30 18:47:50 +07:00
node_helper.h shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
registry.cpp shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
registry.h shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
shader_ir.cpp shader_ir: Separate float-point comparisons in ordered and unordered 2020-05-09 04:55:15 -03:00
shader_ir.h shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
track.cpp shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
transform_feedback.cpp shader/transform_feedback: Expose buffer stride 2020-03-13 18:33:05 -03:00
transform_feedback.h shader/transform_feedback: Expose buffer stride 2020-03-13 18:33:05 -03:00