diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2017-03-09 21:06:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-09 21:06:50 +0100 |
| commit | ef74c5eabd52a75eb42ecf9b36701dca11d3061f (patch) | |
| tree | 2cc71d56b6b97b05e29666d169824aacffc0258b /Source/Core/VideoBackends/Vulkan | |
| parent | cf848b7c42071104c2ade3b1b8230e2233a40f11 (diff) | |
| parent | 2cd240af0d261d4600e273badd912570a5a09a19 (diff) | |
Merge pull request #5051 from stenzek/renderer-fixes
VideoBackends: Fix crashes introduced by #4999
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Renderer.h | 1 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VulkanContext.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VulkanContext.h | 1 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/main.cpp | 3 |
4 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.h b/Source/Core/VideoBackends/Vulkan/Renderer.h index 34a3202b4f..49c261348c 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.h +++ b/Source/Core/VideoBackends/Vulkan/Renderer.h @@ -41,7 +41,6 @@ public: void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) override; u16 BBoxRead(int index) override; void BBoxWrite(int index, u16 value) override; - u32 GetMaxTextureSize() override { return 16 * 1024; } TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) override; void SwapImpl(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, const EFBRectangle& rc, diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp index 7dc809e6b2..1487e09afc 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp @@ -257,8 +257,10 @@ void VulkanContext::PopulateBackendInfoAdapters(VideoConfig* config, const GPULi } void VulkanContext::PopulateBackendInfoFeatures(VideoConfig* config, VkPhysicalDevice gpu, + const VkPhysicalDeviceProperties& properties, const VkPhysicalDeviceFeatures& features) { + config->backend_info.MaxTextureSize = properties.limits.maxImageDimension2D; config->backend_info.bSupportsDualSourceBlend = (features.dualSrcBlend == VK_TRUE); config->backend_info.bSupportsGeometryShaders = (features.geometryShader == VK_TRUE); config->backend_info.bSupportsGSInstancing = (features.geometryShader == VK_TRUE); diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.h b/Source/Core/VideoBackends/Vulkan/VulkanContext.h index e7c8f27ff1..538573fc0a 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.h +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.h @@ -35,6 +35,7 @@ public: static void PopulateBackendInfo(VideoConfig* config); static void PopulateBackendInfoAdapters(VideoConfig* config, const GPUList& gpu_list); static void PopulateBackendInfoFeatures(VideoConfig* config, VkPhysicalDevice gpu, + const VkPhysicalDeviceProperties& properties, const VkPhysicalDeviceFeatures& features); static void PopulateBackendInfoMultisampleModes(VideoConfig* config, VkPhysicalDevice gpu, const VkPhysicalDeviceProperties& properties); diff --git a/Source/Core/VideoBackends/Vulkan/main.cpp b/Source/Core/VideoBackends/Vulkan/main.cpp index 8b610f517f..6eaaa09b4c 100644 --- a/Source/Core/VideoBackends/Vulkan/main.cpp +++ b/Source/Core/VideoBackends/Vulkan/main.cpp @@ -52,7 +52,7 @@ void VideoBackend::InitBackendInfo() vkGetPhysicalDeviceProperties(gpu, &properties); VkPhysicalDeviceFeatures features; vkGetPhysicalDeviceFeatures(gpu, &features); - VulkanContext::PopulateBackendInfoFeatures(&g_Config, gpu, features); + VulkanContext::PopulateBackendInfoFeatures(&g_Config, gpu, properties, features); VulkanContext::PopulateBackendInfoMultisampleModes(&g_Config, gpu, properties); } } @@ -178,6 +178,7 @@ bool VideoBackend::Initialize(void* window_handle) // Since VulkanContext maintains a copy of the device features and properties, we can use this // to initialize the backend information, so that we don't need to enumerate everything again. VulkanContext::PopulateBackendInfoFeatures(&g_Config, g_vulkan_context->GetPhysicalDevice(), + g_vulkan_context->GetDeviceProperties(), g_vulkan_context->GetDeviceFeatures()); VulkanContext::PopulateBackendInfoMultisampleModes( &g_Config, g_vulkan_context->GetPhysicalDevice(), g_vulkan_context->GetDeviceProperties()); |
