On 11.09.2016 20:45, Samuel Pitoiset wrote:
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> --- src/gallium/docs/source/screen.rst | 4 ++++ src/gallium/drivers/ilo/ilo_screen.c | 2 ++ src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 ++ src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 ++ src/gallium/drivers/radeon/r600_pipe_common.c | 1 + src/gallium/drivers/softpipe/sp_screen.c | 1 + src/gallium/include/pipe/p_defines.h | 3 ++- 7 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 5dff650..cfc0a1b 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -498,6 +498,10 @@ pipe_screen::get_compute_param. threads. Also known as wavefront size, warp size or SIMD width. * ``PIPE_COMPUTE_CAP_ADDRESS_BITS``: The default compute device address space size specified as an unsigned integer value in bits. +* ``PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK``: Maximum variable number + of threads that a single block can contain. This is similar to + PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK, except that the variable size is not + known a compile-time but at dispatch-time. .. _pipe_bind: diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c index b9e5ad6..85357fa 100644 --- a/src/gallium/drivers/ilo/ilo_screen.c +++ b/src/gallium/drivers/ilo/ilo_screen.c @@ -303,6 +303,8 @@ ilo_get_compute_param(struct pipe_screen *screen, ptr = &val.subgroup_size; size = sizeof(val.subgroup_size); break; + case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK: + /* fallthrough */ default: ptr = NULL; size = 0; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 1ec791d..6eb18ea 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 []) { 512 }); /* FIXME: arbitrary limit */ case PIPE_COMPUTE_CAP_ADDRESS_BITS: RET((uint32_t []) { 32 }); + case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK: + RET((uint64_t []) { 0 }); default: return 0; } diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 1757cbb..df6c6af 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -478,6 +478,8 @@ nvc0_screen_get_compute_param(struct pipe_screen *pscreen, RET((uint32_t []) { 512 }); /* FIXME: arbitrary limit */ case PIPE_COMPUTE_CAP_ADDRESS_BITS: RET((uint32_t []) { 64 }); + case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK: + RET((uint64_t []) { 0 }); default: return 0; } diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 6d7cc1b..a7c6729 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -955,6 +955,7 @@ static int r600_get_compute_param(struct pipe_screen *screen, } return sizeof(uint32_t); case PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE: + case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK: break; /* unused */
Add a separate case statement and return 0; instead, because the break falls through to a fprintf(stderr, ...) statement.
Cheers, Nicolai
case PIPE_COMPUTE_CAP_SUBGROUP_SIZE: if (ret) { diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index cd4269f..29e898b 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -522,6 +522,7 @@ softpipe_get_compute_param(struct pipe_screen *_screen, case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED: case PIPE_COMPUTE_CAP_SUBGROUP_SIZE: case PIPE_COMPUTE_CAP_ADDRESS_BITS: + case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK; break; } return 0; diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 88aa050..655995e 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -847,7 +847,8 @@ enum pipe_compute_cap PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY, PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS, PIPE_COMPUTE_CAP_IMAGES_SUPPORTED, - PIPE_COMPUTE_CAP_SUBGROUP_SIZE + PIPE_COMPUTE_CAP_SUBGROUP_SIZE, + PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK, }; /**
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev