summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/p_context.i
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-08-11 14:31:04 +0100
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-08-12 11:34:40 +0100
commitae0c9b56d4bec52f9accabbcaf8d42ef41a0153c (patch)
treea42c2e9a4d171e8cd3329781262829f7f8323023 /src/gallium/state_trackers/python/p_context.i
parente7f1ac39be5ab8c627f66a4a8488697c274079e6 (diff)
python: Simplify setting the constant buffers.
Diffstat (limited to 'src/gallium/state_trackers/python/p_context.i')
-rw-r--r--src/gallium/state_trackers/python/p_context.i9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index 172dc7256c..df07f3bc47 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -106,8 +106,13 @@ struct st_context {
}
void set_constant_buffer(unsigned shader, unsigned index,
- const struct pipe_constant_buffer *buf ) {
- $self->pipe->set_constant_buffer($self->pipe, shader, index, buf);
+ const struct pipe_constant_buffer *buf )
+ {
+ struct pipe_constant_buffer state;
+ memset(&state, 0, sizeof(state));
+ state.buffer = buf->buffer;
+ state.size = buf->buffer->size;
+ $self->pipe->set_constant_buffer($self->pipe, shader, index, &state);
}
void set_framebuffer(const struct pipe_framebuffer_state *state ) {