diff options
| author | 2020-12-07 00:06:53 -0500 | |
|---|---|---|
| committer | 2020-12-07 00:06:53 -0500 | |
| commit | 69af6ada2f3fa7657964c6f6a95fbe24f9c1aa41 (patch) | |
| tree | 9cc837fa8d085c5c483fd84239925870e44ba478 /src/video_core/texture_cache | |
| parent | Merge pull request #5155 from comex/xx-default (diff) | |
| parent | video_core: Resolve more variable shadowing scenarios pt.3 (diff) | |
| download | yuzu-69af6ada2f3fa7657964c6f6a95fbe24f9c1aa41.tar.gz yuzu-69af6ada2f3fa7657964c6f6a95fbe24f9c1aa41.tar.xz yuzu-69af6ada2f3fa7657964c6f6a95fbe24f9c1aa41.zip | |
Merge pull request #5136 from lioncash/video-shadow3
video_core: Resolve more variable shadowing scenarios pt.3
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/copy_params.h | 18 | ||||
| -rw-r--r-- | src/video_core/texture_cache/format_lookup_table.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/texture_cache/surface_base.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/texture_cache/surface_base.h | 10 | ||||
| -rw-r--r-- | src/video_core/texture_cache/surface_view.h | 10 |
5 files changed, 29 insertions, 29 deletions
diff --git a/src/video_core/texture_cache/copy_params.h b/src/video_core/texture_cache/copy_params.h index 9c21a0649..5b475fe06 100644 --- a/src/video_core/texture_cache/copy_params.h +++ b/src/video_core/texture_cache/copy_params.h | |||
| @@ -9,16 +9,16 @@ | |||
| 9 | namespace VideoCommon { | 9 | namespace VideoCommon { |
| 10 | 10 | ||
| 11 | struct CopyParams { | 11 | struct CopyParams { |
| 12 | constexpr CopyParams(u32 source_x, u32 source_y, u32 source_z, u32 dest_x, u32 dest_y, | 12 | constexpr CopyParams(u32 source_x_, u32 source_y_, u32 source_z_, u32 dest_x_, u32 dest_y_, |
| 13 | u32 dest_z, u32 source_level, u32 dest_level, u32 width, u32 height, | 13 | u32 dest_z_, u32 source_level_, u32 dest_level_, u32 width_, u32 height_, |
| 14 | u32 depth) | 14 | u32 depth_) |
| 15 | : source_x{source_x}, source_y{source_y}, source_z{source_z}, dest_x{dest_x}, | 15 | : source_x{source_x_}, source_y{source_y_}, source_z{source_z_}, dest_x{dest_x_}, |
| 16 | dest_y{dest_y}, dest_z{dest_z}, source_level{source_level}, | 16 | dest_y{dest_y_}, dest_z{dest_z_}, source_level{source_level_}, |
| 17 | dest_level{dest_level}, width{width}, height{height}, depth{depth} {} | 17 | dest_level{dest_level_}, width{width_}, height{height_}, depth{depth_} {} |
| 18 | 18 | ||
| 19 | constexpr CopyParams(u32 width, u32 height, u32 depth, u32 level) | 19 | constexpr CopyParams(u32 width_, u32 height_, u32 depth_, u32 level_) |
| 20 | : source_x{}, source_y{}, source_z{}, dest_x{}, dest_y{}, dest_z{}, source_level{level}, | 20 | : source_x{}, source_y{}, source_z{}, dest_x{}, dest_y{}, dest_z{}, source_level{level_}, |
| 21 | dest_level{level}, width{width}, height{height}, depth{depth} {} | 21 | dest_level{level_}, width{width_}, height{height_}, depth{depth_} {} |
| 22 | 22 | ||
| 23 | u32 source_x; | 23 | u32 source_x; |
| 24 | u32 source_y; | 24 | u32 source_y; |
diff --git a/src/video_core/texture_cache/format_lookup_table.cpp b/src/video_core/texture_cache/format_lookup_table.cpp index 7d5a75648..7938d71eb 100644 --- a/src/video_core/texture_cache/format_lookup_table.cpp +++ b/src/video_core/texture_cache/format_lookup_table.cpp | |||
| @@ -24,12 +24,12 @@ constexpr bool C = false; // Normal color | |||
| 24 | constexpr bool S = true; // Srgb | 24 | constexpr bool S = true; // Srgb |
| 25 | 25 | ||
| 26 | struct Table { | 26 | struct Table { |
| 27 | constexpr Table(TextureFormat texture_format, bool is_srgb, ComponentType red_component, | 27 | constexpr Table(TextureFormat texture_format_, bool is_srgb_, ComponentType red_component_, |
| 28 | ComponentType green_component, ComponentType blue_component, | 28 | ComponentType green_component_, ComponentType blue_component_, |
| 29 | ComponentType alpha_component, PixelFormat pixel_format) | 29 | ComponentType alpha_component_, PixelFormat pixel_format_) |
| 30 | : texture_format{texture_format}, pixel_format{pixel_format}, red_component{red_component}, | 30 | : texture_format{texture_format_}, pixel_format{pixel_format_}, |
| 31 | green_component{green_component}, blue_component{blue_component}, | 31 | red_component{red_component_}, green_component{green_component_}, |
| 32 | alpha_component{alpha_component}, is_srgb{is_srgb} {} | 32 | blue_component{blue_component_}, alpha_component{alpha_component_}, is_srgb{is_srgb_} {} |
| 33 | 33 | ||
| 34 | TextureFormat texture_format; | 34 | TextureFormat texture_format; |
| 35 | PixelFormat pixel_format; | 35 | PixelFormat pixel_format; |
diff --git a/src/video_core/texture_cache/surface_base.cpp b/src/video_core/texture_cache/surface_base.cpp index 42a1c0c6f..efbcf6723 100644 --- a/src/video_core/texture_cache/surface_base.cpp +++ b/src/video_core/texture_cache/surface_base.cpp | |||
| @@ -25,11 +25,11 @@ StagingCache::StagingCache() = default; | |||
| 25 | 25 | ||
| 26 | StagingCache::~StagingCache() = default; | 26 | StagingCache::~StagingCache() = default; |
| 27 | 27 | ||
| 28 | SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params, | 28 | SurfaceBaseImpl::SurfaceBaseImpl(GPUVAddr gpu_addr_, const SurfaceParams& params_, |
| 29 | bool is_astc_supported) | 29 | bool is_astc_supported_) |
| 30 | : params{params}, gpu_addr{gpu_addr}, mipmap_sizes(params.num_levels), | 30 | : params{params_}, gpu_addr{gpu_addr_}, mipmap_sizes(params_.num_levels), |
| 31 | mipmap_offsets(params.num_levels) { | 31 | mipmap_offsets(params.num_levels) { |
| 32 | is_converted = IsPixelFormatASTC(params.pixel_format) && !is_astc_supported; | 32 | is_converted = IsPixelFormatASTC(params.pixel_format) && !is_astc_supported_; |
| 33 | host_memory_size = params.GetHostSizeInBytes(is_converted); | 33 | host_memory_size = params.GetHostSizeInBytes(is_converted); |
| 34 | 34 | ||
| 35 | std::size_t offset = 0; | 35 | std::size_t offset = 0; |
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h index cfcfa5b3a..b57135fe4 100644 --- a/src/video_core/texture_cache/surface_base.h +++ b/src/video_core/texture_cache/surface_base.h | |||
| @@ -148,8 +148,8 @@ public: | |||
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | protected: | 150 | protected: |
| 151 | explicit SurfaceBaseImpl(GPUVAddr gpu_addr, const SurfaceParams& params, | 151 | explicit SurfaceBaseImpl(GPUVAddr gpu_addr_, const SurfaceParams& params_, |
| 152 | bool is_astc_supported); | 152 | bool is_astc_supported_); |
| 153 | ~SurfaceBaseImpl() = default; | 153 | ~SurfaceBaseImpl() = default; |
| 154 | 154 | ||
| 155 | virtual void DecorateSurfaceName() = 0; | 155 | virtual void DecorateSurfaceName() = 0; |
| @@ -297,9 +297,9 @@ public: | |||
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | protected: | 299 | protected: |
| 300 | explicit SurfaceBase(const GPUVAddr gpu_addr, const SurfaceParams& params, | 300 | explicit SurfaceBase(const GPUVAddr gpu_addr_, const SurfaceParams& params_, |
| 301 | bool is_astc_supported) | 301 | bool is_astc_supported_) |
| 302 | : SurfaceBaseImpl(gpu_addr, params, is_astc_supported) {} | 302 | : SurfaceBaseImpl{gpu_addr_, params_, is_astc_supported_} {} |
| 303 | 303 | ||
| 304 | ~SurfaceBase() = default; | 304 | ~SurfaceBase() = default; |
| 305 | 305 | ||
diff --git a/src/video_core/texture_cache/surface_view.h b/src/video_core/texture_cache/surface_view.h index 90a8bb0ae..199f72732 100644 --- a/src/video_core/texture_cache/surface_view.h +++ b/src/video_core/texture_cache/surface_view.h | |||
| @@ -13,10 +13,10 @@ | |||
| 13 | namespace VideoCommon { | 13 | namespace VideoCommon { |
| 14 | 14 | ||
| 15 | struct ViewParams { | 15 | struct ViewParams { |
| 16 | constexpr explicit ViewParams(VideoCore::Surface::SurfaceTarget target, u32 base_layer, | 16 | constexpr explicit ViewParams(VideoCore::Surface::SurfaceTarget target_, u32 base_layer_, |
| 17 | u32 num_layers, u32 base_level, u32 num_levels) | 17 | u32 num_layers_, u32 base_level_, u32 num_levels_) |
| 18 | : target{target}, base_layer{base_layer}, num_layers{num_layers}, base_level{base_level}, | 18 | : target{target_}, base_layer{base_layer_}, num_layers{num_layers_}, |
| 19 | num_levels{num_levels} {} | 19 | base_level{base_level_}, num_levels{num_levels_} {} |
| 20 | 20 | ||
| 21 | std::size_t Hash() const; | 21 | std::size_t Hash() const; |
| 22 | 22 | ||
| @@ -44,7 +44,7 @@ struct ViewParams { | |||
| 44 | 44 | ||
| 45 | class ViewBase { | 45 | class ViewBase { |
| 46 | public: | 46 | public: |
| 47 | constexpr explicit ViewBase(const ViewParams& params) : params{params} {} | 47 | constexpr explicit ViewBase(const ViewParams& view_params) : params{view_params} {} |
| 48 | 48 | ||
| 49 | constexpr const ViewParams& GetViewParams() const { | 49 | constexpr const ViewParams& GetViewParams() const { |
| 50 | return params; | 50 | return params; |