mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 09:12:46 +01:00
Merge pull request #2461 from lioncash/unused-var
video_core: Remove a few unused variables and functions
This commit is contained in:
commit
dadcf317dc
7 changed files with 4 additions and 22 deletions
|
@ -44,7 +44,7 @@ static void RunThread(VideoCore::RendererBase& renderer, Tegra::DmaPusher& dma_p
|
||||||
renderer.Rasterizer().FlushRegion(data->addr, data->size);
|
renderer.Rasterizer().FlushRegion(data->addr, data->size);
|
||||||
} else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) {
|
} else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) {
|
||||||
renderer.Rasterizer().InvalidateRegion(data->addr, data->size);
|
renderer.Rasterizer().InvalidateRegion(data->addr, data->size);
|
||||||
} else if (const auto data = std::get_if<EndProcessingCommand>(&next.data)) {
|
} else if (std::holds_alternative<EndProcessingCommand>(next.data)) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
|
|
@ -805,7 +805,6 @@ void CachedSurface::UploadGLMipmapTexture(RasterizerTemporaryMemory& res_cache_t
|
||||||
tuple.type, &gl_buffer[mip_map][buffer_offset]);
|
tuple.type, &gl_buffer[mip_map][buffer_offset]);
|
||||||
break;
|
break;
|
||||||
case SurfaceTarget::TextureCubemap: {
|
case SurfaceTarget::TextureCubemap: {
|
||||||
std::size_t start = buffer_offset;
|
|
||||||
for (std::size_t face = 0; face < params.depth; ++face) {
|
for (std::size_t face = 0; face < params.depth; ++face) {
|
||||||
glTextureSubImage3D(texture.handle, mip_map, x0, y0, static_cast<GLint>(face),
|
glTextureSubImage3D(texture.handle, mip_map, x0, y0, static_cast<GLint>(face),
|
||||||
static_cast<GLsizei>(rect.GetWidth()),
|
static_cast<GLsizei>(rect.GetWidth()),
|
||||||
|
|
|
@ -345,7 +345,7 @@ ShaderDiskCacheUsage CachedShader::GetUsage(GLenum primitive_mode,
|
||||||
|
|
||||||
ShaderCacheOpenGL::ShaderCacheOpenGL(RasterizerOpenGL& rasterizer, Core::System& system,
|
ShaderCacheOpenGL::ShaderCacheOpenGL(RasterizerOpenGL& rasterizer, Core::System& system,
|
||||||
const Device& device)
|
const Device& device)
|
||||||
: RasterizerCache{rasterizer}, disk_cache{system}, device{device} {}
|
: RasterizerCache{rasterizer}, device{device}, disk_cache{system} {}
|
||||||
|
|
||||||
void ShaderCacheOpenGL::LoadDiskCache(const std::atomic_bool& stop_loading,
|
void ShaderCacheOpenGL::LoadDiskCache(const std::atomic_bool& stop_loading,
|
||||||
const VideoCore::DiskResourceLoadCallback& callback) {
|
const VideoCore::DiskResourceLoadCallback& callback) {
|
||||||
|
|
|
@ -871,17 +871,6 @@ private:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Composite(Operation operation) {
|
|
||||||
std::string value = "vec4(";
|
|
||||||
for (std::size_t i = 0; i < 4; ++i) {
|
|
||||||
value += Visit(operation[i]);
|
|
||||||
if (i < 3)
|
|
||||||
value += ", ";
|
|
||||||
}
|
|
||||||
value += ')';
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <Type type>
|
template <Type type>
|
||||||
std::string Add(Operation operation) {
|
std::string Add(Operation operation) {
|
||||||
return GenerateBinaryInfix(operation, "+", type, type, type);
|
return GenerateBinaryInfix(operation, "+", type, type, type);
|
||||||
|
|
|
@ -315,7 +315,6 @@ private:
|
||||||
constexpr std::array<const char*, INTERNAL_FLAGS_COUNT> names = {"zero", "sign", "carry",
|
constexpr std::array<const char*, INTERNAL_FLAGS_COUNT> names = {"zero", "sign", "carry",
|
||||||
"overflow"};
|
"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]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -540,7 +540,6 @@ Node4 ShaderIR::GetTexsCode(Instruction instr, TextureType texture_type,
|
||||||
Node4 ShaderIR::GetTld4Code(Instruction instr, TextureType texture_type, bool depth_compare,
|
Node4 ShaderIR::GetTld4Code(Instruction instr, TextureType texture_type, bool depth_compare,
|
||||||
bool is_array, bool is_aoffi) {
|
bool is_array, bool is_aoffi) {
|
||||||
const std::size_t coord_count = GetCoordCount(texture_type);
|
const std::size_t coord_count = GetCoordCount(texture_type);
|
||||||
const std::size_t total_coord_count = coord_count + (is_array ? 1 : 0);
|
|
||||||
|
|
||||||
// If enabled arrays index is always stored in the gpr8 field
|
// If enabled arrays index is always stored in the gpr8 field
|
||||||
const u64 array_register = instr.gpr8.Value();
|
const u64 array_register = instr.gpr8.Value();
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
|
|
||||||
class InputBitStream {
|
class InputBitStream {
|
||||||
public:
|
public:
|
||||||
explicit InputBitStream(const unsigned char* ptr, int nBits = 0, int start_offset = 0)
|
explicit InputBitStream(const unsigned char* ptr, int start_offset = 0)
|
||||||
: m_NumBits(nBits), m_CurByte(ptr), m_NextBit(start_offset % 8) {}
|
: m_CurByte(ptr), m_NextBit(start_offset % 8) {}
|
||||||
|
|
||||||
~InputBitStream() = default;
|
~InputBitStream() = default;
|
||||||
|
|
||||||
|
@ -55,12 +55,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const int m_NumBits;
|
|
||||||
const unsigned char* m_CurByte;
|
const unsigned char* m_CurByte;
|
||||||
int m_NextBit = 0;
|
int m_NextBit = 0;
|
||||||
int m_BitsRead = 0;
|
int m_BitsRead = 0;
|
||||||
|
|
||||||
bool done = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutputBitStream {
|
class OutputBitStream {
|
||||||
|
@ -114,7 +111,6 @@ private:
|
||||||
const int m_NumBits;
|
const int m_NumBits;
|
||||||
unsigned char* m_CurByte;
|
unsigned char* m_CurByte;
|
||||||
int m_NextBit = 0;
|
int m_NextBit = 0;
|
||||||
int m_BitsRead = 0;
|
|
||||||
|
|
||||||
bool done = false;
|
bool done = false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue