diff options
author | Jan Vesely <[email protected]> | 2016-08-28 04:06:28 -0400 |
---|---|---|
committer | Jan Vesely <[email protected]> | 2016-08-29 14:40:15 -0400 |
commit | c7af84968d4ee0f67c46c347c6fb83d6fbc83ef3 (patch) | |
tree | c133273252958287b35627bb115012382e257b7e /src/gallium/drivers | |
parent | f5602c27ec681f1f66cdb8d79378991b79ce45e7 (diff) |
gallium: add cap to export device pointer size
v2: document the new cap
v3: fix 80 char limit in screen.rst
Signed-off-by: Jan Vesely <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Acked-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_screen.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 1 |
5 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c index 050c03b66cc..b9e5ad6184f 100644 --- a/src/gallium/drivers/ilo/ilo_screen.c +++ b/src/gallium/drivers/ilo/ilo_screen.c @@ -199,6 +199,7 @@ ilo_get_compute_param(struct pipe_screen *screen, uint32_t max_compute_units; uint32_t images_supported; uint32_t subgroup_size; + uint32_t address_bits; } val; const void *ptr; int size; @@ -266,6 +267,11 @@ ilo_get_compute_param(struct pipe_screen *screen, ptr = &val.max_input_size; size = sizeof(val.max_input_size); break; + case PIPE_COMPUTE_CAP_ADDRESS_BITS: + val.address_bits = 32; + ptr = &val.address_bits; + size = sizeof(val.address_bits); + break; case PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE: val.max_mem_alloc_size = 1u << 31; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index d878547c9a5..57c0c2bca8b 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -418,6 +418,8 @@ nv50_screen_get_compute_param(struct pipe_screen *pscreen, RET((uint32_t []) { screen->mp_count }); case PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY: RET((uint32_t []) { 512 }); /* FIXME: arbitrary limit */ + case PIPE_COMPUTE_CAP_ADDRESS_BITS: + RET((uint32_t []) { 32 }); default: return 0; } diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index f139f66f365..e7bfbbedbb1 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -479,6 +479,8 @@ nvc0_screen_get_compute_param(struct pipe_screen *pscreen, RET((uint32_t []) { screen->mp_count_compute }); case PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY: RET((uint32_t []) { 512 }); /* FIXME: arbitrary limit */ + case PIPE_COMPUTE_CAP_ADDRESS_BITS: + RET((uint32_t []) { 64 }); default: return 0; } diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index b1da22f0fd5..1b15594bbd2 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -881,6 +881,14 @@ static int r600_get_compute_param(struct pipe_screen *screen, *max_threads_per_block = 256; } return sizeof(uint64_t); + case PIPE_COMPUTE_CAP_ADDRESS_BITS: + if (ret) { + uint32_t *address_bits = ret; + address_bits[0] = 32; + if (rscreen->chip_class >= SI) + address_bits[0] = 64; + } + return 1 * sizeof(uint32_t); case PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE: if (ret) { diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index b742bdecbc9..cd4269f9929 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -521,6 +521,7 @@ softpipe_get_compute_param(struct pipe_screen *_screen, case PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS: case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED: case PIPE_COMPUTE_CAP_SUBGROUP_SIZE: + case PIPE_COMPUTE_CAP_ADDRESS_BITS: break; } return 0; |