diff options
author | Kenneth Graunke <[email protected]> | 2017-03-02 23:28:42 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-03-04 22:46:50 -0800 |
commit | 6f71d9adc1209795d523ebcd8007a90619d85104 (patch) | |
tree | 06678a104ba6427b2ac948ee26a6d32473ed6db2 /.gitignore | |
parent | eaf4a106bdcf476078ef4f84c81329034a226650 (diff) |
i965: Clamp texture buffer size to GL_MAX_TEXTURE_BUFFER_SIZE.
The OpenGL 4.5 specification's description of TexBuffer says:
"The number of texels in the texture image is then clamped to an
implementation-dependent limit, the value of MAX_TEXTURE_BUFFER_SIZE."
We set GL_MAX_TEXTURE_BUFFER_SIZE to 2^27. For buffers with a byte
element size, this is the maximum possible size we can encode in
SURFACE_STATE. If you bind a buffer object larger than this as a
texture buffer object, we'll exceed that limit and hit an isl assert:
assert(num_elements <= (1ull << 27));
To fix this, clamp the size in bytes to MaxTextureSize / texel_size.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions