mirror of https://github.com/snes9xgit/snes9x.git
Vulkan: Favor default initializers.
This commit is contained in:
parent
932b093d98
commit
170a6aa1a4
|
@ -19,14 +19,6 @@
|
|||
using std::string;
|
||||
using std::to_string;
|
||||
|
||||
SlangPreset::SlangPreset()
|
||||
{
|
||||
}
|
||||
|
||||
SlangPreset::~SlangPreset()
|
||||
{
|
||||
}
|
||||
|
||||
bool SlangPreset::load_preset_file(string filename)
|
||||
{
|
||||
if (!ends_with(filename, ".slangp"))
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
|
||||
struct SlangPreset
|
||||
{
|
||||
SlangPreset();
|
||||
~SlangPreset();
|
||||
|
||||
void print();
|
||||
bool load_preset_file(std::string filename);
|
||||
bool introspect();
|
||||
|
|
|
@ -4,14 +4,6 @@
|
|||
#include <cstring>
|
||||
#include <charconv>
|
||||
|
||||
IniFile::IniFile()
|
||||
{
|
||||
}
|
||||
|
||||
IniFile::~IniFile()
|
||||
{
|
||||
}
|
||||
|
||||
static std::string trim_comments(std::string str)
|
||||
{
|
||||
for (auto &comment : { "//", "#" })
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
struct IniFile
|
||||
{
|
||||
IniFile();
|
||||
~IniFile();
|
||||
bool load_file(std::string filename);
|
||||
std::string get_string(std::string key, std::string default_string);
|
||||
int get_int(std::string key, int default_int);
|
||||
|
|
|
@ -14,15 +14,6 @@
|
|||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
SlangShader::SlangShader()
|
||||
{
|
||||
ubo_size = 0;
|
||||
}
|
||||
|
||||
SlangShader::~SlangShader()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
Recursively load shader file and included files into memory, applying
|
||||
#include and #pragma directives. Will strip all directives except
|
||||
|
|
|
@ -65,9 +65,6 @@ struct SlangShader
|
|||
Fragment
|
||||
};
|
||||
|
||||
SlangShader();
|
||||
~SlangShader();
|
||||
|
||||
bool preprocess_shader_file(std::string filename, std::vector<std::string> &lines);
|
||||
void set_base_path(std::string filename);
|
||||
bool load_file(std::string new_filename = "");
|
||||
|
|
|
@ -7,18 +7,6 @@
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
PipelineImage::PipelineImage()
|
||||
{
|
||||
image_width = 0;
|
||||
image_height = 0;
|
||||
device = nullptr;
|
||||
command_pool = nullptr;
|
||||
allocator = nullptr;
|
||||
queue = nullptr;
|
||||
image = nullptr;
|
||||
current_layout = vk::ImageLayout::eUndefined;
|
||||
}
|
||||
|
||||
PipelineImage::~PipelineImage()
|
||||
{
|
||||
destroy();
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Vulkan
|
|||
|
||||
struct PipelineImage
|
||||
{
|
||||
PipelineImage();
|
||||
PipelineImage() = default;
|
||||
void init(vk::Device device, vk::CommandPool command, vk::Queue queue, vma::Allocator allocator);
|
||||
void init(Vulkan::Context *context);
|
||||
~PipelineImage();
|
||||
|
|
|
@ -65,18 +65,6 @@ vk::SamplerAddressMode wrap_mode_from_string(std::string s)
|
|||
return vk::SamplerAddressMode::eClampToBorder;
|
||||
}
|
||||
|
||||
SlangPipeline::SlangPipeline()
|
||||
{
|
||||
device = nullptr;
|
||||
shader = nullptr;
|
||||
uniform_buffer = nullptr;
|
||||
uniform_buffer_allocation = nullptr;
|
||||
source_width = 0;
|
||||
source_height = 0;
|
||||
destination_width = 0;
|
||||
destination_height = 0;
|
||||
}
|
||||
|
||||
void SlangPipeline::init(Context *context_, SlangShader *shader_)
|
||||
{
|
||||
this->context = context_;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace Vulkan
|
|||
class SlangPipeline
|
||||
{
|
||||
public:
|
||||
SlangPipeline();
|
||||
SlangPipeline() = default;
|
||||
void init(Context *context_, SlangShader *shader_);
|
||||
~SlangPipeline();
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ Swapchain::Swapchain(Context &context_)
|
|||
command_pool(context.command_pool.get()),
|
||||
surface(context.surface.get())
|
||||
{
|
||||
end_render_pass_function = nullptr;
|
||||
}
|
||||
|
||||
Swapchain::~Swapchain()
|
||||
|
|
|
@ -41,7 +41,7 @@ class Swapchain
|
|||
vk::RenderPass &get_render_pass();
|
||||
|
||||
private:
|
||||
std::function<void()> end_render_pass_function;
|
||||
std::function<void()> end_render_pass_function = nullptr;
|
||||
void create_render_pass();
|
||||
|
||||
struct Frame
|
||||
|
@ -79,11 +79,11 @@ class Swapchain
|
|||
std::vector<ImageData> image_data;
|
||||
|
||||
Vulkan::Context &context;
|
||||
vk::SurfaceKHR &surface;
|
||||
vk::Device &device;
|
||||
vk::CommandPool &command_pool;
|
||||
vk::PhysicalDevice &physical_device;
|
||||
vk::Queue &queue;
|
||||
vk::PhysicalDevice &physical_device;
|
||||
vk::CommandPool &command_pool;
|
||||
vk::SurfaceKHR &surface;
|
||||
};
|
||||
|
||||
} // namespace Vulkan
|
|
@ -7,20 +7,6 @@
|
|||
namespace Vulkan
|
||||
{
|
||||
|
||||
Texture::Texture()
|
||||
{
|
||||
image_width = 0;
|
||||
image_height = 0;
|
||||
buffer_size = 0;
|
||||
device = nullptr;
|
||||
command_pool = nullptr;
|
||||
allocator = nullptr;
|
||||
queue = nullptr;
|
||||
buffer = nullptr;
|
||||
image = nullptr;
|
||||
sampler = nullptr;
|
||||
}
|
||||
|
||||
Texture::~Texture()
|
||||
{
|
||||
destroy();
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace Vulkan
|
|||
|
||||
struct Texture
|
||||
{
|
||||
Texture();
|
||||
Texture() = default;
|
||||
void init(vk::Device device, vk::CommandPool command, vk::Queue queue, vma::Allocator allocator);
|
||||
void init(Context *context);
|
||||
~Texture();
|
||||
|
|
Loading…
Reference in New Issue