diff options
| author | 2022-12-12 20:52:32 -0500 | |
|---|---|---|
| committer | 2022-12-12 20:53:05 -0500 | |
| commit | f6868ae4dd7928a251939069f9be6ff669bc391e (patch) | |
| tree | b5a201c59d07251b051588a7a3e109454391d369 /src/video_core/vulkan_common | |
| parent | Merge pull request #9398 from liamwhite/fail (diff) | |
| download | yuzu-f6868ae4dd7928a251939069f9be6ff669bc391e.tar.gz yuzu-f6868ae4dd7928a251939069f9be6ff669bc391e.tar.xz yuzu-f6868ae4dd7928a251939069f9be6ff669bc391e.zip | |
Fix validation errors on less compatible Intel GPU
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 6a2ad4b1d..67540cb80 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -1380,6 +1380,10 @@ void Device::SetupFeatures() { | |||
| 1380 | is_shader_storage_image_multisample = features.shaderStorageImageMultisample; | 1380 | is_shader_storage_image_multisample = features.shaderStorageImageMultisample; |
| 1381 | is_blit_depth_stencil_supported = TestDepthStencilBlits(); | 1381 | is_blit_depth_stencil_supported = TestDepthStencilBlits(); |
| 1382 | is_optimal_astc_supported = IsOptimalAstcSupported(features); | 1382 | is_optimal_astc_supported = IsOptimalAstcSupported(features); |
| 1383 | |||
| 1384 | const VkPhysicalDeviceLimits& limits{properties.limits}; | ||
| 1385 | max_vertex_input_attributes = limits.maxVertexInputAttributes; | ||
| 1386 | max_vertex_input_bindings = limits.maxVertexInputBindings; | ||
| 1383 | } | 1387 | } |
| 1384 | 1388 | ||
| 1385 | void Device::SetupProperties() { | 1389 | void Device::SetupProperties() { |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index db802437c..391b7604c 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -368,6 +368,14 @@ public: | |||
| 368 | return must_emulate_bgr565; | 368 | return must_emulate_bgr565; |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | u32 GetMaxVertexInputAttributes() const { | ||
| 372 | return max_vertex_input_attributes; | ||
| 373 | } | ||
| 374 | |||
| 375 | u32 GetMaxVertexInputBindings() const { | ||
| 376 | return max_vertex_input_bindings; | ||
| 377 | } | ||
| 378 | |||
| 371 | private: | 379 | private: |
| 372 | /// Checks if the physical device is suitable. | 380 | /// Checks if the physical device is suitable. |
| 373 | void CheckSuitability(bool requires_swapchain) const; | 381 | void CheckSuitability(bool requires_swapchain) const; |
| @@ -467,6 +475,8 @@ private: | |||
| 467 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. | 475 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. |
| 468 | bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting. | 476 | bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting. |
| 469 | bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format. | 477 | bool must_emulate_bgr565{}; ///< Emulates BGR565 by swizzling RGB565 format. |
| 478 | u32 max_vertex_input_attributes{}; ///< Max vertex input attributes in pipeline | ||
| 479 | u32 max_vertex_input_bindings{}; ///< Max vertex input buffers in pipeline | ||
| 470 | 480 | ||
| 471 | // Telemetry parameters | 481 | // Telemetry parameters |
| 472 | std::string vendor_name; ///< Device's driver name. | 482 | std::string vendor_name; ///< Device's driver name. |