Skip to content

Commit

Permalink
demos: Fix building multigpu-bench on macOS
Browse files Browse the repository at this point in the history
The macOS SDK has conflicting defines with the `PAGE_SIZE` name.
Seems to affect both x86 and ARM.
  • Loading branch information
quietvoid committed Sep 21, 2023
1 parent 9bed4c8 commit 61c1c58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demos/multigpu-bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ enum {
ASYNC_COMP = 1,

// Buffer configuration
PAGE_SIZE = 4096,
PTR_ALIGN = 4096,
PIXEL_PITCH = DEPTH / 8,
ROW_PITCH = ALIGN2(WIDTH * PIXEL_PITCH, 256),
IMAGE_SIZE = ROW_PITCH * HEIGHT,
BUFFER_SIZE = IMAGE_SIZE + PAGE_SIZE - 1,
BUFFER_SIZE = IMAGE_SIZE + PTR_ALIGN - 1,

// Test configuration
TEST_MS = 1500,
Expand All @@ -45,7 +45,7 @@ enum {

static uint8_t* page_align(uint8_t *data)
{
return (uint8_t *) ALIGN2((uintptr_t) data, PAGE_SIZE);
return (uint8_t *) ALIGN2((uintptr_t) data, PTR_ALIGN);
}

enum mem_owner {
Expand Down

0 comments on commit 61c1c58

Please sign in to comment.