mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
python: Simplify setting the constant buffers.
This commit is contained in:
parent
e7f1ac39be
commit
ae0c9b56d4
1 changed files with 7 additions and 2 deletions
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue