diff options
| author | 2021-11-11 18:31:05 -0800 | |
|---|---|---|
| committer | 2022-03-24 18:13:32 -0700 | |
| commit | 05d80fba38eada5ec671980a5cd7276bcf14482a (patch) | |
| tree | f3cc6fdb642eba5ddb93a39049eeeaaf376a097f /src | |
| parent | hle: nvdrv: Rename Fence to NvFence to avoid naming conflicts. (diff) | |
| download | yuzu-05d80fba38eada5ec671980a5cd7276bcf14482a.tar.gz yuzu-05d80fba38eada5ec671980a5cd7276bcf14482a.tar.xz yuzu-05d80fba38eada5ec671980a5cd7276bcf14482a.zip | |
hle: nvflinger: Move BufferTransformFlags to its own header.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvdisp_disp0.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nvflinger/buffer_transform_flags.h | 25 | ||||
| -rw-r--r-- | src/video_core/framebuffer_config.h | 19 |
4 files changed, 29 insertions, 18 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index a7afc675d..c8c3e7f7f 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -537,6 +537,7 @@ add_library(core STATIC | |||
| 537 | hle/service/nvdrv/syncpoint_manager.h | 537 | hle/service/nvdrv/syncpoint_manager.h |
| 538 | hle/service/nvflinger/buffer_queue.cpp | 538 | hle/service/nvflinger/buffer_queue.cpp |
| 539 | hle/service/nvflinger/buffer_queue.h | 539 | hle/service/nvflinger/buffer_queue.h |
| 540 | hle/service/nvflinger/buffer_transform_flags.h | ||
| 540 | hle/service/nvflinger/nvflinger.cpp | 541 | hle/service/nvflinger/nvflinger.cpp |
| 541 | hle/service/nvflinger/nvflinger.h | 542 | hle/service/nvflinger/nvflinger.h |
| 542 | hle/service/nvflinger/pixel_format.h | 543 | hle/service/nvflinger/pixel_format.h |
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h index 53c539ce4..30b5da429 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | #include "common/math_util.h" | 10 | #include "common/math_util.h" |
| 11 | #include "core/hle/service/nvdrv/devices/nvdevice.h" | 11 | #include "core/hle/service/nvdrv/devices/nvdevice.h" |
| 12 | #include "core/hle/service/nvflinger/buffer_queue.h" | 12 | #include "core/hle/service/nvflinger/buffer_transform_flags.h" |
| 13 | #include "core/hle/service/nvflinger/pixel_format.h" | 13 | #include "core/hle/service/nvflinger/pixel_format.h" |
| 14 | 14 | ||
| 15 | namespace Service::Nvidia::Devices { | 15 | namespace Service::Nvidia::Devices { |
diff --git a/src/core/hle/service/nvflinger/buffer_transform_flags.h b/src/core/hle/service/nvflinger/buffer_transform_flags.h new file mode 100644 index 000000000..398c6370b --- /dev/null +++ b/src/core/hle/service/nvflinger/buffer_transform_flags.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
| 2 | // Copyright 2021 yuzu Emulator Project | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "common/common_types.h" | ||
| 7 | |||
| 8 | namespace android { | ||
| 9 | |||
| 10 | enum class BufferTransformFlags : u32 { | ||
| 11 | /// No transform flags are set | ||
| 12 | Unset = 0x00, | ||
| 13 | /// Flip source image horizontally (around the vertical axis) | ||
| 14 | FlipH = 0x01, | ||
| 15 | /// Flip source image vertically (around the horizontal axis) | ||
| 16 | FlipV = 0x02, | ||
| 17 | /// Rotate source image 90 degrees clockwise | ||
| 18 | Rotate90 = 0x04, | ||
| 19 | /// Rotate source image 180 degrees | ||
| 20 | Rotate180 = 0x03, | ||
| 21 | /// Rotate source image 270 degrees clockwise | ||
| 22 | Rotate270 = 0x07, | ||
| 23 | }; | ||
| 24 | |||
| 25 | } // namespace android | ||
diff --git a/src/video_core/framebuffer_config.h b/src/video_core/framebuffer_config.h index 5921d830e..1e75d51ab 100644 --- a/src/video_core/framebuffer_config.h +++ b/src/video_core/framebuffer_config.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | #include "common/math_util.h" | 8 | #include "common/math_util.h" |
| 9 | #include "core/hle/service/nvflinger/buffer_transform_flags.h" | ||
| 9 | #include "core/hle/service/nvflinger/pixel_format.h" | 10 | #include "core/hle/service/nvflinger/pixel_format.h" |
| 10 | 11 | ||
| 11 | namespace Tegra { | 12 | namespace Tegra { |
| @@ -14,29 +15,13 @@ namespace Tegra { | |||
| 14 | * Struct describing framebuffer configuration | 15 | * Struct describing framebuffer configuration |
| 15 | */ | 16 | */ |
| 16 | struct FramebufferConfig { | 17 | struct FramebufferConfig { |
| 17 | enum class TransformFlags : u32 { | ||
| 18 | /// No transform flags are set | ||
| 19 | Unset = 0x00, | ||
| 20 | /// Flip source image horizontally (around the vertical axis) | ||
| 21 | FlipH = 0x01, | ||
| 22 | /// Flip source image vertically (around the horizontal axis) | ||
| 23 | FlipV = 0x02, | ||
| 24 | /// Rotate source image 90 degrees clockwise | ||
| 25 | Rotate90 = 0x04, | ||
| 26 | /// Rotate source image 180 degrees | ||
| 27 | Rotate180 = 0x03, | ||
| 28 | /// Rotate source image 270 degrees clockwise | ||
| 29 | Rotate270 = 0x07, | ||
| 30 | }; | ||
| 31 | |||
| 32 | VAddr address{}; | 18 | VAddr address{}; |
| 33 | u32 offset{}; | 19 | u32 offset{}; |
| 34 | u32 width{}; | 20 | u32 width{}; |
| 35 | u32 height{}; | 21 | u32 height{}; |
| 36 | u32 stride{}; | 22 | u32 stride{}; |
| 37 | |||
| 38 | TransformFlags transform_flags{}; | ||
| 39 | android::PixelFormat pixel_format{}; | 23 | android::PixelFormat pixel_format{}; |
| 24 | android::BufferTransformFlags transform_flags{}; | ||
| 40 | Common::Rectangle<int> crop_rect; | 25 | Common::Rectangle<int> crop_rect; |
| 41 | }; | 26 | }; |
| 42 | 27 | ||