gallium: free bitmap fragment shaders, misc clean-up
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#include "st_atom_constbuf.h"
|
#include "st_atom_constbuf.h"
|
||||||
#include "st_program.h"
|
#include "st_program.h"
|
||||||
#include "st_cb_bitmap.h"
|
#include "st_cb_bitmap.h"
|
||||||
|
#include "st_cb_program.h"
|
||||||
#include "st_mesa_to_tgsi.h"
|
#include "st_mesa_to_tgsi.h"
|
||||||
#include "st_texture.h"
|
#include "st_texture.h"
|
||||||
#include "pipe/p_context.h"
|
#include "pipe/p_context.h"
|
||||||
@@ -407,7 +408,6 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
|
|
||||||
cso_save_rasterizer(cso);
|
cso_save_rasterizer(cso);
|
||||||
cso_save_samplers(cso);
|
cso_save_samplers(cso);
|
||||||
//cso_save_viewport(cso);
|
|
||||||
|
|
||||||
/* rasterizer state: just scissor */
|
/* rasterizer state: just scissor */
|
||||||
{
|
{
|
||||||
@@ -458,11 +458,9 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
|
|||||||
/* restore state */
|
/* restore state */
|
||||||
cso_restore_rasterizer(cso);
|
cso_restore_rasterizer(cso);
|
||||||
cso_restore_samplers(cso);
|
cso_restore_samplers(cso);
|
||||||
//cso_restore_viewport(cso);
|
|
||||||
/* shaders don't go through cso yet */
|
/* shaders don't go through cso yet */
|
||||||
pipe->bind_fs_state(pipe, st->fp->driver_shader);
|
pipe->bind_fs_state(pipe, st->fp->driver_shader);
|
||||||
pipe->bind_vs_state(pipe, st->vp->driver_shader);
|
pipe->bind_vs_state(pipe, st->vp->driver_shader);
|
||||||
|
|
||||||
pipe->set_sampler_textures(pipe, ctx->st->state.num_textures,
|
pipe->set_sampler_textures(pipe, ctx->st->state.num_textures,
|
||||||
ctx->st->state.sampler_texture);
|
ctx->st->state.sampler_texture);
|
||||||
}
|
}
|
||||||
@@ -514,7 +512,13 @@ st_destroy_bitmap(struct st_context *st)
|
|||||||
{
|
{
|
||||||
struct pipe_context *pipe = st->pipe;
|
struct pipe_context *pipe = st->pipe;
|
||||||
|
|
||||||
/* XXX free frag shader state */
|
if (st->bitmap.combined_prog) {
|
||||||
|
st_delete_program(st->ctx, &st->bitmap.combined_prog->Base.Base);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (st->bitmap.program) {
|
||||||
|
st_delete_program(st->ctx, &st->bitmap.program->Base.Base);
|
||||||
|
}
|
||||||
|
|
||||||
if (st->bitmap.vs) {
|
if (st->bitmap.vs) {
|
||||||
pipe->delete_vs_state(pipe, st->bitmap.vs);
|
pipe->delete_vs_state(pipe, st->bitmap.vs);
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include "st_context.h"
|
#include "st_context.h"
|
||||||
#include "st_program.h"
|
#include "st_program.h"
|
||||||
#include "st_atom_shader.h"
|
#include "st_atom_shader.h"
|
||||||
|
#include "st_cb_program.h"
|
||||||
|
|
||||||
|
|
||||||
static GLuint SerialNo = 1;
|
static GLuint SerialNo = 1;
|
||||||
@@ -122,8 +123,8 @@ static struct gl_program *st_new_program( GLcontext *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void st_delete_program( GLcontext *ctx,
|
void
|
||||||
struct gl_program *prog )
|
st_delete_program(GLcontext *ctx, struct gl_program *prog)
|
||||||
{
|
{
|
||||||
struct st_context *st = st_context(ctx);
|
struct st_context *st = st_context(ctx);
|
||||||
struct pipe_context *pipe = st->pipe;
|
struct pipe_context *pipe = st->pipe;
|
||||||
|
@@ -32,5 +32,8 @@
|
|||||||
extern void
|
extern void
|
||||||
st_init_program_functions(struct dd_function_table *functions);
|
st_init_program_functions(struct dd_function_table *functions);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
st_delete_program(GLcontext *ctx, struct gl_program *prog);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -42,6 +42,7 @@
|
|||||||
#include "st_cb_drawpixels.h"
|
#include "st_cb_drawpixels.h"
|
||||||
#include "st_cb_fbo.h"
|
#include "st_cb_fbo.h"
|
||||||
#include "st_cb_feedback.h"
|
#include "st_cb_feedback.h"
|
||||||
|
#include "st_cb_program.h"
|
||||||
#include "st_cb_queryobj.h"
|
#include "st_cb_queryobj.h"
|
||||||
#include "st_cb_rasterpos.h"
|
#include "st_cb_rasterpos.h"
|
||||||
#include "st_cb_readpixels.h"
|
#include "st_cb_readpixels.h"
|
||||||
|
@@ -97,10 +97,6 @@ struct st_vertex_program
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern void
|
|
||||||
st_init_program_functions(struct dd_function_table *functions);
|
|
||||||
|
|
||||||
|
|
||||||
static inline struct st_fragment_program *
|
static inline struct st_fragment_program *
|
||||||
st_fragment_program( struct gl_fragment_program *fp )
|
st_fragment_program( struct gl_fragment_program *fp )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user