use cso fs/vs handle functions
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 21 Apr 2008 19:26:19 +0000 (20:26 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 21 Apr 2008 19:52:54 +0000 (20:52 +0100)
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_gen_mipmap.c
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_program.h

index be5e83e..0938b03 100644 (file)
@@ -318,8 +318,8 @@ util_blit_pixels(struct blit_state *ctx,
    cso_set_sampler_textures(ctx->cso, 1, &tex);
 
    /* shaders */
-   cso_set_fragment_shader(ctx->cso, ctx->fs);
-   cso_set_vertex_shader(ctx->cso, ctx->vs);
+   cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
+   cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
 
    /* drawing dest */
    memset(&fb, 0, sizeof(fb));
index f0c4063..9822a25 100644 (file)
@@ -888,8 +888,8 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
    cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil);
    cso_set_rasterizer(ctx->cso, &ctx->rasterizer);
 
-   cso_set_fragment_shader(ctx->cso, ctx->fs);
-   cso_set_vertex_shader(ctx->cso, ctx->vs);
+   cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
+   cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
 #if 0
    cso_set_viewport(ctx->cso, &ctx->viewport);
 #endif
index 4a641a4..3f5ec71 100644 (file)
@@ -273,8 +273,8 @@ update_linkage( struct st_context *st )
    st->vp = stvp;
    st->fp = stfp;
 
-   cso_set_vertex_shader(st->cso_context, stvp->driver_shader);
-   cso_set_fragment_shader(st->cso_context, stfp->driver_shader);
+   cso_set_vertex_shader_handle(st->cso_context, stvp->driver_shader);
+   cso_set_fragment_shader_handle(st->cso_context, stfp->driver_shader);
 
    st->vertex_result_to_slot = xvp->output_to_slot;
 }
index 1b86314..71a848e 100644 (file)
@@ -446,10 +446,10 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
    cso_set_rasterizer(cso, &st->bitmap.rasterizer);
 
    /* 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 */
-   cso_set_vertex_shader(cso, st->bitmap.vs);
+   cso_set_vertex_shader_handle(cso, st->bitmap.vs);
 
    /* sampler / texture state */
    cso_single_sampler(cso, 0, &st->bitmap.sampler);
index bb27faa..dac346a 100644 (file)
@@ -274,8 +274,8 @@ clear_with_quad(GLcontext *ctx,
    cso_set_rasterizer(st->cso_context, &st->clear.raster);
    cso_set_viewport(st->cso_context, &st->clear.viewport);
 
-   cso_set_fragment_shader(st->cso_context, st->clear.fs);
-   cso_set_vertex_shader(st->cso_context, st->clear.vs);
+   cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
+   cso_set_vertex_shader_handle(st->cso_context, st->clear.vs);
 
    /* draw quad matching scissor rect (XXX verify coord round-off) */
    draw_quad(ctx, x0, y0, x1, y1, ctx->Depth.Clear, ctx->Color.ClearColor);
index 75261c3..3921500 100644 (file)
@@ -545,10 +545,10 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
    }
 
    /* 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 */
-   cso_set_vertex_shader(cso, stvp->driver_shader);
+   cso_set_vertex_shader_handle(cso, stvp->driver_shader);
 
 
    /* texture sampling state: */
index 63d6590..dced31e 100644 (file)
@@ -61,7 +61,7 @@ struct st_fragment_program
    GLuint input_map[PIPE_MAX_SHADER_INPUTS];
 
    struct pipe_shader_state state;
-   struct pipe_shader_state *driver_shader;
+   void *driver_shader;
 
    GLuint param_state;
 
@@ -88,7 +88,7 @@ struct st_vertex_program
    GLuint num_inputs;
 
    struct pipe_shader_state state;
-   struct pipe_shader_state *driver_shader;
+   void *driver_shader;
 
    /** For using our private draw module (glRasterPos) */
    struct draw_vertex_shader *draw_shader;