diff options
author | José Fonseca <[email protected]> | 2008-07-14 10:45:40 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-07-14 12:41:06 +0900 |
commit | 05a23e6c6f08d4d901dc9fc9995b3444fa6355dd (patch) | |
tree | d9c399afb7cad207eb2100198526457c0a48ce3d /src/gallium/state_trackers/python/st_device.c | |
parent | 16c2267d55fb14d0ffcb676540345a14ecc0f323 (diff) |
python: Allow to create/specify shaders.
Diffstat (limited to 'src/gallium/state_trackers/python/st_device.c')
-rw-r--r-- | src/gallium/state_trackers/python/st_device.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/gallium/state_trackers/python/st_device.c b/src/gallium/state_trackers/python/st_device.c index 430a7af1765..e9002b493de 100644 --- a/src/gallium/state_trackers/python/st_device.c +++ b/src/gallium/state_trackers/python/st_device.c @@ -99,18 +99,12 @@ st_context_destroy(struct st_context *st_ctx) if(st_ctx) { struct st_device *st_dev = st_ctx->st_dev; - if(st_ctx->vs) { - st_ctx->pipe->bind_vs_state(st_ctx->pipe, NULL); - st_ctx->pipe->delete_vs_state(st_ctx->pipe, st_ctx->vs); - } - - if(st_ctx->fs) { - st_ctx->pipe->bind_fs_state(st_ctx->pipe, NULL); - st_ctx->pipe->delete_fs_state(st_ctx->pipe, st_ctx->fs); - } - - if(st_ctx->cso) + if(st_ctx->cso) { + cso_delete_vertex_shader(st_ctx->cso, st_ctx->vs); + cso_delete_fragment_shader(st_ctx->cso, st_ctx->fs); + cso_destroy_context(st_ctx->cso); + } if(st_ctx->pipe) st_ctx->st_dev->st_ws->context_destroy(st_ctx->pipe); @@ -162,8 +156,8 @@ st_context_create(struct st_device *st_dev) st_ctx->fs = util_make_fragment_passthrough_shader(st_ctx->pipe, &st_ctx->frag_shader); - st_ctx->pipe->bind_fs_state(st_ctx->pipe, st_ctx->fs); - st_ctx->pipe->bind_vs_state(st_ctx->pipe, st_ctx->vs); + cso_set_fragment_shader_handle(st_ctx->cso, st_ctx->fs); + cso_set_vertex_shader_handle(st_ctx->cso, st_ctx->vs); return st_ctx; } |