Home | History | Annotate | Download | only in state_tracker

Lines Matching refs:st

60 st_pbo_addresses_setup(struct st_context *st,
68 unsigned ofs = (buf_offset * addr->bytes_per_pixel) % st->ctx->Const.TextureBufferOffsetAlignment;
87 if (addr->last_element - addr->first_element > st->ctx->Const.MaxTextureBufferSize - 1)
109 st_pbo_addresses_pixelstore(struct st_context *st,
154 if (!st_pbo_addresses_setup(st, buf, buf_offset, addr))
190 st_pbo_draw(struct st_context *st, const struct st_pbo_addresses *addr,
193 struct cso_context *cso = st->cso_context;
196 if (!st->pbo.vs) {
197 st->pbo.vs = st_pbo_create_vs(st);
198 if (!st->pbo.vs)
202 if (addr->depth != 1 && st->pbo.use_gs && !st->pbo.gs) {
203 st->pbo.gs = st_pbo_create_gs(st);
204 if (!st->pbo.gs)
208 cso_set_vertex_shader_handle(cso, st->pbo.vs);
210 cso_set_geometry_shader_handle(cso, addr->depth != 1 ? st->pbo.gs : NULL);
232 u_upload_alloc(st->uploader, 0, 8 * sizeof(float), 4,
246 u_upload_unmap(st->uploader);
264 if (st->constbuf_uploader) {
267 u_upload_data(st->constbuf_uploader, 0, sizeof(addr->constants),
268 st->ctx->Const.UniformBufferOffsetAlignment,
273 u_upload_unmap(st->constbuf_uploader);
287 cso_set_rasterizer(cso, &st->pbo.raster);
303 st_pbo_create_vs(struct st_context *st)
319 if (st->pbo.layers) {
322 if (!st->pbo.use_gs)
329 if (st->pbo.layers) {
330 if (st->pbo.use_gs) {
342 return ureg_create_shader_and_destroy(ureg, st->pipe);
346 st_pbo_create_gs(struct st_context *st)
386 return ureg_create_shader_and_destroy(ureg, st->pipe);
407 create_fs(struct st_context *st, bool download, enum pipe_texture_target target,
410 struct pipe_context *pipe = st->pipe;
423 st->pbo.layers &&
566 st_pbo_get_upload_fs(struct st_context *st,
570 STATIC_ASSERT(ARRAY_SIZE(st->pbo.upload_fs) == ST_NUM_PBO_CONVERSIONS);
574 if (!st->pbo.upload_fs[conversion])
575 st->pbo.upload_fs[conversion] = create_fs(st, false, 0, conversion);
577 return st->pbo.upload_fs[conversion];
581 st_pbo_get_download_fs(struct st_context *st, enum pipe_texture_target target,
585 STATIC_ASSERT(ARRAY_SIZE(st->pbo.download_fs) == ST_NUM_PBO_CONVERSIONS);
590 if (!st->pbo.download_fs[conversion][target])
591 st->pbo.download_fs[conversion][target] = create_fs(st, true, target, conversion);
593 return st->pbo.download_fs[conversion][target];
597 st_init_pbo_helpers(struct st_context *st)
599 struct pipe_context *pipe = st->pipe;
602 st->pbo.upload_enabled =
606 if (!st->pbo.upload_enabled)
609 st->pbo.download_enabled =
610 st->pbo.upload_enabled &&
616 st->pbo.rgba_only =
621 st->pbo.layers = true;
623 st->pbo.layers = true;
624 st->pbo.use_gs = true;
629 memset(&st->pbo.upload_blend, 0, sizeof(struct pipe_blend_state));
630 st->pbo.upload_blend.rt[0].colormask = PIPE_MASK_RGBA;
633 memset(&st->pbo.raster, 0, sizeof(struct pipe_rasterizer_state));
634 st->pbo.raster.half_pixel_center = 1;
638 st_destroy_pbo_helpers(struct st_context *st)
642 for (i = 0; i < ARRAY_SIZE(st->pbo.upload_fs); ++i) {
643 if (st->pbo.upload_fs[i]) {
644 cso_delete_fragment_shader(st->cso_context, st->pbo.upload_fs[i]);
645 st->pbo.upload_fs[i] = NULL;
649 for (i = 0; i < ARRAY_SIZE(st->pbo.download_fs); ++i) {
650 for (unsigned j = 0; j < ARRAY_SIZE(st->pbo.download_fs[0]); ++j) {
651 if (st->pbo.download_fs[i][j]) {
652 cso_delete_fragment_shader(st->cso_context, st->pbo.download_fs[i][j]);
653 st->pbo.download_fs[i][j] = NULL;
658 if (st->pbo.gs) {
659 cso_delete_geometry_shader(st->cso_context, st->pbo.gs);
660 st->pbo.gs = NULL;
663 if (st->pbo.vs) {
664 cso_delete_vertex_shader(st->cso_context, st->pbo.vs);
665 st->pbo.vs = NULL;