Lines Matching refs:st

96    struct st_context *st = st_context(ctx);  in st_Enable()  local
101 st_update_debug_callback(st); in st_Enable()
169 st_invalidate_buffers(struct st_context *st) in st_invalidate_buffers() argument
171 st->dirty |= ST_NEW_BLEND | in st_invalidate_buffers()
192 struct st_context *st = st_context(ctx); in st_invalidate_state() local
195 st_invalidate_buffers(st); in st_invalidate_state()
201 st->dirty |= ST_NEW_RASTERIZER; in st_invalidate_state()
204 st->dirty |= ST_NEW_FS_STATE; in st_invalidate_state()
207 if (st->clamp_frag_color_in_shader) in st_invalidate_state()
208 st->dirty |= ST_NEW_FS_STATE; in st_invalidate_state()
210 st->dirty |= ST_NEW_RASTERIZER; in st_invalidate_state()
216 st->dirty |= ST_NEW_RASTERIZER; in st_invalidate_state()
220 st->dirty |= ST_NEW_CLIP_STATE; in st_invalidate_state()
223 st->dirty |= ST_NEW_PIXEL_TRANSFER; in st_invalidate_state()
226 st->dirty |= ST_NEW_VERTEX_ARRAYS; in st_invalidate_state()
229 if (st->clamp_vert_color_in_shader && (new_state & _NEW_LIGHT)) in st_invalidate_state()
230 st->dirty |= ST_NEW_VS_STATE; in st_invalidate_state()
234 st->gfx_shaders_may_be_dirty = true; in st_invalidate_state()
235 st->compute_shader_may_be_dirty = true; in st_invalidate_state()
237 st->active_states = st_get_active_states(ctx); in st_invalidate_state()
241 st->dirty |= st->active_states & in st_invalidate_state()
247 st->dirty |= ST_NEW_FS_STATE; in st_invalidate_state()
254 st_destroy_context_priv(struct st_context *st, bool destroy_pipe) in st_destroy_context_priv() argument
258 st_destroy_atoms(st); in st_destroy_context_priv()
259 st_destroy_draw(st); in st_destroy_context_priv()
260 st_destroy_clear(st); in st_destroy_context_priv()
261 st_destroy_bitmap(st); in st_destroy_context_priv()
262 st_destroy_drawpix(st); in st_destroy_context_priv()
263 st_destroy_drawtex(st); in st_destroy_context_priv()
264 st_destroy_perfmon(st); in st_destroy_context_priv()
265 st_destroy_pbo_helpers(st); in st_destroy_context_priv()
266 st_destroy_bound_texture_handles(st); in st_destroy_context_priv()
267 st_destroy_bound_image_handles(st); in st_destroy_context_priv()
269 for (shader = 0; shader < ARRAY_SIZE(st->state.sampler_views); shader++) { in st_destroy_context_priv()
270 for (i = 0; i < ARRAY_SIZE(st->state.sampler_views[0]); i++) { in st_destroy_context_priv()
271 pipe_sampler_view_release(st->pipe, in st_destroy_context_priv()
272 &st->state.sampler_views[shader][i]); in st_destroy_context_priv()
277 free(st->drawpix_cache.image); in st_destroy_context_priv()
278 pipe_resource_reference(&st->drawpix_cache.texture, NULL); in st_destroy_context_priv()
281 st_invalidate_readpix_cache(st); in st_destroy_context_priv()
283 cso_destroy_context(st->cso_context); in st_destroy_context_priv()
285 if (st->pipe && destroy_pipe) in st_destroy_context_priv()
286 st->pipe->destroy(st->pipe); in st_destroy_context_priv()
288 free(st); in st_destroy_context_priv()
293 st_init_driver_flags(struct st_context *st) in st_init_driver_flags() argument
295 struct gl_driver_flags *f = &st->ctx->DriverFlags; in st_init_driver_flags()
305 if (st->has_hw_atomics) in st_init_driver_flags()
337 if (st->force_persample_in_shader) { in st_init_driver_flags()
361 struct st_context *st = ST_CALLOC_STRUCT( st_context); in st_create_context_priv() local
363 st->options = *options; in st_create_context_priv()
365 ctx->st = st; in st_create_context_priv()
367 st->ctx = ctx; in st_create_context_priv()
368 st->pipe = pipe; in st_create_context_priv()
373 st->dirty = ST_ALL_STATES_MASK; in st_create_context_priv()
375 st->can_bind_const_buffer_as_vertex = in st_create_context_priv()
386 st->cso_context = cso_create_context(pipe, vbuf_flags); in st_create_context_priv()
388 st_init_atoms(st); in st_create_context_priv()
389 st_init_clear(st); in st_create_context_priv()
390 st_init_draw(st); in st_create_context_priv()
391 st_init_pbo_helpers(st); in st_create_context_priv()
395 st->internal_target = PIPE_TEXTURE_2D; in st_create_context_priv()
397 st->internal_target = PIPE_TEXTURE_RECT; in st_create_context_priv()
402 const unsigned slot = cso_get_aux_vertex_buffer_slot(st->cso_context); in st_create_context_priv()
413 memset(&st->util_velems, 0, sizeof(st->util_velems)); in st_create_context_priv()
414 st->util_velems[0].src_offset = 0; in st_create_context_priv()
415 st->util_velems[0].vertex_buffer_index = slot; in st_create_context_priv()
416 st->util_velems[0].src_format = PIPE_FORMAT_R32G32B32_FLOAT; in st_create_context_priv()
417 st->util_velems[1].src_offset = 3 * sizeof(float); in st_create_context_priv()
418 st->util_velems[1].vertex_buffer_index = slot; in st_create_context_priv()
419 st->util_velems[1].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; in st_create_context_priv()
420 st->util_velems[2].src_offset = 7 * sizeof(float); in st_create_context_priv()
421 st->util_velems[2].vertex_buffer_index = slot; in st_create_context_priv()
422 st->util_velems[2].src_format = PIPE_FORMAT_R32G32_FLOAT; in st_create_context_priv()
441 st->has_stencil_export = in st_create_context_priv()
443 st->has_shader_model3 = screen->get_param(screen, PIPE_CAP_SM3); in st_create_context_priv()
444 st->has_etc1 = screen->is_format_supported(screen, PIPE_FORMAT_ETC1_RGB8, in st_create_context_priv()
447 st->has_etc2 = screen->is_format_supported(screen, PIPE_FORMAT_ETC2_RGB8, in st_create_context_priv()
450 st->prefer_blit_based_texture_transfer = screen->get_param(screen, in st_create_context_priv()
452 st->force_persample_in_shader = in st_create_context_priv()
455 st->has_shareable_shaders = screen->get_param(screen, in st_create_context_priv()
457 st->needs_texcoord_semantic = in st_create_context_priv()
459 st->apply_texture_swizzle_to_border_color = in st_create_context_priv()
463 st->has_time_elapsed = in st_create_context_priv()
465 st->has_half_float_packing = in st_create_context_priv()
467 st->has_multi_draw_indirect = in st_create_context_priv()
470 st->has_hw_atomics = in st_create_context_priv()
478 &ctx->Extensions, &st->options, ctx->API); in st_create_context_priv()
480 if (st_have_perfmon(st)) { in st_create_context_priv()
487 st->clamp_vert_color_in_shader = GL_TRUE; in st_create_context_priv()
491 st->clamp_frag_color_in_shader = GL_TRUE; in st_create_context_priv()
498 (st->clamp_frag_color_in_shader || st->clamp_vert_color_in_shader)) { in st_create_context_priv()
499 st->clamp_vert_color_in_shader = GL_FALSE; in st_create_context_priv()
500 st->clamp_frag_color_in_shader = GL_FALSE; in st_create_context_priv()
514 !st->has_shader_model3; in st_create_context_priv()
522 st->shader_has_one_variant[MESA_SHADER_VERTEX] = in st_create_context_priv()
523 st->has_shareable_shaders && in st_create_context_priv()
524 !st->clamp_vert_color_in_shader; in st_create_context_priv()
526 st->shader_has_one_variant[MESA_SHADER_FRAGMENT] = in st_create_context_priv()
527 st->has_shareable_shaders && in st_create_context_priv()
528 !st->clamp_frag_color_in_shader && in st_create_context_priv()
529 !st->force_persample_in_shader; in st_create_context_priv()
531 st->shader_has_one_variant[MESA_SHADER_TESS_CTRL] = st->has_shareable_shaders; in st_create_context_priv()
532 st->shader_has_one_variant[MESA_SHADER_TESS_EVAL] = st->has_shareable_shaders; in st_create_context_priv()
533 st->shader_has_one_variant[MESA_SHADER_GEOMETRY] = st->has_shareable_shaders; in st_create_context_priv()
534 st->shader_has_one_variant[MESA_SHADER_COMPUTE] = st->has_shareable_shaders; in st_create_context_priv()
536 st->bitmap.cache.empty = true; in st_create_context_priv()
545 st_destroy_context_priv(st, false); in st_create_context_priv()
551 st_init_driver_flags(st); in st_create_context_priv()
554 LIST_INITHEAD(&st->winsys_buffers); in st_create_context_priv()
556 return st; in st_create_context_priv()
570 struct st_context *st; in st_create_context() local
596 st = st_create_context_priv(ctx, pipe, options, no_error); in st_create_context()
597 if (!st) { in st_create_context()
601 return st; in st_create_context()
613 struct st_context *st = (struct st_context *) userData; in destroy_tex_sampler_cb() local
615 st_texture_release_sampler_view(st, st_texture_object(texObj)); in destroy_tex_sampler_cb()
620 st_destroy_context(struct st_context *st) in st_destroy_context() argument
622 struct gl_context *ctx = st->ctx; in st_destroy_context()
638 _mesa_HashWalk(ctx->Shared->TexObjects, destroy_tex_sampler_cb, st); in st_destroy_context()
640 st_reference_fragprog(st, &st->fp, NULL); in st_destroy_context()
641 st_reference_prog(st, &st->gp, NULL); in st_destroy_context()
642 st_reference_vertprog(st, &st->vp, NULL); in st_destroy_context()
643 st_reference_prog(st, &st->tcp, NULL); in st_destroy_context()
644 st_reference_prog(st, &st->tep, NULL); in st_destroy_context()
645 st_reference_compprog(st, &st->cp, NULL); in st_destroy_context()
648 LIST_FOR_EACH_ENTRY_SAFE_REV(stfb, next, &st->winsys_buffers, head) { in st_destroy_context()
652 pipe_sampler_view_reference(&st->pixel_xfer.pixelmap_sampler_view, NULL); in st_destroy_context()
653 pipe_resource_reference(&st->pixel_xfer.pixelmap_texture, NULL); in st_destroy_context()
657 st_destroy_program_variants(st); in st_destroy_context()
663 st_destroy_context_priv(st, true); in st_destroy_context()
664 st = NULL; in st_destroy_context()
673 struct st_context *st = ctx->st; in st_emit_string_marker() local
674 st->pipe->emit_string_marker(st->pipe, string, len); in st_emit_string_marker()
682 struct st_context *st = ctx->st; in st_set_background_context() local
684 (struct st_manager *) st->iface.st_context_private; in st_set_background_context()
687 smapi->set_background_context(&st->iface, queue_info); in st_set_background_context()