diff options
author | Jose Fonseca <[email protected]> | 2015-06-18 15:47:00 +0100 |
---|---|---|
committer | Jose Fonseca <[email protected]> | 2015-06-19 07:21:06 +0100 |
commit | afeb92220690c8f27cdc56c30e109ca175d51d83 (patch) | |
tree | 3a0b93389b34d796066d2e27cb59cabb8aad62c7 /src/gallium/auxiliary/gallivm/lp_bld_limits.h | |
parent | f734d2556013e9239e91f43b563b5b1d8f03ada4 (diff) |
llvmpipe: Truncate the binned constants to max const buffer size.
Tested with Ilia Mirkin's gzdoom.trace and
"arb_uniform_buffer_object-maxuniformblocksize fsexceed" piglit test
without my earlier fix to fail linkage when UBO exceeds
GL_MAX_UNIFORM_BLOCK_SIZE.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_limits.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_limits.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_limits.h b/src/gallium/auxiliary/gallivm/lp_bld_limits.h index 49064feddef..db503514881 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_limits.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_limits.h @@ -51,8 +51,12 @@ #define LP_MAX_TGSI_PREDS 16 +#define LP_MAX_TGSI_CONSTS 4096 + #define LP_MAX_TGSI_CONST_BUFFERS 16 +#define LP_MAX_TGSI_CONST_BUFFER_SIZE (LP_MAX_TGSI_CONSTS * sizeof(float[4])) + /* * For quick access we cache registers in statically * allocated arrays. Here we define the maximum size @@ -100,7 +104,7 @@ gallivm_get_shader_param(enum pipe_shader_cap param) case PIPE_SHADER_CAP_MAX_OUTPUTS: return 32; case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: - return sizeof(float[4]) * 4096; + return LP_MAX_TGSI_CONST_BUFFER_SIZE; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return PIPE_MAX_CONSTANT_BUFFERS; case PIPE_SHADER_CAP_MAX_TEMPS: |