summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-31 01:44:28 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:34 +0200
commit1148a4eac715869077ace56a9a311a167643aca3 (patch)
tree2b05e1145e009f1ece93e6cc2a0efc1d2ad66698 /src/video_core
parentvulkan: Enable depth bounds and use it conditionally (diff)
downloadyuzu-1148a4eac715869077ace56a9a311a167643aca3.tar
yuzu-1148a4eac715869077ace56a9a311a167643aca3.tar.gz
yuzu-1148a4eac715869077ace56a9a311a167643aca3.tar.bz2
yuzu-1148a4eac715869077ace56a9a311a167643aca3.tar.lz
yuzu-1148a4eac715869077ace56a9a311a167643aca3.tar.xz
yuzu-1148a4eac715869077ace56a9a311a167643aca3.tar.zst
yuzu-1148a4eac715869077ace56a9a311a167643aca3.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.cpp2
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp3
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h6
3 files changed, 9 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
index cec51cc77..2a2f166c8 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
@@ -249,7 +249,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, Tegra::Engines::Maxw
.unified_descriptor_binding = true,
.support_descriptor_aliasing = true,
.support_int8 = true,
- .support_int16 = true,
+ .support_int16 = device.IsShaderInt16Supported(),
.support_vertex_instance_id = false,
.support_float_controls = true,
.support_separate_denorm_behavior = float_control.denormBehaviorIndependence ==
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
.shaderCullDistance = true,
.shaderFloat64 = is_shader_float64_supported,
.shaderInt64 = is_shader_int64_supported,
- .shaderInt16 = true,
+ .shaderInt16 = is_shader_int16_supported,
.shaderResourceResidency = false,
.shaderResourceMinLod = false,
.sparseBinding = false,
@@ -912,6 +912,7 @@ void Device::SetupFeatures() {
is_formatless_image_load_supported = features.shaderStorageImageReadWithoutFormat;
is_shader_float64_supported = features.shaderFloat64;
is_shader_int64_supported = features.shaderInt64;
+ is_shader_int16_supported = features.shaderInt16;
is_shader_storage_image_multisample = features.shaderStorageImageMultisample;
is_blit_depth_stencil_supported = TestDepthStencilBlits();
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:
return is_formatless_image_load_supported;
}
+ /// Returns true if shader int16 is supported.
+ bool IsShaderInt16Supported() const {
+ return is_shader_int16_supported;
+ }
+
// Returns true if depth bounds is supported.
bool IsDepthBoundsSupported() const {
return is_depth_bounds_supported;
@@ -322,6 +327,7 @@ private:
bool is_depth_bounds_supported{}; ///< Support for depth bounds.
bool is_shader_float64_supported{}; ///< Support for float64.
bool is_shader_int64_supported{}; ///< Support for int64.
+ bool is_shader_int16_supported{}; ///< Support for int16.
bool is_shader_storage_image_multisample{}; ///< Support for image operations on MSAA images.
bool is_blit_depth_stencil_supported{}; ///< Support for blitting from and to depth stencil.
bool nv_viewport_swizzle{}; ///< Support for VK_NV_viewport_swizzle.