summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2021-03-22 09:59:30 +0100
committerChloe Marcec <dmarcecguzman@gmail.com>2021-03-22 09:59:30 +0100
commit875183e7c5da01960af629d4d52529296242a9a2 (patch)
tree723a68eff563adcdd51c95bf2b43e0d3f7e025e0 /src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
parentMerge pull request #6095 from lat9nq/async-shader-block (diff)
downloadyuzu-875183e7c5da01960af629d4d52529296242a9a2.tar
yuzu-875183e7c5da01960af629d4d52529296242a9a2.tar.gz
yuzu-875183e7c5da01960af629d4d52529296242a9a2.tar.bz2
yuzu-875183e7c5da01960af629d4d52529296242a9a2.tar.lz
yuzu-875183e7c5da01960af629d4d52529296242a9a2.tar.xz
yuzu-875183e7c5da01960af629d4d52529296242a9a2.tar.zst
yuzu-875183e7c5da01960af629d4d52529296242a9a2.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
index 08035fa0e..9ee60e060 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -16,6 +16,9 @@
namespace Service::Nvidia::Devices {
+constexpr u32 DEFAULT_BIG_PAGE_SIZE = 1 << 16;
+constexpr u32 DEFAULT_SMALL_PAGE_SIZE = 1 << 12;
+
class nvmap;
enum class AddressSpaceFlags : u32 {
@@ -76,16 +79,16 @@ private:
bool is_allocated{};
};
- struct IoctlInitalizeEx {
- u32_le big_page_size{}; // depends on GPU's available_big_page_sizes; 0=default
- s32_le as_fd{}; // ignored; passes 0
- u32_le flags{}; // passes 0
- u32_le reserved{}; // ignored; passes 0
- u64_le unk0{};
- u64_le unk1{};
- u64_le unk2{};
+ struct IoctlAllocAsEx {
+ u32_le flags{}; // usually passes 1
+ s32_le as_fd{}; // ignored; passes 0
+ u32_le big_page_size{};
+ u32_le reserved{}; // ignored; passes 0
+ u64_le va_range_start{};
+ u64_le va_range_end{};
+ u64_le va_range_split{};
};
- static_assert(sizeof(IoctlInitalizeEx) == 40, "IoctlInitalizeEx is incorrect size");
+ static_assert(sizeof(IoctlAllocAsEx) == 40, "IoctlAllocAsEx is incorrect size");
struct IoctlAllocSpace {
u32_le pages{};
@@ -149,14 +152,16 @@ private:
u64_le buf_addr{}; // (contained output user ptr on linux, ignored)
u32_le buf_size{}; // forced to 2*sizeof(struct va_region)
u32_le reserved{};
- IoctlVaRegion regions[2]{};
+ IoctlVaRegion small{};
+ IoctlVaRegion big{};
};
static_assert(sizeof(IoctlGetVaRegions) == 16 + sizeof(IoctlVaRegion) * 2,
"IoctlGetVaRegions is incorrect size");
s32 channel{};
+ u32 big_page_size{DEFAULT_BIG_PAGE_SIZE};
- NvResult InitalizeEx(const std::vector<u8>& input, std::vector<u8>& output);
+ NvResult AllocAsEx(const std::vector<u8>& input, std::vector<u8>& output);
NvResult AllocateSpace(const std::vector<u8>& input, std::vector<u8>& output);
NvResult Remap(const std::vector<u8>& input, std::vector<u8>& output);
NvResult MapBufferEx(const std::vector<u8>& input, std::vector<u8>& output);