video_core: Resolve more variable shadowing scenarios pt.3
Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
This commit is contained in:
parent
f2f346e110
commit
f95602f152
49 changed files with 303 additions and 290 deletions
|
@ -9,16 +9,16 @@
|
|||
namespace VideoCommon {
|
||||
|
||||
struct CopyParams {
|
||||
constexpr CopyParams(u32 source_x, u32 source_y, u32 source_z, u32 dest_x, u32 dest_y,
|
||||
u32 dest_z, u32 source_level, u32 dest_level, u32 width, u32 height,
|
||||
u32 depth)
|
||||
: source_x{source_x}, source_y{source_y}, source_z{source_z}, dest_x{dest_x},
|
||||
dest_y{dest_y}, dest_z{dest_z}, source_level{source_level},
|
||||
dest_level{dest_level}, width{width}, height{height}, depth{depth} {}
|
||||
constexpr CopyParams(u32 source_x_, u32 source_y_, u32 source_z_, u32 dest_x_, u32 dest_y_,
|
||||
u32 dest_z_, u32 source_level_, u32 dest_level_, u32 width_, u32 height_,
|
||||
u32 depth_)
|
||||
: source_x{source_x_}, source_y{source_y_}, source_z{source_z_}, dest_x{dest_x_},
|
||||
dest_y{dest_y_}, dest_z{dest_z_}, source_level{source_level_},
|
||||
dest_level{dest_level_}, width{width_}, height{height_}, depth{depth_} {}
|
||||
|
||||
constexpr CopyParams(u32 width, u32 height, u32 depth, u32 level)
|
||||
: source_x{}, source_y{}, source_z{}, dest_x{}, dest_y{}, dest_z{}, source_level{level},
|
||||
dest_level{level}, width{width}, height{height}, depth{depth} {}
|
||||
constexpr CopyParams(u32 width_, u32 height_, u32 depth_, u32 level_)
|
||||
: source_x{}, source_y{}, source_z{}, dest_x{}, dest_y{}, dest_z{}, source_level{level_},
|
||||
dest_level{level_}, width{width_}, height{height_}, depth{depth_} {}
|
||||
|
||||
u32 source_x;
|
||||
u32 source_y;
|
||||
|
|
|
@ -24,12 +24,12 @@ constexpr bool C = false; // Normal color
|
|||
constexpr bool S = true; // Srgb
|
||||
|
||||
struct Table {
|
||||
constexpr Table(TextureFormat texture_format, bool is_srgb, ComponentType red_component,
|
||||
ComponentType green_component, ComponentType blue_component,
|
||||
ComponentType alpha_component, PixelFormat pixel_format)
|
||||
: texture_format{texture_format}, pixel_format{pixel_format}, red_component{red_component},
|
||||
green_component{green_component}, blue_component{blue_component},
|
||||
alpha_component{alpha_component}, is_srgb{is_srgb} {}
|
||||
constexpr Table(TextureFormat texture_format_, bool is_srgb_, ComponentType red_component_,
|
||||
ComponentType green_component_, ComponentType blue_component_,
|
||||
ComponentType alpha_component_, PixelFormat pixel_format_)
|
||||
: texture_format{texture_format_}, pixel_format{pixel_format_},
|
||||
red_component{red_component_}, green_component{green_component_},
|
||||
blue_component{blue_component_}, alpha_component{alpha_component_}, is_srgb{is_srgb_} {}
|
||||
|
||||
TextureFormat texture_format;
|
||||
PixelFormat pixel_format;
|
||||
|
|
|
@ -25,11 +25,11 @@ StagingCache::StagingCache() = default;
|
|||
|
||||
StagingCache::~StagingCache() = default;
|
||||
|
||||
SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params,
|
||||
bool is_astc_supported)
|
||||
: params{params}, gpu_addr{gpu_addr}, mipmap_sizes(params.num_levels),
|
||||
SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr_, const SurfaceParams& params_,
|
||||
bool is_astc_supported_)
|
||||
: params{params_}, gpu_addr{gpu_addr_}, mipmap_sizes(params_.num_levels),
|
||||
mipmap_offsets(params.num_levels) {
|
||||
is_converted = IsPixelFormatASTC(params.pixel_format) && !is_astc_supported;
|
||||
is_converted = IsPixelFormatASTC(params.pixel_format) && !is_astc_supported_;
|
||||
host_memory_size = params.GetHostSizeInBytes(is_converted);
|
||||
|
||||
std::size_t offset = 0;
|
||||
|
|
|
@ -148,8 +148,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
explicit SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params,
|
||||
bool is_astc_supported);
|
||||
explicit SurfaceBaseImpl(GPUVAddr gpu_addr_, const SurfaceParams& params_,
|
||||
bool is_astc_supported_);
|
||||
~SurfaceBaseImpl() = default;
|
||||
|
||||
virtual void DecorateSurfaceName() = 0;
|
||||
|
@ -297,9 +297,9 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
explicit SurfaceBase(const GPUVAddr gpu_addr, const SurfaceParams& params,
|
||||
bool is_astc_supported)
|
||||
: SurfaceBaseImpl(gpu_addr, params, is_astc_supported) {}
|
||||
explicit SurfaceBase(const GPUVAddr gpu_addr_, const SurfaceParams& params_,
|
||||
bool is_astc_supported_)
|
||||
: SurfaceBaseImpl{gpu_addr_, params_, is_astc_supported_} {}
|
||||
|
||||
~SurfaceBase() = default;
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
namespace VideoCommon {
|
||||
|
||||
struct ViewParams {
|
||||
constexpr explicit ViewParams(VideoCore::Surface::SurfaceTarget target, u32 base_layer,
|
||||
u32 num_layers, u32 base_level, u32 num_levels)
|
||||
: target{target}, base_layer{base_layer}, num_layers{num_layers}, base_level{base_level},
|
||||
num_levels{num_levels} {}
|
||||
constexpr explicit ViewParams(VideoCore::Surface::SurfaceTarget target_, u32 base_layer_,
|
||||
u32 num_layers_, u32 base_level_, u32 num_levels_)
|
||||
: target{target_}, base_layer{base_layer_}, num_layers{num_layers_},
|
||||
base_level{base_level_}, num_levels{num_levels_} {}
|
||||
|
||||
std::size_t Hash() const;
|
||||
|
||||
|
@ -44,7 +44,7 @@ struct ViewParams {
|
|||
|
||||
class ViewBase {
|
||||
public:
|
||||
constexpr explicit ViewBase(const ViewParams& params) : params{params} {}
|
||||
constexpr explicit ViewBase(const ViewParams& view_params) : params{view_params} {}
|
||||
|
||||
constexpr const ViewParams& GetViewParams() const {
|
||||
return params;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue