Lines Matching refs:st

78    struct st_context *st = st_context(ctx);  in st_invalidate_state()  local
81 if (st->clamp_frag_color_in_shader && (new_state & _NEW_FRAG_CLAMP)) { in st_invalidate_state()
83 st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM; in st_invalidate_state()
87 if (st->clamp_vert_color_in_shader && (new_state & _NEW_LIGHT)) { in st_invalidate_state()
88 st->dirty.st |= ST_NEW_VERTEX_PROGRAM; in st_invalidate_state()
91 st->dirty.mesa |= new_state; in st_invalidate_state()
92 st->dirty.st |= ST_NEW_MESA; in st_invalidate_state()
122 struct st_context *st = ST_CALLOC_STRUCT( st_context ); in st_create_context_priv() local
124 st->options = *options; in st_create_context_priv()
126 ctx->st = st; in st_create_context_priv()
128 st->ctx = ctx; in st_create_context_priv()
129 st->pipe = pipe; in st_create_context_priv()
137 st->dirty.mesa = ~0; in st_create_context_priv()
138 st->dirty.st = ~0; in st_create_context_priv()
140 st->uploader = u_upload_create(st->pipe, 65536, 4, PIPE_BIND_VERTEX_BUFFER); in st_create_context_priv()
143 st->indexbuf_uploader = u_upload_create(st->pipe, 128 * 1024, 4, in st_create_context_priv()
151 st->constbuf_uploader = u_upload_create(pipe, 128 * 1024, alignment, in st_create_context_priv()
155 st->cso_context = cso_create_context(pipe); in st_create_context_priv()
157 st_init_atoms( st ); in st_create_context_priv()
158 st_init_bitmap(st); in st_create_context_priv()
159 st_init_clear(st); in st_create_context_priv()
160 st_init_draw( st ); in st_create_context_priv()
161 st_init_generate_mipmap(st); in st_create_context_priv()
162 st_init_blit(st); in st_create_context_priv()
165 st->internal_target = PIPE_TEXTURE_2D; in st_create_context_priv()
167 st->internal_target = PIPE_TEXTURE_RECT; in st_create_context_priv()
172 for (i = 0; i < Elements(st->velems_util_draw); i++) { in st_create_context_priv()
173 memset(&st->velems_util_draw[i], 0, sizeof(struct pipe_vertex_element)); in st_create_context_priv()
174 st->velems_util_draw[i].src_offset = i * 4 * sizeof(float); in st_create_context_priv()
175 st->velems_util_draw[i].instance_divisor = 0; in st_create_context_priv()
176 st->velems_util_draw[i].vertex_buffer_index = 0; in st_create_context_priv()
177 st->velems_util_draw[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; in st_create_context_priv()
189 st->ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; in st_create_context_priv()
191 st->ctx->VertexProgram._MaintainTnlProgram = GL_TRUE; in st_create_context_priv()
193 st->pixel_xfer.cache = _mesa_new_program_cache(); in st_create_context_priv()
195 st->force_msaa = st_get_msaa(); in st_create_context_priv()
196 st->has_stencil_export = in st_create_context_priv()
200 st_init_limits(st); in st_create_context_priv()
201 st_init_extensions(st); in st_create_context_priv()
203 return st; in st_create_context_priv()
245 static void st_destroy_context_priv( struct st_context *st ) in st_destroy_context_priv() argument
249 st_destroy_atoms( st ); in st_destroy_context_priv()
250 st_destroy_draw( st ); in st_destroy_context_priv()
251 st_destroy_generate_mipmap(st); in st_destroy_context_priv()
252 st_destroy_blit(st); in st_destroy_context_priv()
253 st_destroy_clear(st); in st_destroy_context_priv()
254 st_destroy_bitmap(st); in st_destroy_context_priv()
255 st_destroy_drawpix(st); in st_destroy_context_priv()
256 st_destroy_drawtex(st); in st_destroy_context_priv()
258 for (shader = 0; shader < Elements(st->state.sampler_views); shader++) { in st_destroy_context_priv()
259 for (i = 0; i < Elements(st->state.sampler_views[0]); i++) { in st_destroy_context_priv()
260 pipe_sampler_view_release(st->pipe, in st_destroy_context_priv()
261 &st->state.sampler_views[shader][i]); in st_destroy_context_priv()
265 if (st->default_texture) { in st_destroy_context_priv()
266 st->ctx->Driver.DeleteTexture(st->ctx, st->default_texture); in st_destroy_context_priv()
267 st->default_texture = NULL; in st_destroy_context_priv()
270 u_upload_destroy(st->uploader); in st_destroy_context_priv()
271 if (st->indexbuf_uploader) { in st_destroy_context_priv()
272 u_upload_destroy(st->indexbuf_uploader); in st_destroy_context_priv()
274 if (st->constbuf_uploader) { in st_destroy_context_priv()
275 u_upload_destroy(st->constbuf_uploader); in st_destroy_context_priv()
277 free( st ); in st_destroy_context_priv()
281 void st_destroy_context( struct st_context *st ) in st_destroy_context() argument
283 struct pipe_context *pipe = st->pipe; in st_destroy_context()
284 struct cso_context *cso = st->cso_context; in st_destroy_context()
285 struct gl_context *ctx = st->ctx; in st_destroy_context()
289 cso_release_all(st->cso_context); in st_destroy_context()
291 st_reference_fragprog(st, &st->fp, NULL); in st_destroy_context()
292 st_reference_vertprog(st, &st->vp, NULL); in st_destroy_context()
296 pipe_surface_reference(&st->state.framebuffer.cbufs[i], NULL); in st_destroy_context()
298 pipe_surface_reference(&st->state.framebuffer.zsbuf, NULL); in st_destroy_context()
306 _mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache); in st_destroy_context()
308 _vbo_DestroyContext(st->ctx); in st_destroy_context()
310 st_destroy_program_variants(st); in st_destroy_context()
316 st_destroy_context_priv(st); in st_destroy_context()
317 st = NULL; in st_destroy_context()