mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
5b2b6d594c
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 |
||
---|---|---|
.. | ||
decode | ||
ast.cpp | ||
ast.h | ||
compiler_settings.cpp | ||
compiler_settings.h | ||
control_flow.cpp | ||
control_flow.h | ||
decode.cpp | ||
expr.cpp | ||
expr.h | ||
memory_util.cpp | ||
memory_util.h | ||
node_helper.cpp | ||
node_helper.h | ||
node.h | ||
registry.cpp | ||
registry.h | ||
shader_ir.cpp | ||
shader_ir.h | ||
track.cpp | ||
transform_feedback.cpp | ||
transform_feedback.h |