-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to list of supported games is outdated. #5
Comments
would be nice to start offering eventually a list of which of this Mantle games work with GRVK.. |
At time I can say that the following crash with the same error
EDIT:
|
thanks for sharing current status.. |
No games are expected to work at this moment. I'm working towards getting Star Swarm to run first, but it could take months. |
(off topic) FWIW you can stop Star Swarm from crashing by returning 0 displays in With this dirty hack it stops crashing on my system. It doesn't render anything (obvious). diff --git a/src/mantle/mantle_memory_man.c b/src/mantle/mantle_memory_man.c
index 744d575..1d0d056 100644
--- a/src/mantle/mantle_memory_man.c
+++ b/src/mantle/mantle_memory_man.c
@@ -34,7 +34,7 @@ GR_RESULT grGetMemoryHeapInfo(
LOGT("%p %u 0x%X %p %p\n", device, heapId, infoType, pDataSize, pData);
GrDevice* grDevice = (GrDevice*)device;
- if (grDevice == NULL) {
+ if (grDevice == NULL || grDevice == (GrDevice *)0x0000000001182b60) {
return GR_ERROR_INVALID_HANDLE;
} else if (grDevice->sType != GR_STRUCT_TYPE_DEVICE) {
return GR_ERROR_INVALID_OBJECT_TYPE;
diff --git a/src/mantle/mantle_wsi.c b/src/mantle/mantle_wsi.c
index c43fa23..eb7b2b3 100644
--- a/src/mantle/mantle_wsi.c
+++ b/src/mantle/mantle_wsi.c
@@ -484,3 +484,59 @@ fail_present:
}
return GR_ERROR_UNKNOWN;
}
+
+GR_RESULT grWsiWinGetDisplays(
+ GR_DEVICE device,
+ GR_UINT *pDisplayCount,
+ GR_WSI_WIN_DISPLAY *pDisplayList)
+{
+ LOGT("%p %p %p\n", device, pDisplayCount, pDisplayList);
+
+ GrDevice *grDevice = (GrDevice *)device;
+ VkResult vkRes;
+
+ if (grDevice == NULL)
+ return GR_ERROR_INVALID_HANDLE;
+ if (grDevice->sType != GR_STRUCT_TYPE_DEVICE)
+ return GR_ERROR_INVALID_OBJECT_TYPE;
+ if (pDisplayCount == NULL)
+ return GR_ERROR_INVALID_POINTER;
+ if (*pDisplayCount != 0 && !pDisplayList)
+ return GR_ERROR_INVALID_MEMORY_SIZE;
+
+ // uint32_t pPropertyCount;
+ // vkRes = vki.vkGetPhysicalDeviceDisplayPropertiesKHR(grDevice->physicalDevice, &pPropertyCount, NULL);
+ // if (vkRes != VK_SUCCESS)
+ // return GR_ERROR_INVALID_HANDLE;
+ // // LOGW("got %d / %d displays\n", pPropertyCount, *pDisplayCount);
+
+ // VkDisplayPropertiesKHR *pProperties = malloc(sizeof(VkDisplayPropertiesKHR) * pPropertyCount);
+ // vkRes = vki.vkGetPhysicalDeviceDisplayPropertiesKHR(grDevice->physicalDevice, &pPropertyCount, pProperties);
+ // if (vkRes != VK_SUCCESS)
+ // return GR_ERROR_INVALID_HANDLE;
+
+ // for (int i = 0; i < *pDisplayCount; i++)
+ // {
+ // LOGW(" - %s\n", pProperties[i].displayName);
+ // }
+
+ // VkDisplayPropertiesKHR *pProperties = malloc(sizeof(VkDisplayPropertiesKHR));
+ // memset(pProperties, 0xdeadbeef, sizeof(VkDisplayPropertiesKHR));
+ // pProperties->displayName = malloc(5);
+ // memcpy(pProperties->displayName, "fake\0", 5);
+ // pProperties->physicalDimensions.height = 100;
+ // pProperties->physicalDimensions.width = 100;
+ // pProperties->physicalResolution.width = 1920;
+ // pProperties->physicalResolution.height = 1080;
+
+ // LOGW("%p\n", pProperties);
+
+ // *pDisplayCount = 1;
+ // pDisplayList[0] = (GR_WSI_WIN_DISPLAY *)pProperties;
+
+ *pDisplayCount = 0;
+ pDisplayList[0] = 0;
+ return GR_SUCCESS;
+
+ // return GR_UNSUPPORTED;
+}
\ No newline at end of file
diff --git a/src/mantle/stub.c b/src/mantle/stub.c
index fdf4e25..eb66f73 100644
--- a/src/mantle/stub.c
+++ b/src/mantle/stub.c
@@ -340,14 +340,14 @@ GR_VOID GR_STDCALL grCmdDbgMarkerEnd(
// WSI Functions
-GR_RESULT grWsiWinGetDisplays(
- GR_DEVICE device,
- GR_UINT* pDisplayCount,
- GR_WSI_WIN_DISPLAY* pDisplayList)
-{
- LOGW("STUB\n");
- return GR_UNSUPPORTED;
-}
+// GR_RESULT grWsiWinGetDisplays(
+// GR_DEVICE device,
+// GR_UINT* pDisplayCount,
+// GR_WSI_WIN_DISPLAY* pDisplayList)
+// {
+// LOGW("STUB\n");
+// return GR_UNSUPPORTED;
+// }
GR_RESULT grWsiWinGetDisplayModeList(
GR_WSI_WIN_DISPLAY display, |
The link ("a few games")
https://en.wikipedia.org/wiki/Category:Video_games_that_support_Mantle
in the readme does not exist anymore and has been changed to
https://en.wikipedia.org/wiki/Category:Video_games_that_support_Mantle_(API)
The text was updated successfully, but these errors were encountered: