From 3d471e732d688c20aef73a506bdb6126002d3193 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 7 May 2019 10:56:45 -0400 Subject: Correct Surface Base and Views for new Texture Cache --- src/video_core/texture_cache/copy_params.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/video_core/texture_cache/copy_params.h (limited to 'src/video_core/texture_cache/copy_params.h') diff --git a/src/video_core/texture_cache/copy_params.h b/src/video_core/texture_cache/copy_params.h new file mode 100644 index 000000000..75c2b1f05 --- /dev/null +++ b/src/video_core/texture_cache/copy_params.h @@ -0,0 +1,25 @@ +// Copyright 2019 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "common/common_types.h" + +namespace VideoCommon { + +struct 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; +}; + +} // namespace VideoCommon -- cgit v1.2.3 From 03d10ea3b420c923c14a11c86b47e2f00bc30e00 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 7 May 2019 21:28:31 -0300 Subject: copy_params: Use constructor instead of C-like initialization --- src/video_core/texture_cache/copy_params.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/video_core/texture_cache/copy_params.h') diff --git a/src/video_core/texture_cache/copy_params.h b/src/video_core/texture_cache/copy_params.h index 75c2b1f05..8cf010142 100644 --- a/src/video_core/texture_cache/copy_params.h +++ b/src/video_core/texture_cache/copy_params.h @@ -9,6 +9,16 @@ namespace VideoCommon { struct CopyParams { + 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} {} + + 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; u32 source_z; -- cgit v1.2.3 From fb234560b060e528d66a77815330766e5aa88594 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 25 Jun 2019 17:42:50 -0400 Subject: copy_params: use constexpr for constructor --- src/video_core/texture_cache/copy_params.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/video_core/texture_cache/copy_params.h') diff --git a/src/video_core/texture_cache/copy_params.h b/src/video_core/texture_cache/copy_params.h index 8cf010142..9c21a0649 100644 --- a/src/video_core/texture_cache/copy_params.h +++ b/src/video_core/texture_cache/copy_params.h @@ -9,13 +9,14 @@ namespace VideoCommon { struct CopyParams { - 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) + 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} {} - CopyParams(u32 width, u32 height, u32 depth, u32 level) + 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} {} -- cgit v1.2.3