diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 9f9cc9e254f..f0e7732e635 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -615,6 +615,7 @@ nvc0_screen_get_compute_param(struct pipe_screen *pscreen, enum pipe_compute_cap param, void *data) { struct nvc0_screen *screen = nvc0_screen(pscreen); + struct nouveau_device *dev = screen->base.device; const uint16_t obj_class = screen->compute->oclass; #define RET(x) do { \ @@ -643,7 +644,7 @@ nvc0_screen_get_compute_param(struct pipe_screen *pscreen, RET((uint64_t []) { 512 }); } case PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE: /* g[] */ - RET((uint64_t []) { 1ULL << 40 }); + RET((uint64_t []) { nouveau_device_get_global_mem_size(dev) }); case PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE: /* s[] */ switch (obj_class) { case GM200_COMPUTE_CLASS: @@ -660,7 +661,7 @@ nvc0_screen_get_compute_param(struct pipe_screen *pscreen, case PIPE_COMPUTE_CAP_SUBGROUP_SIZE: RET((uint32_t []) { 32 }); case PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE: - RET((uint64_t []) { 1ULL << 40 }); + RET((uint64_t []) { nouveau_device_get_global_mem_size(dev) }); case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED: RET((uint32_t []) { NVC0_MAX_IMAGES }); case PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS: