diff options
| author | 2021-06-24 17:40:24 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:39 -0400 | |
| commit | 8a3427a4c857aa08e365d1776d1f0d9f32639c9c (patch) | |
| tree | 6436b8973fe9f97c131aea892885b61215b67e01 /src/video_core | |
| parent | shader: Rework varyings and implement passthrough geometry shaders (diff) | |
| download | yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar.gz yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.tar.xz yuzu-8a3427a4c857aa08e365d1776d1f0d9f32639c9c.zip | |
glasm: Add passthrough geometry shader support
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_device.h | 5 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 27be347e6..6818951f2 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -160,6 +160,7 @@ Device::Device() { | |||
| 160 | has_vertex_buffer_unified_memory = GLAD_GL_NV_vertex_buffer_unified_memory; | 160 | has_vertex_buffer_unified_memory = GLAD_GL_NV_vertex_buffer_unified_memory; |
| 161 | has_debugging_tool_attached = IsDebugToolAttached(extensions); | 161 | has_debugging_tool_attached = IsDebugToolAttached(extensions); |
| 162 | has_depth_buffer_float = HasExtension(extensions, "GL_NV_depth_buffer_float"); | 162 | has_depth_buffer_float = HasExtension(extensions, "GL_NV_depth_buffer_float"); |
| 163 | has_geometry_shader_passthrough = GLAD_GL_NV_geometry_shader_passthrough; | ||
| 163 | has_nv_gpu_shader_5 = GLAD_GL_NV_gpu_shader5; | 164 | has_nv_gpu_shader_5 = GLAD_GL_NV_gpu_shader5; |
| 164 | has_shader_int64 = HasExtension(extensions, "GL_ARB_gpu_shader_int64"); | 165 | has_shader_int64 = HasExtension(extensions, "GL_ARB_gpu_shader_int64"); |
| 165 | has_amd_shader_half_float = GLAD_GL_AMD_gpu_shader_half_float; | 166 | has_amd_shader_half_float = GLAD_GL_AMD_gpu_shader_half_float; |
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h index ad7b01b06..45ddf5e01 100644 --- a/src/video_core/renderer_opengl/gl_device.h +++ b/src/video_core/renderer_opengl/gl_device.h | |||
| @@ -120,6 +120,10 @@ public: | |||
| 120 | return has_depth_buffer_float; | 120 | return has_depth_buffer_float; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | bool HasGeometryShaderPassthrough() const { | ||
| 124 | return has_geometry_shader_passthrough; | ||
| 125 | } | ||
| 126 | |||
| 123 | bool HasNvGpuShader5() const { | 127 | bool HasNvGpuShader5() const { |
| 124 | return has_nv_gpu_shader_5; | 128 | return has_nv_gpu_shader_5; |
| 125 | } | 129 | } |
| @@ -174,6 +178,7 @@ private: | |||
| 174 | bool use_asynchronous_shaders{}; | 178 | bool use_asynchronous_shaders{}; |
| 175 | bool use_driver_cache{}; | 179 | bool use_driver_cache{}; |
| 176 | bool has_depth_buffer_float{}; | 180 | bool has_depth_buffer_float{}; |
| 181 | bool has_geometry_shader_passthrough{}; | ||
| 177 | bool has_nv_gpu_shader_5{}; | 182 | bool has_nv_gpu_shader_5{}; |
| 178 | bool has_shader_int64{}; | 183 | bool has_shader_int64{}; |
| 179 | bool has_amd_shader_half_float{}; | 184 | bool has_amd_shader_half_float{}; |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 06e39a503..af8e9f44d 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -187,7 +187,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo | |||
| 187 | .support_demote_to_helper_invocation = false, | 187 | .support_demote_to_helper_invocation = false, |
| 188 | .support_int64_atomics = false, | 188 | .support_int64_atomics = false, |
| 189 | .support_derivative_control = device.HasDerivativeControl(), | 189 | .support_derivative_control = device.HasDerivativeControl(), |
| 190 | .support_geometry_shader_passthrough = false, // TODO | 190 | .support_geometry_shader_passthrough = device.HasGeometryShaderPassthrough(), |
| 191 | .support_gl_nv_gpu_shader_5 = device.HasNvGpuShader5(), | 191 | .support_gl_nv_gpu_shader_5 = device.HasNvGpuShader5(), |
| 192 | .support_gl_amd_gpu_shader_half_float = device.HasAmdShaderHalfFloat(), | 192 | .support_gl_amd_gpu_shader_half_float = device.HasAmdShaderHalfFloat(), |
| 193 | .support_gl_texture_shadow_lod = device.HasTextureShadowLod(), | 193 | .support_gl_texture_shadow_lod = device.HasTextureShadowLod(), |