mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-02 12:24:19 +01: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 |
||
---|---|---|
.. | ||
shaders | ||
fixed_pipeline_state.cpp | ||
fixed_pipeline_state.h | ||
maxwell_to_vk.cpp | ||
maxwell_to_vk.h | ||
nsight_aftermath_tracker.cpp | ||
nsight_aftermath_tracker.h | ||
renderer_vulkan.cpp | ||
renderer_vulkan.h | ||
vk_blit_screen.cpp | ||
vk_blit_screen.h | ||
vk_buffer_cache.cpp | ||
vk_buffer_cache.h | ||
vk_compute_pass.cpp | ||
vk_compute_pass.h | ||
vk_compute_pipeline.cpp | ||
vk_compute_pipeline.h | ||
vk_descriptor_pool.cpp | ||
vk_descriptor_pool.h | ||
vk_device.cpp | ||
vk_device.h | ||
vk_fence_manager.cpp | ||
vk_fence_manager.h | ||
vk_graphics_pipeline.cpp | ||
vk_graphics_pipeline.h | ||
vk_image.cpp | ||
vk_image.h | ||
vk_memory_manager.cpp | ||
vk_memory_manager.h | ||
vk_pipeline_cache.cpp | ||
vk_pipeline_cache.h | ||
vk_query_cache.cpp | ||
vk_query_cache.h | ||
vk_rasterizer.cpp | ||
vk_rasterizer.h | ||
vk_renderpass_cache.cpp | ||
vk_renderpass_cache.h | ||
vk_resource_manager.cpp | ||
vk_resource_manager.h | ||
vk_sampler_cache.cpp | ||
vk_sampler_cache.h | ||
vk_scheduler.cpp | ||
vk_scheduler.h | ||
vk_shader_decompiler.cpp | ||
vk_shader_decompiler.h | ||
vk_shader_util.cpp | ||
vk_shader_util.h | ||
vk_staging_buffer_pool.cpp | ||
vk_staging_buffer_pool.h | ||
vk_state_tracker.cpp | ||
vk_state_tracker.h | ||
vk_stream_buffer.cpp | ||
vk_stream_buffer.h | ||
vk_swapchain.cpp | ||
vk_swapchain.h | ||
vk_texture_cache.cpp | ||
vk_texture_cache.h | ||
vk_update_descriptor.cpp | ||
vk_update_descriptor.h | ||
wrapper.cpp | ||
wrapper.h |