diff options
author | Tom Stellard <[email protected]> | 2014-08-07 15:31:17 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2014-08-13 14:11:44 -0400 |
commit | 72969e0efb7a5a011629c1001e81aa2329ede6b1 (patch) | |
tree | c4bcfab1f54a81ea0a6e7ce2e91c9793d6e502e5 | |
parent | 77ea58ca81eb3f5521d67c4459d3469df6d5ffd8 (diff) |
radeon/compute: Report a value for PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE
CC: "10.2" <[email protected]>
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index f0a71c3027d..20d9f950e4c 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -418,7 +418,16 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e case PIPE_SHADER_CAP_MAX_TEMPS: return 256; /* Max native temporaries. */ case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: - return R600_MAX_CONST_BUFFER_SIZE; + if (shader == PIPE_SHADER_COMPUTE) { + uint64_t max_const_buffer_size; + pscreen->get_compute_param(pscreen, + PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE, + &max_const_buffer_size); + return max_const_buffer_size; + + } else { + return R600_MAX_CONST_BUFFER_SIZE; + } case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return R600_MAX_USER_CONST_BUFFERS; case PIPE_SHADER_CAP_MAX_PREDS: diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 592069746d9..879387f0fba 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -328,6 +328,13 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu case PIPE_SHADER_CAP_DOUBLES: return 0; /* XXX: Enable doubles once the compiler can handle them. */ + case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: { + uint64_t max_const_buffer_size; + pscreen->get_compute_param(pscreen, + PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE, + &max_const_buffer_size); + return max_const_buffer_size; + } default: return 0; } |