video_core: Allow copy elision to take place where applicable
Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them.
This commit is contained in:
parent
ad0b295125
commit
6adc824d9d
7 changed files with 26 additions and 26 deletions
|
@ -1671,7 +1671,7 @@ std::string ARBDecompiler::HCastFloat(Operation operation) {
|
|||
}
|
||||
|
||||
std::string ARBDecompiler::HUnpack(Operation operation) {
|
||||
const std::string operand = Visit(operation[0]);
|
||||
std::string operand = Visit(operation[0]);
|
||||
switch (std::get<Tegra::Shader::HalfType>(operation.GetMeta())) {
|
||||
case Tegra::Shader::HalfType::H0_H1:
|
||||
return operand;
|
||||
|
@ -2021,7 +2021,7 @@ std::string ARBDecompiler::InvocationId(Operation) {
|
|||
|
||||
std::string ARBDecompiler::YNegate(Operation) {
|
||||
LOG_WARNING(Render_OpenGL, "(STUBBED)");
|
||||
const std::string temporary = AllocTemporary();
|
||||
std::string temporary = AllocTemporary();
|
||||
AddLine("MOV.F {}, 1;", temporary);
|
||||
return temporary;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ std::shared_ptr<Registry> MakeRegistry(const ShaderDiskCacheEntry& entry) {
|
|||
const VideoCore::GuestDriverProfile guest_profile{entry.texture_handler_size};
|
||||
const VideoCommon::Shader::SerializedRegistryInfo info{guest_profile, entry.bound_buffer,
|
||||
entry.graphics_info, entry.compute_info};
|
||||
const auto registry = std::make_shared<Registry>(entry.type, info);
|
||||
auto registry = std::make_shared<Registry>(entry.type, info);
|
||||
for (const auto& [address, value] : entry.keys) {
|
||||
const auto [buffer, offset] = address;
|
||||
registry->InsertKey(buffer, offset, value);
|
||||
|
|
|
@ -1912,7 +1912,7 @@ private:
|
|||
Expression Comparison(Operation operation) {
|
||||
static_assert(!unordered || type == Type::Float);
|
||||
|
||||
const Expression expr = GenerateBinaryInfix(operation, op, Type::Bool, type, type);
|
||||
Expression expr = GenerateBinaryInfix(operation, op, Type::Bool, type, type);
|
||||
|
||||
if constexpr (op.compare("!=") == 0 && type == Type::Float && !unordered) {
|
||||
// GLSL's operator!=(float, float) doesn't seem be ordered. This happens on both AMD's
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue