implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.
This commit is contained in:
1 parent
1f5477cf66
commit
b7fcfce6f7
140 files changed
+7649
-3943
No files matched your search
@@ -53,21 +53,28 @@ int main(void) {
|
||||
print("surface_smoke: start\n");
|
||||
|
||||
uint32_t surface = 0;
|
||||
uint32_t s = SysCreateSurface(SURFACE_W, SURFACE_H, SYS_SURFACE_FORMAT_XRGB8888,
|
||||
SYS_SURFACE_FLAG_NONE, &surface);
|
||||
if (s != STATUS_SUCCESS) fail_status("create surface", s);
|
||||
SYS_CREATE_SURFACE_REQUEST req;
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.Size = sizeof(req);
|
||||
req.Width = SURFACE_W;
|
||||
req.Height = SURFACE_H;
|
||||
req.Format = SYS_SURFACE_FORMAT_XRGB8888;
|
||||
req.Flags = SYS_SURFACE_FLAG_NONE;
|
||||
req.HandleOut = &surface;
|
||||
uint32_t s = SysCreateSurface(&req);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status("create surface", s);
|
||||
if (!surface) fail("surface handle is zero");
|
||||
|
||||
void* base = 0;
|
||||
uint32_t pitch = 0;
|
||||
s = SysMapSurface(surface, &base, &pitch);
|
||||
if (s != STATUS_SUCCESS) fail_status("map surface", s);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status("map surface", s);
|
||||
if (!base || pitch < SURFACE_W * sizeof(uint32_t)) fail("invalid mapping");
|
||||
|
||||
SYS_SURFACE_DESC desc;
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
s = SysQuerySurface(surface, &desc);
|
||||
if (s != STATUS_SUCCESS) fail_status("query surface", s);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status("query surface", s);
|
||||
if (desc.Width != SURFACE_W || desc.Height != SURFACE_H) fail("query dimensions mismatch");
|
||||
if (desc.PitchBytes != pitch || desc.Format != SYS_SURFACE_FORMAT_XRGB8888) fail("query metadata mismatch");
|
||||
if (desc.Base != base) fail("query base mismatch");
|
||||
@@ -81,10 +88,10 @@ int main(void) {
|
||||
|
||||
DISPLAY_RECT rect = { 0, 0, (int32_t)SURFACE_W, (int32_t)SURFACE_H };
|
||||
s = SysPresentSurface(surface, &rect, 1);
|
||||
if (s != STATUS_SUCCESS) fail_status("present surface", s);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status("present surface", s);
|
||||
|
||||
s = SysPresentSurface(surface, 0, 0);
|
||||
if (s != STATUS_SUCCESS) fail_status("present full surface", s);
|
||||
if (s != NTLSTATUS_SUCCESS) fail_status("present full surface", s);
|
||||
|
||||
SysCloseHandle(surface);
|
||||
print("surface_smoke: PASS\n");
|
||||
|
||||
Reference in new issue
Block a user