diff options
author | Christian Gmeiner <[email protected]> | 2019-08-14 11:56:02 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2019-08-14 12:29:56 +0200 |
commit | b2da8a8357fc3f8cc01e020a8d7db49d90677dac (patch) | |
tree | a37500aacd9f9074472b3b7151f01aeabd96a992 /src/gallium | |
parent | 797a2e4fd0306b214e366a75caf2d54f17601393 (diff) |
etnaviv: correct PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE handling
Have a correct answer to GL_MAX_FRAGMENT_UNIFORM_VECTORS and
GL_MAX_VERTEX_UNIFORM_VECTORS.
Signed-off-by: Christian Gmeiner <[email protected]>
Reviewed-by: Lucas Stach [email protected]
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index e392f575e71..3c28a9f1101 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -331,7 +331,9 @@ etna_screen_get_shader_param(struct pipe_screen *pscreen, case PIPE_SHADER_CAP_PREFERRED_IR: return DBG_ENABLED(ETNA_DBG_NIR) ? PIPE_SHADER_IR_NIR : PIPE_SHADER_IR_TGSI; case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: - return 4096; + return shader == PIPE_SHADER_FRAGMENT + ? screen->specs.max_ps_uniforms * sizeof(float[4]) + : screen->specs.max_vs_uniforms * sizeof(float[4]); case PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED: case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED: case PIPE_SHADER_CAP_TGSI_LDEXP_SUPPORTED: |