mirror of https://github.com/snes9xgit/snes9x.git
Remove fmt from shader files.
This commit is contained in:
parent
56a6396c9a
commit
b578ce434b
|
@ -129,7 +129,7 @@ bool IniFile::get_bool(std::string key, bool default_value = false)
|
||||||
for (auto &c : lower)
|
for (auto &c : lower)
|
||||||
c = tolower(c);
|
c = tolower(c);
|
||||||
|
|
||||||
const char *true_strings[] = { "true", "1", "yes", "on"};
|
const char *true_strings[] = { "true", "1", "yes", "on", "y"};
|
||||||
for (auto &s : true_strings)
|
for (auto &s : true_strings)
|
||||||
if (lower == s)
|
if (lower == s)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "vulkan_shader_chain.hpp"
|
#include "vulkan_shader_chain.hpp"
|
||||||
#include "slang_helpers.hpp"
|
#include "slang_helpers.hpp"
|
||||||
#include "fmt/format.h"
|
|
||||||
#include "stb_image.h"
|
#include "stb_image.h"
|
||||||
#include "vulkan/vulkan_enums.hpp"
|
#include "vulkan/vulkan_enums.hpp"
|
||||||
|
|
||||||
|
@ -191,19 +190,19 @@ void ShaderChain::update_and_propagate_sizes(int original_width_new, int origina
|
||||||
bool ShaderChain::load_shader_preset(std::string filename)
|
bool ShaderChain::load_shader_preset(std::string filename)
|
||||||
{
|
{
|
||||||
if (!ends_with(filename, ".slangp"))
|
if (!ends_with(filename, ".slangp"))
|
||||||
fmt::print("Warning: loading preset without .slangp extension\n");
|
printf("Warning: loading preset without .slangp extension\n");
|
||||||
|
|
||||||
preset = std::make_unique<SlangPreset>();
|
preset = std::make_unique<SlangPreset>();
|
||||||
|
|
||||||
if (!preset->load_preset_file(filename))
|
if (!preset->load_preset_file(filename))
|
||||||
{
|
{
|
||||||
fmt::print("Couldn't load preset file: {}\n", filename);
|
printf("Couldn't load preset file: %s\n", filename.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!preset->introspect())
|
if (!preset->introspect())
|
||||||
{
|
{
|
||||||
fmt::print("Failed introspection process in preset: {}\n", filename);
|
printf("Failed introspection process in preset: %s\n", filename.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +220,7 @@ bool ShaderChain::load_shader_preset(std::string filename)
|
||||||
bool lastpass = (i == preset->passes.size() - 1);
|
bool lastpass = (i == preset->passes.size() - 1);
|
||||||
if (!pipelines[i]->generate_pipeline(lastpass))
|
if (!pipelines[i]->generate_pipeline(lastpass))
|
||||||
{
|
{
|
||||||
fmt::print("Couldn't create pipeline for shader: {}\n", p.filename);
|
printf("Couldn't create pipeline for shader: %s\n", p.filename.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,7 +572,7 @@ bool ShaderChain::load_lookup_textures()
|
||||||
|
|
||||||
if (!bytes)
|
if (!bytes)
|
||||||
{
|
{
|
||||||
fmt::print("Couldn't load look-up texture: {}\n", l.filename);
|
printf("Couldn't load look-up texture: %s\n", l.filename.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "vulkan_slang_pipeline.hpp"
|
#include "vulkan_slang_pipeline.hpp"
|
||||||
#include "slang_helpers.hpp"
|
#include "slang_helpers.hpp"
|
||||||
#include "fmt/format.h"
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace Vulkan
|
namespace Vulkan
|
||||||
|
@ -243,11 +242,6 @@ bool SlangPipeline::generate_pipeline(bool lastpass)
|
||||||
vk::ColorComponentFlagBits::eA)
|
vk::ColorComponentFlagBits::eA)
|
||||||
.setBlendEnable(false)
|
.setBlendEnable(false)
|
||||||
.setColorBlendOp(vk::BlendOp::eAdd);
|
.setColorBlendOp(vk::BlendOp::eAdd);
|
||||||
// .setSrcColorBlendFactor(vk::BlendFactor::eSrcAlpha)
|
|
||||||
// .setDstColorBlendFactor(vk::BlendFactor::eOneMinusSrcAlpha)
|
|
||||||
// .setAlphaBlendOp(vk::BlendOp::eAdd)
|
|
||||||
// .setSrcAlphaBlendFactor(vk::BlendFactor::eOne)
|
|
||||||
// .setSrcAlphaBlendFactor(vk::BlendFactor::eZero);
|
|
||||||
|
|
||||||
auto blend_state_info = vk::PipelineColorBlendStateCreateInfo{}
|
auto blend_state_info = vk::PipelineColorBlendStateCreateInfo{}
|
||||||
.setLogicOpEnable(false)
|
.setLogicOpEnable(false)
|
||||||
|
@ -319,7 +313,7 @@ bool SlangPipeline::generate_pipeline(bool lastpass)
|
||||||
|
|
||||||
if (result != vk::Result::eSuccess)
|
if (result != vk::Result::eSuccess)
|
||||||
{
|
{
|
||||||
fmt::print("Failed to create pipeline for shader: {}\n", shader->filename);
|
printf("Failed to create pipeline for shader: %s\n", shader->filename.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue