mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 09:39:46 -06:00
VideoBackends: Move max texture size to VideoConfig
This stops the virtual method call from within the Renderer constructor. The initialization here for GL had to be moved to VideoBackend, as the Renderer constructor will not have been executed before the value is required.
This commit is contained in:
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
Reference in New Issue
Block a user