diff options
author | Corbin Simpson <[email protected]> | 2010-08-20 00:18:30 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2010-08-20 00:18:30 -0700 |
commit | e0ef4800f5deb81ed57dccf8ba39e01c12f4beff (patch) | |
tree | e076afb42734bfcd236c336bd594004321a95cf6 /src/gallium/drivers/galahad/glhd_context.c | |
parent | cdc1c67b9896cd0d919f736fe61a4396bf0ad5c0 (diff) |
galahad, i915g: Copy over constant buffer index check.
Diffstat (limited to 'src/gallium/drivers/galahad/glhd_context.c')
-rw-r--r-- | src/gallium/drivers/galahad/glhd_context.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c index 10e4679bf1b..383c4489261 100644 --- a/src/gallium/drivers/galahad/glhd_context.c +++ b/src/gallium/drivers/galahad/glhd_context.c @@ -463,6 +463,15 @@ galahad_set_constant_buffer(struct pipe_context *_pipe, glhd_error("Unknown shader type %u", shader); } + if (index && + index >= + pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_CONST_BUFFERS)) { + glhd_error("Access to constant buffer %u requested, " + "but only %d are supported", + index, + pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_CONST_BUFFERS)); + } + /* XXX hmm? unwrap the input state */ if (_resource) { unwrapped_resource = galahad_resource_unwrap(_resource); |