diff options
author | Marek Olšák <[email protected]> | 2013-05-02 03:24:33 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-05-11 23:45:01 +0200 |
commit | 52cb395bb16e73ba7ee69d6d5fbddcd83219eb3b (patch) | |
tree | fd54f8b44544c18315d39838cbcc24beb59501af /src/mesa/state_tracker | |
parent | b6d3373442503d95fbba4d376dd721f5b7a8ea61 (diff) |
gallium: add PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE for GL
v2: fix typo 65535 -> 65536
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 0aac086cf43..43fba0105e9 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -39,7 +39,7 @@ #include "st_extensions.h" #include "st_format.h" -static int _min(int a, int b) +static unsigned _min(unsigned a, unsigned b) { return (a < b) ? a : b; } @@ -744,6 +744,9 @@ void st_init_extensions(struct st_context *st) if (screen->get_param(screen, PIPE_CAP_TEXTURE_BUFFER_OBJECTS)) { ctx->Extensions.ARB_texture_buffer_object = GL_TRUE; + ctx->Const.MaxTextureBufferSize = + _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE), + (1u << 31) - 1); ctx->Const.TextureBufferOffsetAlignment = screen->get_param(screen, PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT); |