summaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-05-30 20:44:28 -0300
committerGravatar ameerj2021-07-22 21:51:34 -0400
commit1148a4eac715869077ace56a9a311a167643aca3 (patch)
tree2b05e1145e009f1ece93e6cc2a0efc1d2ad66698 /src/video_core/vulkan_common
parentvulkan: Enable depth bounds and use it conditionally (diff)
downloadyuzu-1148a4eac715869077ace56a9a311a167643aca3.tar.gz
yuzu-1148a4eac715869077ace56a9a311a167643aca3.tar.xz
yuzu-1148a4eac715869077ace56a9a311a167643aca3.zip
vulkan: Conditionally use shaderInt16
Add support for Polaris AMD devices.
Diffstat (limited to 'src/video_core/vulkan_common')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp3
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index 0a42efb6a..2b715baba 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -253,7 +253,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
253 .shaderCullDistance = true, 253 .shaderCullDistance = true,
254 .shaderFloat64 = is_shader_float64_supported, 254 .shaderFloat64 = is_shader_float64_supported,
255 .shaderInt64 = is_shader_int64_supported, 255 .shaderInt64 = is_shader_int64_supported,
256 .shaderInt16 = true, 256 .shaderInt16 = is_shader_int16_supported,
257 .shaderResourceResidency = false, 257 .shaderResourceResidency = false,
258 .shaderResourceMinLod = false, 258 .shaderResourceMinLod = false,
259 .sparseBinding = false, 259 .sparseBinding = false,
@@ -912,6 +912,7 @@ void Device::SetupFeatures() {
912 is_formatless_image_load_supported = features.shaderStorageImageReadWithoutFormat; 912 is_formatless_image_load_supported = features.shaderStorageImageReadWithoutFormat;
913 is_shader_float64_supported = features.shaderFloat64; 913 is_shader_float64_supported = features.shaderFloat64;
914 is_shader_int64_supported = features.shaderInt64; 914 is_shader_int64_supported = features.shaderInt64;
915 is_shader_int16_supported = features.shaderInt16;
915 is_shader_storage_image_multisample = features.shaderStorageImageMultisample; 916 is_shader_storage_image_multisample = features.shaderStorageImageMultisample;
916 is_blit_depth_stencil_supported = TestDepthStencilBlits(); 917 is_blit_depth_stencil_supported = TestDepthStencilBlits();
917 is_optimal_astc_supported = IsOptimalAstcSupported(features); 918 is_optimal_astc_supported = IsOptimalAstcSupported(features);
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index 1ab63ecd7..9bc1fb947 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -159,6 +159,11 @@ public:
159 return is_formatless_image_load_supported; 159 return is_formatless_image_load_supported;
160 } 160 }
161 161
162 /// Returns true if shader int16 is supported.
163 bool IsShaderInt16Supported() const {
164 return is_shader_int16_supported;
165 }
166
162 // Returns true if depth bounds is supported. 167 // Returns true if depth bounds is supported.
163 bool IsDepthBoundsSupported() const { 168 bool IsDepthBoundsSupported() const {
164 return is_depth_bounds_supported; 169 return is_depth_bounds_supported;
@@ -322,6 +327,7 @@ private:
322 bool is_depth_bounds_supported{}; ///< Support for depth bounds. 327 bool is_depth_bounds_supported{}; ///< Support for depth bounds.
323 bool is_shader_float64_supported{}; ///< Support for float64. 328 bool is_shader_float64_supported{}; ///< Support for float64.
324 bool is_shader_int64_supported{}; ///< Support for int64. 329 bool is_shader_int64_supported{}; ///< Support for int64.
330 bool is_shader_int16_supported{}; ///< Support for int16.
325 bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images. 331 bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images.
326 bool is_blit_depth_stencil_supported{}; ///< Support for blitting from and to depth stencil. 332 bool is_blit_depth_stencil_supported{}; ///< Support for blitting from and to depth stencil.
327 bool nv_viewport_swizzle{}; ///< Support for VK_NV_viewport_swizzle. 333 bool nv_viewport_swizzle{}; ///< Support for VK_NV_viewport_swizzle.