Remove fmt from shader files.

This commit is contained in:
BearOso 2023-02-02 16:12:02 -06:00
parent 56a6396c9a
commit b578ce434b
3 changed files with 7 additions and 14 deletions

View File

@ -129,7 +129,7 @@ bool IniFile::get_bool(std::string key, bool default_value = false)
for (auto &c : lower)
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)
if (lower == s)
return true;

View File

@ -1,6 +1,5 @@
#include "vulkan_shader_chain.hpp"
#include "slang_helpers.hpp"
#include "fmt/format.h"
#include "stb_image.h"
#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)
{
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>();
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;
}
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;
}
@ -221,7 +220,7 @@ bool ShaderChain::load_shader_preset(std::string filename)
bool lastpass = (i == preset->passes.size() - 1);
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;
}
@ -573,7 +572,7 @@ bool ShaderChain::load_lookup_textures()
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;
}

View File

@ -1,6 +1,5 @@
#include "vulkan_slang_pipeline.hpp"
#include "slang_helpers.hpp"
#include "fmt/format.h"
#include <unordered_map>
namespace Vulkan
@ -243,11 +242,6 @@ bool SlangPipeline::generate_pipeline(bool lastpass)
vk::ColorComponentFlagBits::eA)
.setBlendEnable(false)
.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{}
.setLogicOpEnable(false)
@ -319,7 +313,7 @@ bool SlangPipeline::generate_pipeline(bool lastpass)
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;
}