adjusted VulkanHardwareRequirement order in CreateRenderDevice functions.

This commit is contained in:
HuYingzhuo(hugo/hyzboy) 2023-11-01 10:59:51 +08:00
parent c4deceebd9
commit 625a7387ae
2 changed files with 12 additions and 12 deletions

View File

@ -247,10 +247,10 @@ public:
VulkanDeviceCreater(VulkanInstance *vi, VulkanDeviceCreater(VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req,
const PreferFormats *spf_color, const PreferFormats *spf_color,
const PreferColorSpaces *spf_color_space, const PreferColorSpaces *spf_color_space,
const PreferFormats *spf_depth, const PreferFormats *spf_depth);
const VulkanHardwareRequirement *req);
virtual bool ChoosePhysicalDevice(); virtual bool ChoosePhysicalDevice();
@ -267,12 +267,12 @@ public:
inline GPUDevice *CreateRenderDevice( VulkanInstance *vi, inline GPUDevice *CreateRenderDevice( VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req=nullptr,
const PreferFormats * spf_color =&PreferSDR, const PreferFormats * spf_color =&PreferSDR,
const PreferColorSpaces * spf_color_space =&PreferNonlinear, const PreferColorSpaces * spf_color_space =&PreferNonlinear,
const PreferFormats * spf_depth =&PreferDepth, const PreferFormats * spf_depth =&PreferDepth)
const VulkanHardwareRequirement *req=nullptr)
{ {
VulkanDeviceCreater vdc(vi,win,spf_color,spf_color_space,spf_depth,req); VulkanDeviceCreater vdc(vi,win,req,spf_color,spf_color_space,spf_depth);
return vdc.Create(); return vdc.Create();
} }
@ -281,34 +281,34 @@ inline GPUDevice *CreateRenderDeviceLDR(VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req=nullptr) const VulkanHardwareRequirement *req=nullptr)
{ {
return CreateRenderDevice(vi,win,&PreferLDR,&PreferNonlinear,&PreferDepth,req); return CreateRenderDevice(vi,win,req,&PreferLDR,&PreferNonlinear,&PreferDepth);
} }
inline GPUDevice *CreateRenderDeviceSDR(VulkanInstance *vi, inline GPUDevice *CreateRenderDeviceSDR(VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req=nullptr) const VulkanHardwareRequirement *req=nullptr)
{ {
return CreateRenderDevice(vi,win,&PreferSDR,&PreferNonlinear,&PreferDepth,req); return CreateRenderDevice(vi,win,req,&PreferSDR,&PreferNonlinear,&PreferDepth);
} }
inline GPUDevice *CreateRenderDeviceHDR16( VulkanInstance *vi, inline GPUDevice *CreateRenderDeviceHDR16( VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req=nullptr) const VulkanHardwareRequirement *req=nullptr)
{ {
return CreateRenderDevice(vi,win,&PreferHDR16,&PreferLinear,&PreferDepth,req); return CreateRenderDevice(vi,win,req,&PreferHDR16,&PreferLinear,&PreferDepth);
} }
inline GPUDevice *CreateRenderDeviceHDR32( VulkanInstance *vi, inline GPUDevice *CreateRenderDeviceHDR32( VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req=nullptr) const VulkanHardwareRequirement *req=nullptr)
{ {
return CreateRenderDevice(vi,win,&PreferHDR32,&PreferLinear,&PreferDepth,req); return CreateRenderDevice(vi,win,req,&PreferHDR32,&PreferLinear,&PreferDepth);
} }
inline GPUDevice *CreateRenderDeviceHDR(VulkanInstance *vi, inline GPUDevice *CreateRenderDeviceHDR(VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req=nullptr) const VulkanHardwareRequirement *req=nullptr)
{ {
return CreateRenderDevice(vi,win,&PreferHDR,&PreferLinear,&PreferDepth,req); return CreateRenderDevice(vi,win,req,&PreferHDR,&PreferLinear,&PreferDepth);
} }
VK_NAMESPACE_END VK_NAMESPACE_END

View File

@ -333,10 +333,10 @@ GPUDevice *VulkanDeviceCreater::CreateRenderDevice()
VulkanDeviceCreater::VulkanDeviceCreater( VulkanInstance *vi, VulkanDeviceCreater::VulkanDeviceCreater( VulkanInstance *vi,
Window *win, Window *win,
const VulkanHardwareRequirement *req,
const PreferFormats *spf_color, const PreferFormats *spf_color,
const PreferColorSpaces *spf_color_space, const PreferColorSpaces *spf_color_space,
const PreferFormats *spf_depth, const PreferFormats *spf_depth)
const VulkanHardwareRequirement *req)
{ {
instance=vi; instance=vi;
window=win; window=win;