diff options
| author | 2020-07-21 02:09:29 -0400 | |
|---|---|---|
| committer | 2020-07-21 02:26:48 -0400 | |
| commit | c705a1db96e3b26221828ff3bd5da5078144b114 (patch) | |
| tree | e9b9f39704275a359a8536695102a2f531bb8556 | |
| parent | Merge pull request #4306 from ReinUsesLisp/bsd-network (diff) | |
| download | yuzu-c705a1db96e3b26221828ff3bd5da5078144b114.tar.gz yuzu-c705a1db96e3b26221828ff3bd5da5078144b114.tar.xz yuzu-c705a1db96e3b26221828ff3bd5da5078144b114.zip | |
surface_params: Replace questionable usages of the comma operator with semicolons
These are bugs waiting to happen.
| -rw-r--r-- | src/video_core/texture_cache/surface_params.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp index 9e5fe2374..2099af647 100644 --- a/src/video_core/texture_cache/surface_params.cpp +++ b/src/video_core/texture_cache/surface_params.cpp | |||
| @@ -74,9 +74,9 @@ SurfaceParams SurfaceParams::CreateForTexture(const FormatLookupTable& lookup_ta | |||
| 74 | SurfaceParams params; | 74 | SurfaceParams params; |
| 75 | params.is_tiled = tic.IsTiled(); | 75 | params.is_tiled = tic.IsTiled(); |
| 76 | params.srgb_conversion = tic.IsSrgbConversionEnabled(); | 76 | params.srgb_conversion = tic.IsSrgbConversionEnabled(); |
| 77 | params.block_width = params.is_tiled ? tic.BlockWidth() : 0, | 77 | params.block_width = params.is_tiled ? tic.BlockWidth() : 0; |
| 78 | params.block_height = params.is_tiled ? tic.BlockHeight() : 0, | 78 | params.block_height = params.is_tiled ? tic.BlockHeight() : 0; |
| 79 | params.block_depth = params.is_tiled ? tic.BlockDepth() : 0, | 79 | params.block_depth = params.is_tiled ? tic.BlockDepth() : 0; |
| 80 | params.tile_width_spacing = params.is_tiled ? (1 << tic.tile_width_spacing.Value()) : 1; | 80 | params.tile_width_spacing = params.is_tiled ? (1 << tic.tile_width_spacing.Value()) : 1; |
| 81 | params.pixel_format = lookup_table.GetPixelFormat( | 81 | params.pixel_format = lookup_table.GetPixelFormat( |
| 82 | tic.format, params.srgb_conversion, tic.r_type, tic.g_type, tic.b_type, tic.a_type); | 82 | tic.format, params.srgb_conversion, tic.r_type, tic.g_type, tic.b_type, tic.a_type); |
| @@ -130,9 +130,9 @@ SurfaceParams SurfaceParams::CreateForImage(const FormatLookupTable& lookup_tabl | |||
| 130 | SurfaceParams params; | 130 | SurfaceParams params; |
| 131 | params.is_tiled = tic.IsTiled(); | 131 | params.is_tiled = tic.IsTiled(); |
| 132 | params.srgb_conversion = tic.IsSrgbConversionEnabled(); | 132 | params.srgb_conversion = tic.IsSrgbConversionEnabled(); |
| 133 | params.block_width = params.is_tiled ? tic.BlockWidth() : 0, | 133 | params.block_width = params.is_tiled ? tic.BlockWidth() : 0; |
| 134 | params.block_height = params.is_tiled ? tic.BlockHeight() : 0, | 134 | params.block_height = params.is_tiled ? tic.BlockHeight() : 0; |
| 135 | params.block_depth = params.is_tiled ? tic.BlockDepth() : 0, | 135 | params.block_depth = params.is_tiled ? tic.BlockDepth() : 0; |
| 136 | params.tile_width_spacing = params.is_tiled ? (1 << tic.tile_width_spacing.Value()) : 1; | 136 | params.tile_width_spacing = params.is_tiled ? (1 << tic.tile_width_spacing.Value()) : 1; |
| 137 | params.pixel_format = lookup_table.GetPixelFormat( | 137 | params.pixel_format = lookup_table.GetPixelFormat( |
| 138 | tic.format, params.srgb_conversion, tic.r_type, tic.g_type, tic.b_type, tic.a_type); | 138 | tic.format, params.srgb_conversion, tic.r_type, tic.g_type, tic.b_type, tic.a_type); |
| @@ -237,9 +237,9 @@ SurfaceParams SurfaceParams::CreateForFermiCopySurface( | |||
| 237 | params.is_tiled = !config.linear; | 237 | params.is_tiled = !config.linear; |
| 238 | params.srgb_conversion = config.format == Tegra::RenderTargetFormat::B8G8R8A8_SRGB || | 238 | params.srgb_conversion = config.format == Tegra::RenderTargetFormat::B8G8R8A8_SRGB || |
| 239 | config.format == Tegra::RenderTargetFormat::A8B8G8R8_SRGB; | 239 | config.format == Tegra::RenderTargetFormat::A8B8G8R8_SRGB; |
| 240 | params.block_width = params.is_tiled ? std::min(config.BlockWidth(), 5U) : 0, | 240 | params.block_width = params.is_tiled ? std::min(config.BlockWidth(), 5U) : 0; |
| 241 | params.block_height = params.is_tiled ? std::min(config.BlockHeight(), 5U) : 0, | 241 | params.block_height = params.is_tiled ? std::min(config.BlockHeight(), 5U) : 0; |
| 242 | params.block_depth = params.is_tiled ? std::min(config.BlockDepth(), 5U) : 0, | 242 | params.block_depth = params.is_tiled ? std::min(config.BlockDepth(), 5U) : 0; |
| 243 | params.tile_width_spacing = 1; | 243 | params.tile_width_spacing = 1; |
| 244 | params.pixel_format = PixelFormatFromRenderTargetFormat(config.format); | 244 | params.pixel_format = PixelFormatFromRenderTargetFormat(config.format); |
| 245 | params.type = GetFormatType(params.pixel_format); | 245 | params.type = GetFormatType(params.pixel_format); |