}
+void cso_set_fragment_shader_handle(struct cso_context *ctx,
+ void *handle )
+{
+ if (ctx->fragment_shader != handle) {
+ ctx->fragment_shader = handle;
+ ctx->pipe->bind_fs_state(ctx->pipe, handle);
+ }
+}
+
+
void cso_set_fragment_shader(struct cso_context *ctx,
const struct pipe_shader_state *templ)
{
handle = ((struct cso_fragment_shader *)cso_hash_iter_data(iter))->data;
}
- if (ctx->fragment_shader != handle) {
- ctx->fragment_shader = handle;
- ctx->pipe->bind_fs_state(ctx->pipe, handle);
- }
+ cso_set_fragment_shader_handle( ctx, handle );
}
void cso_save_fragment_shader(struct cso_context *ctx)
}
+void cso_set_vertex_shader_handle(struct cso_context *ctx,
+ void *handle )
+{
+ if (ctx->vertex_shader != handle) {
+ ctx->vertex_shader = handle;
+ ctx->pipe->bind_vs_state(ctx->pipe, handle);
+ }
+}
+
+
void cso_set_vertex_shader(struct cso_context *ctx,
const struct pipe_shader_state *templ)
handle = ((struct cso_vertex_shader *)cso_hash_iter_data(iter))->data;
}
- if (ctx->vertex_shader != handle) {
- ctx->vertex_shader = handle;
- ctx->pipe->bind_vs_state(ctx->pipe, handle);
- }
+ cso_set_vertex_shader_handle( ctx, handle );
}
+
+
void cso_save_vertex_shader(struct cso_context *ctx)
{
assert(!ctx->vertex_shader_saved);
* (eg mesa's internall-generated texenv programs), it will be up to
* the state tracker to implement their own specialized caching.
*/
+void cso_set_fragment_shader_handle(struct cso_context *ctx,
+ void *handle );
void cso_set_fragment_shader( struct cso_context *cso,
const struct pipe_shader_state *shader );
void cso_save_fragment_shader(struct cso_context *cso);
+void cso_set_vertex_shader_handle(struct cso_context *ctx,
+ void *handle );
void cso_set_vertex_shader( struct cso_context *cso,
const struct pipe_shader_state *shader );
void cso_save_vertex_shader(struct cso_context *cso);