diff options
Diffstat (limited to 'src')
6 files changed, 16 insertions, 2 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate_program.cpp b/src/shader_recompiler/frontend/maxwell/translate_program.cpp index e728b43cc..c084f3400 100644 --- a/src/shader_recompiler/frontend/maxwell/translate_program.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate_program.cpp | |||
| @@ -154,6 +154,9 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo | |||
| 154 | if (!host_info.support_float16) { | 154 | if (!host_info.support_float16) { |
| 155 | Optimization::LowerFp16ToFp32(program); | 155 | Optimization::LowerFp16ToFp32(program); |
| 156 | } | 156 | } |
| 157 | if (!host_info.support_int64) { | ||
| 158 | Optimization::LowerInt64ToInt32(program); | ||
| 159 | } | ||
| 157 | Optimization::SsaRewritePass(program); | 160 | Optimization::SsaRewritePass(program); |
| 158 | 161 | ||
| 159 | Optimization::GlobalMemoryToStorageBufferPass(program); | 162 | Optimization::GlobalMemoryToStorageBufferPass(program); |
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 5838fc02f..b1b5ba1ab 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -159,6 +159,7 @@ Device::Device() { | |||
| 159 | has_debugging_tool_attached = IsDebugToolAttached(extensions); | 159 | has_debugging_tool_attached = IsDebugToolAttached(extensions); |
| 160 | has_depth_buffer_float = HasExtension(extensions, "GL_NV_depth_buffer_float"); | 160 | has_depth_buffer_float = HasExtension(extensions, "GL_NV_depth_buffer_float"); |
| 161 | has_nv_gpu_shader_5 = GLAD_GL_NV_gpu_shader5; | 161 | has_nv_gpu_shader_5 = GLAD_GL_NV_gpu_shader5; |
| 162 | has_shader_int64 = HasExtension(extensions, "GL_ARB_gpu_shader_int64"); | ||
| 162 | has_amd_shader_half_float = GLAD_GL_AMD_gpu_shader_half_float; | 163 | has_amd_shader_half_float = GLAD_GL_AMD_gpu_shader_half_float; |
| 163 | has_sparse_texture_2 = GLAD_GL_ARB_sparse_texture2; | 164 | has_sparse_texture_2 = GLAD_GL_ARB_sparse_texture2; |
| 164 | warp_size_potentially_larger_than_guest = !is_nvidia && !is_intel; | 165 | warp_size_potentially_larger_than_guest = !is_nvidia && !is_intel; |
diff --git a/src/video_core/renderer_opengl/gl_device.h b/src/video_core/renderer_opengl/gl_device.h index 0c9d6fe31..0bd277d38 100644 --- a/src/video_core/renderer_opengl/gl_device.h +++ b/src/video_core/renderer_opengl/gl_device.h | |||
| @@ -124,6 +124,10 @@ public: | |||
| 124 | return has_nv_gpu_shader_5; | 124 | return has_nv_gpu_shader_5; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | bool HasShaderInt64() const { | ||
| 128 | return has_shader_int64; | ||
| 129 | } | ||
| 130 | |||
| 127 | bool HasAmdShaderHalfFloat() const { | 131 | bool HasAmdShaderHalfFloat() const { |
| 128 | return has_amd_shader_half_float; | 132 | return has_amd_shader_half_float; |
| 129 | } | 133 | } |
| @@ -172,6 +176,7 @@ private: | |||
| 172 | bool use_driver_cache{}; | 176 | bool use_driver_cache{}; |
| 173 | bool has_depth_buffer_float{}; | 177 | bool has_depth_buffer_float{}; |
| 174 | bool has_nv_gpu_shader_5{}; | 178 | bool has_nv_gpu_shader_5{}; |
| 179 | bool has_shader_int64{}; | ||
| 175 | bool has_amd_shader_half_float{}; | 180 | bool has_amd_shader_half_float{}; |
| 176 | bool has_sparse_texture_2{}; | 181 | bool has_sparse_texture_2{}; |
| 177 | bool warp_size_potentially_larger_than_guest{}; | 182 | bool warp_size_potentially_larger_than_guest{}; |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index c36b0d8cf..f2f18b18a 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -211,7 +211,7 @@ ShaderCache::ShaderCache(RasterizerOpenGL& rasterizer_, Core::Frontend::EmuWindo | |||
| 211 | }, | 211 | }, |
| 212 | host_info{ | 212 | host_info{ |
| 213 | .support_float16 = false, | 213 | .support_float16 = false, |
| 214 | .support_int64 = true, | 214 | .support_int64 = device.HasShaderInt64(), |
| 215 | } { | 215 | } { |
| 216 | if (use_asynchronous_shaders) { | 216 | if (use_asynchronous_shaders) { |
| 217 | workers = CreateWorkers(); | 217 | workers = CreateWorkers(); |
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index e83628c13..ec06b124f 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |||
| @@ -315,7 +315,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, Tegra::Engines::Maxw | |||
| 315 | }; | 315 | }; |
| 316 | host_info = Shader::HostTranslateInfo{ | 316 | host_info = Shader::HostTranslateInfo{ |
| 317 | .support_float16 = device.IsFloat16Supported(), | 317 | .support_float16 = device.IsFloat16Supported(), |
| 318 | .support_int64 = true, | 318 | .support_int64 = device.IsShaderInt64Supported(), |
| 319 | }; | 319 | }; |
| 320 | } | 320 | } |
| 321 | 321 | ||
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 49605752d..40d00a52f 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -164,6 +164,11 @@ public: | |||
| 164 | return is_formatless_image_load_supported; | 164 | return is_formatless_image_load_supported; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | /// Returns true if shader int64 is supported. | ||
| 168 | bool IsShaderInt64Supported() const { | ||
| 169 | return is_shader_int64_supported; | ||
| 170 | } | ||
| 171 | |||
| 167 | /// Returns true if shader int16 is supported. | 172 | /// Returns true if shader int16 is supported. |
| 168 | bool IsShaderInt16Supported() const { | 173 | bool IsShaderInt16Supported() const { |
| 169 | return is_shader_int16_supported; | 174 | return is_shader_int16_supported; |