mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-08 15:09:59 +00:00
Merge pull request #4394 from lioncash/unused6
video_core: Remove unused variables
This commit is contained in:
commit
1d7de0a8ee
8 changed files with 5 additions and 33 deletions
|
@ -44,9 +44,9 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
|
||||||
dma_pusher.DispatchCalls();
|
dma_pusher.DispatchCalls();
|
||||||
} else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) {
|
} else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) {
|
||||||
renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr);
|
renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr);
|
||||||
} else if (const auto data = std::get_if<OnCommandListEndCommand>(&next.data)) {
|
} else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) {
|
||||||
renderer.Rasterizer().ReleaseFences();
|
renderer.Rasterizer().ReleaseFences();
|
||||||
} else if (const auto data = std::get_if<GPUTickCommand>(&next.data)) {
|
} else if (std::holds_alternative<GPUTickCommand>(next.data)) {
|
||||||
system.GPU().TickWork();
|
system.GPU().TickWork();
|
||||||
} else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) {
|
} else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) {
|
||||||
renderer.Rasterizer().FlushRegion(data->addr, data->size);
|
renderer.Rasterizer().FlushRegion(data->addr, data->size);
|
||||||
|
|
|
@ -419,7 +419,6 @@ void Tegra::MacroJITx64Impl::Optimizer_ScanFlags() {
|
||||||
|
|
||||||
void MacroJITx64Impl::Compile() {
|
void MacroJITx64Impl::Compile() {
|
||||||
MICROPROFILE_SCOPE(MacroJitCompile);
|
MICROPROFILE_SCOPE(MacroJitCompile);
|
||||||
bool keep_executing = true;
|
|
||||||
labels.fill(Xbyak::Label());
|
labels.fill(Xbyak::Label());
|
||||||
|
|
||||||
Common::X64::ABI_PushRegistersAndAdjustStack(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8);
|
Common::X64::ABI_PushRegistersAndAdjustStack(*this, Common::X64::ABI_ALL_CALLEE_SAVED, 8);
|
||||||
|
|
|
@ -1291,13 +1291,6 @@ std::string ARBDecompiler::Visit(const Node& node) {
|
||||||
return "{0, 0, 0, 0}.x";
|
return "{0, 0, 0, 0}.x";
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto buffer_index = [this, &abuf]() -> std::string {
|
|
||||||
if (stage != ShaderType::Geometry) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return fmt::format("[{}]", Visit(abuf->GetBuffer()));
|
|
||||||
};
|
|
||||||
|
|
||||||
const Attribute::Index index = abuf->GetIndex();
|
const Attribute::Index index = abuf->GetIndex();
|
||||||
const u32 element = abuf->GetElement();
|
const u32 element = abuf->GetElement();
|
||||||
const char swizzle = Swizzle(element);
|
const char swizzle = Swizzle(element);
|
||||||
|
@ -1403,7 +1396,7 @@ std::string ARBDecompiler::Visit(const Node& node) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const auto cmt = std::get_if<CommentNode>(&*node)) {
|
if ([[maybe_unused]] const auto cmt = std::get_if<CommentNode>(&*node)) {
|
||||||
// Uncommenting this will generate invalid code. GLASM lacks comments.
|
// Uncommenting this will generate invalid code. GLASM lacks comments.
|
||||||
// AddLine("// {}", cmt->GetText());
|
// AddLine("// {}", cmt->GetText());
|
||||||
return {};
|
return {};
|
||||||
|
|
|
@ -237,7 +237,6 @@ std::unique_ptr<Shader> Shader::CreateStageFromMemory(
|
||||||
const ShaderParameters& params, Maxwell::ShaderProgram program_type, ProgramCode code,
|
const ShaderParameters& params, Maxwell::ShaderProgram program_type, ProgramCode code,
|
||||||
ProgramCode code_b, VideoCommon::Shader::AsyncShaders& async_shaders, VAddr cpu_addr) {
|
ProgramCode code_b, VideoCommon::Shader::AsyncShaders& async_shaders, VAddr cpu_addr) {
|
||||||
const auto shader_type = GetShaderType(program_type);
|
const auto shader_type = GetShaderType(program_type);
|
||||||
const std::size_t size_in_bytes = code.size() * sizeof(u64);
|
|
||||||
|
|
||||||
auto& gpu = params.system.GPU();
|
auto& gpu = params.system.GPU();
|
||||||
gpu.ShaderNotify().MarkSharderBuilding();
|
gpu.ShaderNotify().MarkSharderBuilding();
|
||||||
|
@ -287,8 +286,6 @@ std::unique_ptr<Shader> Shader::CreateStageFromMemory(
|
||||||
|
|
||||||
std::unique_ptr<Shader> Shader::CreateKernelFromMemory(const ShaderParameters& params,
|
std::unique_ptr<Shader> Shader::CreateKernelFromMemory(const ShaderParameters& params,
|
||||||
ProgramCode code) {
|
ProgramCode code) {
|
||||||
const std::size_t size_in_bytes = code.size() * sizeof(u64);
|
|
||||||
|
|
||||||
auto& gpu = params.system.GPU();
|
auto& gpu = params.system.GPU();
|
||||||
gpu.ShaderNotify().MarkSharderBuilding();
|
gpu.ShaderNotify().MarkSharderBuilding();
|
||||||
|
|
||||||
|
|
|
@ -1959,10 +1959,6 @@ private:
|
||||||
return {fmt::format("({} != 0)", carry), Type::Bool};
|
return {fmt::format("({} != 0)", carry), Type::Bool};
|
||||||
}
|
}
|
||||||
|
|
||||||
Expression LogicalFIsNan(Operation operation) {
|
|
||||||
return GenerateUnary(operation, "isnan", Type::Bool, Type::Float);
|
|
||||||
}
|
|
||||||
|
|
||||||
Expression LogicalAssign(Operation operation) {
|
Expression LogicalAssign(Operation operation) {
|
||||||
const Node& dest = operation[0];
|
const Node& dest = operation[0];
|
||||||
const Node& src = operation[1];
|
const Node& src = operation[1];
|
||||||
|
@ -2778,15 +2774,6 @@ private:
|
||||||
return std::min<u32>(device.GetMaxVaryings(), Maxwell::NumVaryings);
|
return std::min<u32>(device.GetMaxVaryings(), Maxwell::NumVaryings);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsRenderTargetEnabled(u32 render_target) const {
|
|
||||||
for (u32 component = 0; component < 4; ++component) {
|
|
||||||
if (header.ps.IsColorComponentOutputEnabled(render_target, component)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Device& device;
|
const Device& device;
|
||||||
const ShaderIR& ir;
|
const ShaderIR& ir;
|
||||||
const Registry& registry;
|
const Registry& registry;
|
||||||
|
|
|
@ -40,7 +40,6 @@ constexpr std::array POLYGON_OFFSET_ENABLE_LUT = {
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
void FixedPipelineState::Fill(const Maxwell& regs, bool has_extended_dynamic_state) {
|
void FixedPipelineState::Fill(const Maxwell& regs, bool has_extended_dynamic_state) {
|
||||||
const auto& clip = regs.view_volume_clip_control;
|
|
||||||
const std::array enabled_lut = {regs.polygon_offset_point_enable,
|
const std::array enabled_lut = {regs.polygon_offset_point_enable,
|
||||||
regs.polygon_offset_line_enable,
|
regs.polygon_offset_line_enable,
|
||||||
regs.polygon_offset_fill_enable};
|
regs.polygon_offset_fill_enable};
|
||||||
|
|
|
@ -706,9 +706,9 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeclareInternalFlags() {
|
void DeclareInternalFlags() {
|
||||||
constexpr std::array names = {"zero", "sign", "carry", "overflow"};
|
static constexpr std::array names{"zero", "sign", "carry", "overflow"};
|
||||||
|
|
||||||
for (std::size_t flag = 0; flag < INTERNAL_FLAGS_COUNT; ++flag) {
|
for (std::size_t flag = 0; flag < INTERNAL_FLAGS_COUNT; ++flag) {
|
||||||
const auto flag_code = static_cast<InternalFlag>(flag);
|
|
||||||
const Id id = OpVariable(t_prv_bool, spv::StorageClass::Private, v_false);
|
const Id id = OpVariable(t_prv_bool, spv::StorageClass::Private, v_false);
|
||||||
internal_flags[flag] = AddGlobalVariable(Name(id, names[flag]));
|
internal_flags[flag] = AddGlobalVariable(Name(id, names[flag]));
|
||||||
}
|
}
|
||||||
|
@ -2804,7 +2804,6 @@ private:
|
||||||
std::map<GlobalMemoryBase, Id> global_buffers;
|
std::map<GlobalMemoryBase, Id> global_buffers;
|
||||||
std::map<u32, TexelBuffer> uniform_texels;
|
std::map<u32, TexelBuffer> uniform_texels;
|
||||||
std::map<u32, SampledImage> sampled_images;
|
std::map<u32, SampledImage> sampled_images;
|
||||||
std::map<u32, TexelBuffer> storage_texels;
|
|
||||||
std::map<u32, StorageImage> images;
|
std::map<u32, StorageImage> images;
|
||||||
|
|
||||||
std::array<Id, Maxwell::NumRenderTargets> frag_colors{};
|
std::array<Id, Maxwell::NumRenderTargets> frag_colors{};
|
||||||
|
|
|
@ -19,8 +19,6 @@ constexpr auto SNORM = ComponentType::SNORM;
|
||||||
constexpr auto UNORM = ComponentType::UNORM;
|
constexpr auto UNORM = ComponentType::UNORM;
|
||||||
constexpr auto SINT = ComponentType::SINT;
|
constexpr auto SINT = ComponentType::SINT;
|
||||||
constexpr auto UINT = ComponentType::UINT;
|
constexpr auto UINT = ComponentType::UINT;
|
||||||
constexpr auto SNORM_FORCE_FP16 = ComponentType::SNORM_FORCE_FP16;
|
|
||||||
constexpr auto UNORM_FORCE_FP16 = ComponentType::UNORM_FORCE_FP16;
|
|
||||||
constexpr auto FLOAT = ComponentType::FLOAT;
|
constexpr auto FLOAT = ComponentType::FLOAT;
|
||||||
constexpr bool C = false; // Normal color
|
constexpr bool C = false; // Normal color
|
||||||
constexpr bool S = true; // Srgb
|
constexpr bool S = true; // Srgb
|
||||||
|
|
Loading…
Reference in a new issue