suyu/src/video_core/renderer_opengl
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
..
gl_buffer_cache.cpp buffer_cache: Use boost::intrusive::set for caching 2020-05-21 16:44:00 -03:00
gl_buffer_cache.h {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers 2020-04-28 02:18:12 -03:00
gl_device.cpp glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_device.h glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_fence_manager.cpp buffer_cache: Use boost::intrusive::set for caching 2020-05-21 16:44:00 -03:00
gl_fence_manager.h Address Feedback. 2020-04-22 11:36:24 -04:00
gl_framebuffer_cache.cpp gl_state: Remove completely 2020-02-28 17:56:35 -03:00
gl_framebuffer_cache.h gl_state: Remove completely 2020-02-28 17:56:35 -03:00
gl_query_cache.cpp gl_query_cache: Resolve use-after-move in CachedQuery move assignment operator 2020-04-15 22:20:06 -04:00
gl_query_cache.h query_cache: Address feedback 2020-02-14 17:38:27 -03:00
gl_rasterizer.cpp shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
gl_rasterizer.h glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_resource_manager.cpp renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
gl_resource_manager.h renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
gl_sampler_cache.cpp Create an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels. 2020-02-27 21:34:00 -05:00
gl_sampler_cache.h video_core: Add missing override specifiers 2019-07-07 13:38:39 -04:00
gl_shader_cache.cpp glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_shader_cache.h renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
gl_shader_decompiler.cpp glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_shader_decompiler.h glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_shader_disk_cache.cpp shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
gl_shader_disk_cache.h shader/texture: Join separate image and sampler pairs offline 2020-06-05 00:24:51 -03:00
gl_shader_manager.cpp gl_shader_manager: Unbind GLSL program when binding a host pipeline 2020-05-26 04:20:39 -03:00
gl_shader_manager.h renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
gl_shader_util.cpp gl_shader_cache: Address review commentaries 2019-07-15 17:38:25 -03:00
gl_shader_util.h gl_shader_util: Add parameter to handle retrievable programs 2019-02-06 22:20:57 -03:00
gl_state_tracker.cpp gl_rasterizer: Implement line widths and smooth lines 2020-04-13 01:30:34 -03:00
gl_state_tracker.h gl_rasterizer: Implement line widths and smooth lines 2020-04-13 01:30:34 -03:00
gl_stream_buffer.cpp gl_state: Remove completely 2020-02-28 17:56:35 -03:00
gl_stream_buffer.h video_core: Make ARB_buffer_storage a required extension 2019-06-20 21:36:12 -03:00
gl_texture_cache.cpp gl_texture_cache: Implement small texture view cache for swizzles 2020-05-26 17:50:08 -03:00
gl_texture_cache.h gl_texture_cache: Implement small texture view cache for swizzles 2020-05-26 17:50:08 -03:00
maxwell_to_gl.h gl_rasterizer: Implement viewport swizzles with NV_viewport_swizzle 2020-05-04 17:51:30 -03:00
renderer_opengl.cpp Merge pull request #3958 from FernandoS27/gl-debug 2020-05-31 17:04:27 -04:00
renderer_opengl.h renderer_opengl: Add assembly program code paths 2020-05-19 18:00:04 -03:00
utils.cpp buffer_cache: Return handles instead of pointer to handles 2020-04-16 02:33:34 -03:00
utils.h buffer_cache: Return handles instead of pointer to handles 2020-04-16 02:33:34 -03:00