python: Simplify setting the constant buffers.

This commit is contained in:
José Fonseca
2008-08-11 14:31:04 +01:00
parent e7f1ac39be
commit ae0c9b56d4

View File

@@ -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 ) {