build: Clear out remaining compile warnings. (#6662)
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
|
||||
//? #version 430 core
|
||||
|
||||
precision highp int;
|
||||
precision highp float;
|
||||
|
||||
layout(location = 0) in mediump vec2 tex_coord;
|
||||
layout(location = 0) out lowp vec4 frag_color;
|
||||
|
||||
|
@@ -4,6 +4,9 @@
|
||||
|
||||
//? #version 430 core
|
||||
|
||||
precision highp int;
|
||||
precision highp float;
|
||||
|
||||
layout(location = 0) in mediump vec2 tex_coord;
|
||||
layout(location = 0) out lowp vec4 frag_color;
|
||||
|
||||
|
@@ -681,8 +681,8 @@ Sampler::Sampler(TextureRuntime&, VideoCore::SamplerParams params) {
|
||||
const GLenum wrap_s = PicaToGL::WrapMode(params.wrap_s);
|
||||
const GLenum wrap_t = PicaToGL::WrapMode(params.wrap_t);
|
||||
const Common::Vec4f gl_color = PicaToGL::ColorRGBA8(params.border_color);
|
||||
const float lod_min = params.lod_min;
|
||||
const float lod_max = params.lod_max;
|
||||
const auto lod_min = static_cast<float>(params.lod_min);
|
||||
const auto lod_max = static_cast<float>(params.lod_max);
|
||||
|
||||
sampler.Create();
|
||||
|
||||
@@ -706,7 +706,8 @@ DebugScope::DebugScope(TextureRuntime& runtime, Common::Vec4f, std::string_view
|
||||
if (!Settings::values.renderer_debug) {
|
||||
return;
|
||||
}
|
||||
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, local_scope_depth, label.size(), label.data());
|
||||
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, local_scope_depth,
|
||||
static_cast<GLsizei>(label.size()), label.data());
|
||||
}
|
||||
|
||||
DebugScope::~DebugScope() {
|
||||
|
@@ -292,11 +292,6 @@ void RasterizerSoftware::ProcessTriangle(const Vertex& v0, const Vertex& v1, con
|
||||
auto textures = regs.texturing.GetTextures();
|
||||
const auto tev_stages = regs.texturing.GetTevStages();
|
||||
|
||||
const bool stencil_action_enable =
|
||||
regs.framebuffer.output_merger.stencil_test.enable &&
|
||||
regs.framebuffer.framebuffer.depth_format == FramebufferRegs::DepthFormat::D24S8;
|
||||
const auto stencil_test = regs.framebuffer.output_merger.stencil_test;
|
||||
|
||||
// Enter rasterization loop, starting at the center of the topleft bounding box corner.
|
||||
// TODO: Not sure if looping through x first might be faster
|
||||
for (u16 y = min_y + 8; y < max_y; y += 0x10) {
|
||||
@@ -446,7 +441,7 @@ void RasterizerSoftware::ProcessTriangle(const Vertex& v0, const Vertex& v1, con
|
||||
continue;
|
||||
}
|
||||
WriteFog(combiner_output, depth);
|
||||
if (!DoDepthStencilTest(x, y, depth, stencil_action_enable)) {
|
||||
if (!DoDepthStencilTest(x, y, depth)) {
|
||||
continue;
|
||||
}
|
||||
const auto result = PixelColor(x, y, combiner_output);
|
||||
@@ -828,11 +823,14 @@ bool RasterizerSoftware::DoAlphaTest(u8 alpha) const {
|
||||
return alpha > output_merger.alpha_test.ref;
|
||||
case FramebufferRegs::CompareFunc::GreaterThanOrEqual:
|
||||
return alpha >= output_merger.alpha_test.ref;
|
||||
default:
|
||||
LOG_CRITICAL(Render_Software, "Unknown alpha test condition {}",
|
||||
output_merger.alpha_test.func.Value());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool RasterizerSoftware::DoDepthStencilTest(u16 x, u16 y, float depth,
|
||||
bool stencil_action_enable) const {
|
||||
bool RasterizerSoftware::DoDepthStencilTest(u16 x, u16 y, float depth) const {
|
||||
const auto& framebuffer = regs.framebuffer.framebuffer;
|
||||
const auto stencil_test = regs.framebuffer.output_merger.stencil_test;
|
||||
u8 old_stencil = 0;
|
||||
@@ -847,6 +845,10 @@ bool RasterizerSoftware::DoDepthStencilTest(u16 x, u16 y, float depth,
|
||||
}
|
||||
};
|
||||
|
||||
const bool stencil_action_enable =
|
||||
regs.framebuffer.output_merger.stencil_test.enable &&
|
||||
regs.framebuffer.framebuffer.depth_format == FramebufferRegs::DepthFormat::D24S8;
|
||||
|
||||
if (stencil_action_enable) {
|
||||
old_stencil = fb.GetStencil(x >> 4, y >> 4);
|
||||
const u8 dest = old_stencil & stencil_test.input_mask;
|
||||
|
@@ -68,7 +68,7 @@ private:
|
||||
bool DoAlphaTest(u8 alpha) const;
|
||||
|
||||
/// Performs the depth stencil test. Returns false if the test failed.
|
||||
bool DoDepthStencilTest(u16 x, u16 y, float depth, bool stencil_action_enable) const;
|
||||
bool DoDepthStencilTest(u16 x, u16 y, float depth) const;
|
||||
|
||||
private:
|
||||
Memory::MemorySystem& memory;
|
||||
|
@@ -281,7 +281,6 @@ private:
|
||||
bool pipeline_creation_cache_control{};
|
||||
bool shader_stencil_export{};
|
||||
bool debug_messenger_supported{};
|
||||
bool debug_report_supported{};
|
||||
};
|
||||
|
||||
} // namespace Vulkan
|
||||
|
@@ -99,10 +99,10 @@ std::shared_ptr<Common::DynamicLibrary> OpenLibrary() {
|
||||
auto library = std::make_shared<Common::DynamicLibrary>();
|
||||
#ifdef __APPLE__
|
||||
const std::string filename = Common::DynamicLibrary::GetLibraryName("vulkan");
|
||||
library->Load(filename);
|
||||
if (!library->IsLoaded()) {
|
||||
if (!library->Load(filename)) {
|
||||
// Fall back to directly loading bundled MoltenVK library.
|
||||
library->Load("libMoltenVK.dylib");
|
||||
const std::string mvk_filename = Common::DynamicLibrary::GetLibraryName("MoltenVK");
|
||||
void(library->Load(mvk_filename));
|
||||
}
|
||||
#else
|
||||
std::string filename = Common::DynamicLibrary::GetLibraryName("vulkan", 1);
|
||||
|
@@ -1497,7 +1497,6 @@ void FragmentModule::DefineInterface() {
|
||||
|
||||
// Define shadow textures
|
||||
shadow_texture_px_id = DefineUniformConst(image_r32_id, 2, 0, true);
|
||||
shadow_buffer_id = DefineUniformConst(image_r32_id, 2, 6);
|
||||
|
||||
// Define built-ins
|
||||
gl_frag_coord_id = DefineVar(vec_ids.Get(4), spv::StorageClass::Input);
|
||||
|
@@ -256,13 +256,7 @@ private:
|
||||
Id texture_buffer_lut_lf_id{};
|
||||
Id texture_buffer_lut_rg_id{};
|
||||
Id texture_buffer_lut_rgba_id{};
|
||||
Id shadow_buffer_id{};
|
||||
Id shadow_texture_px_id{};
|
||||
Id shadow_texture_nx_id{};
|
||||
Id shadow_texture_py_id{};
|
||||
Id shadow_texture_ny_id{};
|
||||
Id shadow_texture_pz_id{};
|
||||
Id shadow_texture_nz_id{};
|
||||
|
||||
Id texture_buffer_lut_lf{};
|
||||
Id texture_buffer_lut_rg{};
|
||||
|
Reference in New Issue
Block a user