mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 17:30:20 +01:00
nvc0: limit max global and alloc size
Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10711>
This commit is contained in:
parent
16b07b342d
commit
f56609a679
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue