mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
feat(libSceHmd): return the distortion and reprojection buffer sizes and alignments
This commit is contained in:
1 parent
3fd1cc393b
commit
fa916ae7bc
3 files changed
+22
-12
No files matched your search
@@ -120,8 +120,7 @@ int APS5_VABI sceHmdInternalGetDebugTextMode(void) {
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdDistortionGetWorkMemoryAlign(void) {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
return 0x400;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdInternalRegisterEventCallback(void) {
|
||||
@@ -130,8 +129,7 @@ int APS5_VABI sceHmdInternalRegisterEventCallback(void) {
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdDistortionGetWorkMemorySize(void) {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
return 0x20000;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdReprojectionStartWideNear(void) {
|
||||
@@ -340,8 +338,7 @@ int APS5_VABI sceHmdDistortionGetCorrectionCommand(void) {
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdReprojectionQueryOnionBuffAlign(void) {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
return 0x100;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdInternalGetDebugMode(void) {
|
||||
@@ -450,8 +447,7 @@ int APS5_VABI sceHmdInternalDfuClose(void) {
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdReprojectionQueryGarlicBuffAlign(void) {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
return 0x100;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdInternalSetHmuPowerControl(void) {
|
||||
@@ -680,8 +676,7 @@ int APS5_VABI sceHmdInternalResetLedForVrTracker(void) {
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdReprojectionQueryOnionBuffSize(void) {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
return 0x810;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdReprojectionStartWithOverlay(void) {
|
||||
@@ -855,8 +850,7 @@ int APS5_VABI sceHmdInternalGetPuRevision(void) {
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdReprojectionQueryGarlicBuffSize(void) {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
return 0x100000;
|
||||
}
|
||||
|
||||
int APS5_VABI sceHmdGet2dVrCommand(void) {
|
||||
|
||||
@@ -63,6 +63,12 @@ std::int32_t APS5_VABI sceHmdGetDeviceInformationByHandle(std::int32_t handle,
|
||||
Hmd::DeviceInformation* info);
|
||||
std::int32_t APS5_VABI sceHmdInternalGetDeviceStatus(Hmd::DeviceStatus* status);
|
||||
std::int32_t APS5_VABI sceHmdInternalMmapIsConnect();
|
||||
int APS5_VABI sceHmdDistortionGetWorkMemoryAlign(void);
|
||||
int APS5_VABI sceHmdDistortionGetWorkMemorySize(void);
|
||||
int APS5_VABI sceHmdReprojectionQueryGarlicBuffAlign(void);
|
||||
int APS5_VABI sceHmdReprojectionQueryGarlicBuffSize(void);
|
||||
int APS5_VABI sceHmdReprojectionQueryOnionBuffAlign(void);
|
||||
int APS5_VABI sceHmdReprojectionQueryOnionBuffSize(void);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -22,6 +22,15 @@ void CheckDisconnected() {
|
||||
Require(sceHmdInternalMmapIsConnect() == 0, "connection reported present");
|
||||
}
|
||||
|
||||
void CheckBufferQueries() {
|
||||
Require(sceHmdDistortionGetWorkMemoryAlign() == 0x400, "distortion work memory alignment");
|
||||
Require(sceHmdDistortionGetWorkMemorySize() == 0x20000, "distortion work memory size");
|
||||
Require(sceHmdReprojectionQueryGarlicBuffAlign() == 0x100, "reprojection garlic buffer alignment");
|
||||
Require(sceHmdReprojectionQueryGarlicBuffSize() == 0x100000, "reprojection garlic buffer size");
|
||||
Require(sceHmdReprojectionQueryOnionBuffAlign() == 0x100, "reprojection onion buffer alignment");
|
||||
Require(sceHmdReprojectionQueryOnionBuffSize() == 0x810, "reprojection onion buffer size");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main() {
|
||||
@@ -31,6 +40,7 @@ int main() {
|
||||
const auto untouched = info;
|
||||
|
||||
CheckDisconnected();
|
||||
CheckBufferQueries();
|
||||
Require(sceHmdTerminate() == Hmd::NotInitialized, "terminate before initialize");
|
||||
Require(sceHmdOpen(1, 0, 0, nullptr) == Hmd::NotInitialized, "open before initialize");
|
||||
Require(sceHmdClose(0) == Hmd::NotInitialized, "close before initialize");
|
||||
|
||||
Reference in new issue
Block a user