use cso fs/vs handle functions
This commit is contained in:
@@ -318,8 +318,8 @@ util_blit_pixels(struct blit_state *ctx,
|
|||||||
cso_set_sampler_textures(ctx->cso, 1, &tex);
|
cso_set_sampler_textures(ctx->cso, 1, &tex);
|
||||||
|
|
||||||
/* shaders */
|
/* shaders */
|
||||||
cso_set_fragment_shader(ctx->cso, ctx->fs);
|
cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
|
||||||
cso_set_vertex_shader(ctx->cso, ctx->vs);
|
cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
|
||||||
|
|
||||||
/* drawing dest */
|
/* drawing dest */
|
||||||
memset(&fb, 0, sizeof(fb));
|
memset(&fb, 0, sizeof(fb));
|
||||||
|
@@ -888,8 +888,8 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
|
|||||||
cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil);
|
cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil);
|
||||||
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
|
cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
|
||||||
|
|
||||||
cso_set_fragment_shader(ctx->cso, ctx->fs);
|
cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
|
||||||
cso_set_vertex_shader(ctx->cso, ctx->vs);
|
cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
|
||||||
#if 0
|
#if 0
|
||||||
cso_set_viewport(ctx->cso, &ctx->viewport);
|
cso_set_viewport(ctx->cso, &ctx->viewport);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -273,8 +273,8 @@ update_linkage( struct st_context *st )
|
|||||||
st->vp = stvp;
|
st->vp = stvp;
|
||||||
st->fp = stfp;
|
st->fp = stfp;
|
||||||
|
|
||||||
cso_set_vertex_shader(st->cso_context, stvp->driver_shader);
|
cso_set_vertex_shader_handle(st->cso_context, stvp->driver_shader);
|
||||||
cso_set_fragment_shader(st->cso_context, stfp->driver_shader);
|
cso_set_fragment_shader_handle(st->cso_context, stfp->driver_shader);
|
||||||
|
|
||||||
st->vertex_result_to_slot = xvp->output_to_slot;
|
st->vertex_result_to_slot = xvp->output_to_slot;
|
||||||
}
|
}
|
||||||
|
@@ -446,10 +446,10 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
cso_set_rasterizer(cso, &st->bitmap.rasterizer);
|
cso_set_rasterizer(cso, &st->bitmap.rasterizer);
|
||||||
|
|
||||||
/* fragment shader state: TEX lookup program */
|
/* fragment shader state: TEX lookup program */
|
||||||
cso_set_fragment_shader(cso, stfp->driver_shader);
|
cso_set_fragment_shader_handle(cso, stfp->driver_shader);
|
||||||
|
|
||||||
/* vertex shader state: position + texcoord pass-through */
|
/* vertex shader state: position + texcoord pass-through */
|
||||||
cso_set_vertex_shader(cso, st->bitmap.vs);
|
cso_set_vertex_shader_handle(cso, st->bitmap.vs);
|
||||||
|
|
||||||
/* sampler / texture state */
|
/* sampler / texture state */
|
||||||
cso_single_sampler(cso, 0, &st->bitmap.sampler);
|
cso_single_sampler(cso, 0, &st->bitmap.sampler);
|
||||||
|
@@ -274,8 +274,8 @@ clear_with_quad(GLcontext *ctx,
|
|||||||
cso_set_rasterizer(st->cso_context, &st->clear.raster);
|
cso_set_rasterizer(st->cso_context, &st->clear.raster);
|
||||||
cso_set_viewport(st->cso_context, &st->clear.viewport);
|
cso_set_viewport(st->cso_context, &st->clear.viewport);
|
||||||
|
|
||||||
cso_set_fragment_shader(st->cso_context, st->clear.fs);
|
cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
|
||||||
cso_set_vertex_shader(st->cso_context, st->clear.vs);
|
cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
|
||||||
|
|
||||||
/* draw quad matching scissor rect (XXX verify coord round-off) */
|
/* draw quad matching scissor rect (XXX verify coord round-off) */
|
||||||
draw_quad(ctx, x0, y0, x1, y1, ctx->Depth.Clear, ctx->Color.ClearColor);
|
draw_quad(ctx, x0, y0, x1, y1, ctx->Depth.Clear, ctx->Color.ClearColor);
|
||||||
|
@@ -545,10 +545,10 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* fragment shader state: TEX lookup program */
|
/* fragment shader state: TEX lookup program */
|
||||||
cso_set_fragment_shader(cso, stfp->driver_shader);
|
cso_set_fragment_shader_handle(cso, stfp->driver_shader);
|
||||||
|
|
||||||
/* vertex shader state: position + texcoord pass-through */
|
/* vertex shader state: position + texcoord pass-through */
|
||||||
cso_set_vertex_shader(cso, stvp->driver_shader);
|
cso_set_vertex_shader_handle(cso, stvp->driver_shader);
|
||||||
|
|
||||||
|
|
||||||
/* texture sampling state: */
|
/* texture sampling state: */
|
||||||
|
@@ -61,7 +61,7 @@ struct st_fragment_program
|
|||||||
GLuint input_map[PIPE_MAX_SHADER_INPUTS];
|
GLuint input_map[PIPE_MAX_SHADER_INPUTS];
|
||||||
|
|
||||||
struct pipe_shader_state state;
|
struct pipe_shader_state state;
|
||||||
struct pipe_shader_state *driver_shader;
|
void *driver_shader;
|
||||||
|
|
||||||
GLuint param_state;
|
GLuint param_state;
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ struct st_vertex_program
|
|||||||
GLuint num_inputs;
|
GLuint num_inputs;
|
||||||
|
|
||||||
struct pipe_shader_state state;
|
struct pipe_shader_state state;
|
||||||
struct pipe_shader_state *driver_shader;
|
void *driver_shader;
|
||||||
|
|
||||||
/** For using our private draw module (glRasterPos) */
|
/** For using our private draw module (glRasterPos) */
|
||||||
struct draw_vertex_shader *draw_shader;
|
struct draw_vertex_shader *draw_shader;
|
||||||
|
Reference in New Issue
Block a user